Bug 47237

Summary: cmake build fails on Linux due to not linking -lpthread
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: hp, ralf.habacker, smcv
Version: 1.5Keywords: patch
Hardware: Other   
OS: All   
Whiteboard: review?
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 36164    
Attachments: On Unix, link libdbus to a platform-specific threading library

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.