LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Undefined reference to symbol 'pthread_once@@GLIBC_2.2.5' (https://www.linuxquestions.org/questions/linux-software-2/undefined-reference-to-symbol-pthread_once%40%40glibc_2-2-5-a-4175421447/)

Dornith 08-10-2012 12:42 PM

Undefined reference to symbol 'pthread_once@@GLIBC_2.2.5'
 
I am trying to install this program and everything was going good, 97% done, when I get this error:
Code:

/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: ../common/pb/libcockatrice_protocol.a(admin_commands.pb.cc.o): undefined reference to symbol 'pthread_once@@GLIBC_2.2.5'
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: note: 'pthread_once@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation

It says to add /lib64/libpthread.so.0 to the link, but I'm not sure how? Any advice would be much appreciated.

Edit: I managed to fix it with a big of a brute force solution. I found the file where the flags for the cmake command were and inserted "-L/lib64 -lpthread" after all the C flag lists.


All times are GMT -5. The time now is 09:06 PM.