Hello folks, I just ran into Debian bug #468555:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555 which appears to not be something that was introduced in Debian, but is still a problem in the general Libtool 2.4.2 release. There is discussion in that bug log (the libgcc part no longer seems to be an issue), but the basic summary is that Libtool uses -nostdlib when linking C++ libraries, and -nostdlib suppresses the action of -pthread at the link phase and therefore g++ doesn't add -lpthread to the final link. The result is a shared library with unresolved pthread symbols. I think the primary question is why Libtool is using -nostdlib when linking C++ libraries. The bug discussion at: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460 says that it's because of some other issue with libstdc++ linkage with dlopened modules depending on C++ libraries, but this dates from 2005, and breaking C++ libraries that need threading seems like a bad outcome. Does this problem still exist? Can this workaround just be dropped? Note that the GCC maintainters closed the bug requesting -pthread still add -lpthread even under -nostdlib as invalid. -- Russ Allbery (r...@stanford.edu) <http://www.eyrie.org/~eagle/> _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool