Bug 47237 - cmake build fails on Linux due to not linking -lpthread
Summary: cmake build fails on Linux due to not linking -lpthread
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL:
Whiteboard: review?
Keywords: patch
Depends on:
Blocks: dbus-1.5
  Show dependency treegraph
 
Reported: 2012-03-12 08:40 UTC by Simon McVittie
Modified: 2012-06-15 07:23 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
On Unix, link libdbus to a platform-specific threading library (1.81 KB, patch)
2012-03-12 08:41 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2012-03-12 08:40:12 UTC
Since I redid Unix mutexes for Bug #43744, the cmake build fails on Linux: previously we were only using functions present in the standard C library, but now we need libpthread (which is shipped with the standard C library, but is a separate library as far as linking is concerned). Non-Linux Unix will probably fail in the same way.

The patch is fairly easy, it seems we just need to use the standard FindThreads module.
Comment 1 Simon McVittie 2012-03-12 08:41:00 UTC
Created attachment 58324 [details] [review]
On Unix, link libdbus to a platform-specific threading  library

On Linux, this is libpthread; on other Unixes, in principle it might be
called libpthreads or libthreads or something.
Comment 2 Simon McVittie 2012-06-05 04:26:43 UTC
Any chance of a review for this? Without this patch, I can't test the cmake build system on Linux, which means I'm more likely to commit changes that accidentally break it on Windows.
Comment 3 Ralf Habacker 2012-06-06 10:10:14 UTC
(In reply to comment #2)
> Any chance of a review for this? Without this patch, I can't test the cmake
> build system on Linux, which means I'm more likely to commit changes that
> accidentally break it on Windows.


Do not see any problems for windows, although i did not compiled it.
Comment 4 Simon McVittie 2012-06-15 07:23:02 UTC
(In reply to comment #3)
> Do not see any problems for windows, although i did not compiled it.

I think I'm going to call that a positive review :-)

Thanks, fixed in git for 1.6.2 (and I can test cmake things on Linux again).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.