Bug 661115
Summary: | ilmbase 1.0.2 is missing -pthread at build (link time) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nicolas Chauvet (kwizart) <kwizart> |
Component: | ilmbase | Assignee: | Rex Dieter <rdieter> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 14 | CC: | rdieter |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ilmbase-1.0.2-2.fc14 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-12-17 08:25:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 661333 | ||
Bug Blocks: | 661042 |
Description
Nicolas Chauvet (kwizart)
2010-12-07 20:00:59 UTC
I vaguely recall fixing this awhile back (f12?), and upstreamed the patch, but maybe this is new (or it got lost). In fairness here, $ pkg-config --libs IlmBase -pthread -lImath -lHalf -lIex -lIlmThread I take it the linked failure doesn't use pkg-config ? The -pthread is needed at libIlmThread.so.6 link time creation as told by rpmlint on installed pacakge. You can remove it from the IlmBase.pc it's wrong, (but harmless). OK, but arg... I can confirm the build links the library using (on my f14/i686 box): g++ -shared -nostdlib /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.5.1/crtbeginS.o .libs/IlmThreadPool.o .libs/IlmThread.o .libs/IlmThreadSemaphore.o .libs/IlmThreadMutex.o .libs/IlmThreadPosix.o .libs/IlmThreadSemaphorePosix.o .libs/IlmThreadSemaphorePosixCompat.o .libs/IlmThreadMutexPosix.o -Wl,--rpath -Wl,/tmp/kde-rdieter1/ilmbase-1.0.2/Iex/.libs ../Iex/.libs/libIex.so -L/usr/lib/gcc/i686-redhat-linux/4.5.1 -L/usr/lib/gcc/i686-redhat-linux/4.5.1/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/i686-redhat-linux/4.5.1/crtendS.o /usr/lib/gcc/i686-redhat-linux/4.5.1/../../../crtn.o -m32 -march=i686 -mtune=atom -pthread -pthread -Wl,-soname -Wl,libIlmThread.so.6 -o .libs/libIlmThread.so.6.0.0 (NOTE the -pthread's in there) Yet, the resulting library still has undefined symbols. :( Seems manually adding -lrt here makes a lib without undefined symbols, interesting. Hum, I'm wrong. -ptread is right in the Libs: field of the .pc given that semaphore.h is used from the ilmbase API. $ grep sem /usr/include/OpenEXR/* ... IlmThreadSemaphore.h:// system-dependent counting semaphores IlmThreadSemaphore.h: #include <semaphore.h> IlmThreadSemaphore.h: mutable HANDLE _semaphore; IlmThreadSemaphore.h: // If the platform has Posix threads but no semapohores, IlmThreadSemaphore.h: struct sema_t IlmThreadSemaphore.h: mutable sema_t _semaphore; IlmThreadSemaphore.h: mutable sem_t _semaphore; But this would need to be confirmed upstream. as not every Now about the rpmlint issue, this is an upstream bug. The downside is that preload will fail to work in the case of missing-non-weak-symbol. So that's also a runtime issue for one of the ilmbase libs and is hidden by the build time workaround. (given that not all package may use IlmThreadSemaphore.h and requires -pthread at link time). (In reply to comment #4) > OK, but arg... ... > Seems manually adding -lrt here makes a lib without undefined symbols, > interesting. Weird, I've expected that -lrt was deprecated nowadays... seems -lpthread works too, I think that's what I used before. then let the upstream poking commense. While we are at it. Can you add INSTALL="install -p" to prevent timestamp changes while installing headers. Thx Didn't think timestamp changes mattered much these days. ? Regardless, if I make the suggested change (comment #7), then -pthread will get dropped from IlmBase.pc too. maybe need both -pthread *and* explicit linkage with -lpthread when creating libIlmThread? (In reply to comment #7) > seems -lpthread works too, I think that's what I used before. librt is already linked to libpthread so it's just more than enought. ldd /lib64/librt.so.1 linux-vdso.so.1 => (0x00007fff2d7ff000) libc.so.6 => /lib64/libc.so.6 (0x0000003299000000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003fd6600000) /lib64/ld-linux-x86-64.so.2 (0x0000003298c00000) I would have expected -pthread would imply linking to the required library. It could be a compiler issue. About timestamp, it's more valuable information to have the last commit date of the header than the time when it was packaged I guess. As pointed out on -devel list, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 -pthread should have priority over -nostdlib -> CLOSED INVALID Ie, this will affect any g++ libtool-using app/pkg generating shlibs. Yep I've read, so my understanding is either -nostdlib have to be removed when using g++ with -pthread; or there is a need to explicitely add -lpthread ilmbase-1.0.2-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/ilmbase-1.0.2-2.fc14 ilmbase-1.0.2-2.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ilmbase'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ilmbase-1.0.2-2.fc14 ilmbase-1.0.2-2.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. |