When trying to link media-libs/openexr-2.1.0 against media-libs/ilmbase-2.1.0, the following error messages appear: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_init' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_destroy' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `pthread_create' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_post' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_trywait' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_getvalue' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `sem_wait' /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../lib64/libIlmThread.so: undefined reference to `pthread_join' Reproducible: Always
Created attachment 368886 [details, diff] ilmbase-2.1.0-asneeded.patch
Created attachment 368888 [details, diff] ilmbase-2.1.0.ebuild.diff This patch, modeled after ilmbase-1.0.0-asneeded.patch, fixes the problem for me (~amd64).
*** This bug has been marked as a duplicate of bug 496810 ***
I have ilmbase-2.1.0 and it doesn't link against -lpthread either, and correctly so, because the pkg-config file has all the information required (and because compiler's -pthread includes the -lpthread functionality) $ objdump -p /usr/lib64/libIlmThread.so |grep NEEDED NEEDED libIex-2_1.so.11 NEEDED libstdc++.so.6 NEEDED libc.so.6 NEEDED libgcc_s.so.1 no needed entry -pthread in pkg-config files: $ pkg-config --libs IlmBase -lImath -lHalf -lIex -lIexMath -lIlmThread -pthread $ pkg-config --cflags IlmBase -pthread -I/usr/include/OpenEXR and during the compile of openexr: using pkg-config to set ILMBASE_CXXFLAGS and ILMBASE_LDFLAGS: ILMBASE_CXXFLAGS = -pthread -I/usr/include/OpenEXR ILMBASE_LDFLAGS = ILMBASE_LIBS = -lImath -lHalf -lIex -lIexMath -lIlmThread -pthread so ILMBASE_LIBS includes -lpthread because it has -pthread
I meant the compile is succesful despite of no -lpthread linkage thanks to pkg-config. Any clue what's different in your system it doesn't work? Using libtool-2.4.2, binutils-2.24, gcc-4.8.x with non-gold compiler... $ ld -v GNU ld (GNU Binutils) 2.24 Just trying to make some sense to the patch which looks redudant to me. :/
It was probably the linker in binutils-2.24-r1. After upgrading to binutils-2.24-r2 I no longer need this patch. The problem was triggered by ilmbase and openexr being emerged before the new binutils when doing an emerge -uDN @world .
(In reply to Stefan Talpalaru from comment #6) > It was probably the linker in binutils-2.24-r1. After upgrading to > binutils-2.24-r2 I no longer need this patch. The problem was triggered by > ilmbase and openexr being emerged before the new binutils when doing an > emerge -uDN @world . oh. bug 497976 then...