pthread in Ubuntu 18.10
Aneoshun opened this issue · comments
Apparently, sferes does not compile on ubuntu 18.10 (fresh install):
undefined reference to `pthread_join@GLIBC_2.2.5'
It seems that the -lpthread flag is missing. We fixed it by adding:
conf.env.LIBPATH_PTHREAD = ['/usr/lib/x86_64-linux-gnu/']
conf.env.LIB_PTHREAD = ['pthread’]
In the wscript (after the #boost mpi section).
If you think this is the best way to solve this, I can push a fix.
Yes, push this. This is a classic problem that comes back sometimes.
But this might not work on Mac. Can you do a pull request and I will check?
Also, can you try to not link to pthread but to use the -pthread
option in the cxxflags & ldflags?