[gmx-developers] pthreads missing when attempting to link with libgtest.so

Gernot Ziegler gziegler at nvidia.com
Fri Sep 2 16:38:25 CEST 2011

Being a newbie to Gromacs compilation (but not Linux source compilation in general), I just stumbled over the following when trying to compile a Gromacs freshly pulled via git:

localhost gromacs # cmake -DGMX_OPENMM=ON

localhost gromacs # make
[  0%] Generating version information
[  0%] Built target gmx_version
[ 72%] Built target libgromacs
[ 72%] Built target template
[ 73%] Built target testutils
Linking CXX executable testutils-test
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/../../../../lib64/libgtest.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/../../../../lib64/libgtest.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/../../../../lib64/libgtest.so: undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/../../../../lib64/libgtest.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make[2]: *** [src/testutils/tests/testutils-test] Error 1
make[1]: *** [src/testutils/tests/CMakeFiles/testutils-test.dir/all] Error 2
make: *** [all] Error 2

The system is Gentoo Linux AMD64, using gcc 4.4.6, CMake cache as follows:

All hints welcomed! And let me know if you need more information :-)


This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20110902/c1f30902/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeCache.txt
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20110902/c1f30902/attachment.txt>

More information about the gromacs.org_gmx-developers mailing list