At least libIlmThread built by graphics/ilmbase port uses threads, but is not linked with threading library itself. The cause is likely libtool magic because of which the library is built in a strange way: c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/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,/usr/home/amdmi3/projects/freebsd/ports/graphics/ilmbase/prefix/lib -L/usr/home/amdmi3/projects/freebsd/ports/graphics/ilmbase/prefix/lib -lIex -pthread -L/usr/lib -lstdc++ -lm -lc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o -march=prescott -pthread -pthread -pthread -Wl,-soname -Wl,libIlmThread.so.6 -o .libs/libIlmThread.so.6 I assume -nostdlib is what causes -pthread not link with -lthr. % ldd /usr/local/lib/libIlmThread.so /usr/local/lib/libIlmThread.so: libIex.so.6 => /usr/local/lib/libIex.so.6 (0x2819c000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28300000) libm.so.5 => /lib/libm.so.5 (0x281ad000) libc.so.7 => /lib/libc.so.7 (0x2808b000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x281c6000) The results of all this is an inability to directly link to IlmThread: % gcc 1.cc -lIlmThread -L/usr/local/lib /usr/local/lib/libIlmThread.so: undefined reference to `pthread_create' and thus the need to explicitely add -pthread to linker flags in all ports that use ilmbase (at least graphics/nvidia-texture-tools and graphics/devil which depend on it), so I believe this should be fixed in ilmbase. No idea on how to make libtool not use that -nostdlib strangeness though. Port maintainer (nork@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77
Responsible Changed From-To: freebsd-ports-bugs->nork Over to maintainer (via the GNATS Auto Assign Tool)
State Changed From-To: open->closed Committed. Thanks!
amdmi3 2009-09-08 02:24:26 UTC FreeBSD ports repository Modified files: graphics/OpenEXR Makefile Log: - Explicitely link with threads library, otherwise it was impossible to link with -lIlmImf (and dependent libraries as well) without -pthread PR: 133291 Submitted by: myself Approved by: maintainer timeout Revision Changes Path 1.37 +5 -1 ports/graphics/OpenEXR/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"