kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
223 stars 37 forks source link

Failure to build: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' #66

Closed lgtrombetta closed 6 years ago

lgtrombetta commented 6 years ago

[ 86%] Linking CXX executable cadabra-server /usr/bin/ld: CMakeFiles/cadabra-server.dir/cadabra-server.cc.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' /usr/lib/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [client_server/CMakeFiles/cadabra-server.dir/build.make:103: client_server/cadabra-server] Error 1 make[1]: [CMakeFiles/Makefile2:663: client_server/CMakeFiles/cadabra-server.dir/all] Error 2 make: *** [Makefile:163: all] Error 2

kpeeters commented 6 years ago

On which system? (and I'm assuming this is from github master?)

lgtrombetta commented 6 years ago

I'm trying to build from master in Manjaro Linux.

Let me know if you need more info or if you want me to run some tests.

rvlobato commented 6 years ago

Happened the same here with Arch. I will try figure out what is happening

padawanphysicist commented 6 years ago

Same problem with Arch Linux here. Possibly related: https://stackoverflow.com/questions/34143265/c-compiling-error-undefined-reference-to-symbol-pthread-createglibc-2-2-5?noredirect=1&lq=1

lgtrombetta commented 6 years ago

Indeed, exporting this flag before compiling seems to solve it:

export CXXFLAGS=-pthread

kpeeters commented 6 years ago

I have pushed a fix for this to github, can you please try again (but without setting CXXFLAGS)?

lgtrombetta commented 6 years ago

I can confirm that with the last commit it's now working for me.

Thanks!

padawanphysicist commented 6 years ago

I also confirm the sucessful compilation after the fix!

kpeeters commented 6 years ago

Ok, closing this, thanks for reporting.