Bug 971956
Summary: | missing libboost_thread.so: ld fails to link against boost-thread but succeeds to link against boost-regex | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Christian Stadelmann <fedora> | ||||
Component: | boost | Assignee: | Petr Machata <pmachata> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 18 | CC: | bkoz, denis.arnaud_fedora, mnewsome, pertusus, pmachata | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | boost-1.50.0-6.fc18 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: |
Fedora 18, all updates from "updates" repository installed
|
|||||
Last Closed: | 2013-07-09 01:41:49 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
The library is called libboost_thread-mt. The -mt distinguishes between thread-aware and thread-agnostic variants, and Boost.Thread is naturally thread-aware, hence the suffix. this is the non-standard way boost is compiled for Fedora. If you download the source from boost.org and compile it as described in boost's docs [1] it won't build a libboost-thread-mt.so but a libboost-thread.so and that's what fedora should provide in my opinion. According to this mail http://lists.boost.org/boost-users/2010/09/62701.php boost dropped the -mt file name suffixes with version 1.40 released in august 2009. Most major distributions adopted that change (Debian, Ubuntu, Arch, OpenSUSE). So Fedora is doing it wrong. This does not only affect the boost-thread library but all of them. [1] http://www.boost.org/doc/libs/1_53_0/more/getting_started/unix-variants.html#easy-build-and-install You're right, of course. We do pass --layout=tagged explicitly, which we do so that we can also build with threading=single,multi. I think I could build Boost.Thread in a separate pass without the tagged layout. Or maybe just making a symlink (or, failing that, a linker script) of that name would work. I'll get back to this. Looking into this some more, I'm not sure that the single/multi distinction is meaningful. After a local build, all constituent .o's are pairwise bit-for-bit identical between single- and multi-threaded variant (except that Boost.Atomic, .Thread and .Locale are only built when multi-threaded). The resulting DSO's then differ, but that's probably due to two reasons: length of sonames differs (due to -mt having been added), which shifts everything in the file; and -pthread in linker command line causes -lpthread and libpthread_nonshared.a to be linked in, which adds one NEEDED entry (shifting the contents more), and some extra baggage from the .a. In particular, there doesn't seem to be any magic that makes -mt libraries thread-safe. That also means there's no overhead involved in making everything -mt, and that means we can simply build everything with threading=multi, and drop the tagging which now serves no purpose. Of course that constitutes an ABI breakage (all the sonames would change), so I'll do this in Rawhide. I might still patch over this in F18 by providing -mt-less symlinks. This is now on pmachata/master-next. Currently many packages depend on the -mt variants, so I'll push this change with rebase to next Boost. I'll add symlinks for Boost.Thread and Boost.Locale in F18 and F19. F18 build is spinning now. boost-1.50.0-6.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/boost-1.50.0-6.fc18 Package boost-1.50.0-6.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing boost-1.50.0-6.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-12007/boost-1.50.0-6.fc18 then log in and leave karma (feedback). boost-1.50.0-6.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 758250 [details] output of $: ldconfig -p | grep boost Description of problem: ld fails to link against boost-thread with boost-thread installed Version-Release number of selected component (if applicable): ld: 2.23.51.0.1-6.fc18 20120806 boost-*: 1.50.0 How reproducible: 100% Steps to Reproduce: 1. Install boost-thread and boost-devel (containing all headers for boost-thread) 2. run this: ld -l boost_thread Actual results: ld fails with this output: ld: cannot find -lboost_thread but it must fail with this output like it does on other packages (e.g. boost_regex, boost_filesystem, boost_program_options): ld: warning: cannot find entry symbol _start; not setting start address Expected results: ld should find boost_thread since header files (boost-devel) and the shared library (boost-thread) are installed. Additional info: I think the reason is that neither boost-devel nor boost-thread provide a libboost_thread.so file ld could link against. Is there any reason why boost-devel does not provide this library? Afaik it did provide this file some time ago since it is e.g. required to build mapnik.