[mlpack] undefined reference to `pthread_atfork'

Ryan Curtin gth671b at mail.gatech.edu
Tue Nov 12 16:15:55 EST 2013


On Mon, Nov 11, 2013 at 09:25:51PM +0000, Schmidt-Richberg, Alexander wrote:
> Ahh, I was already wondering because there is not much information to gain from the config ;)
> 
> I built armadillo 3.920.2 from source using the CMakeCache attached. The lib compiled without any problems. However, when I compiled the examples I first got the following error:
> 
> g++ -I /usr/include   -O2   -o example1  example1.cpp  -larmadillo
> /usr/bin/ld: warning: libmkl_intel_thread.so, needed by /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so, not found (try using -rpath or -rpath-link)
> /usr/bin/ld: warning: libmkl_core.so, needed by /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so, not found (try using -rpath or -rpath-link)
> /usr/bin/ld: warning: libiomp5.so, needed by /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so, not found (try using -rpath or -rpath-link)
> /usr/bin/ld: warning: libmkl_intel_lp64.so, needed by /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so, not found (try using -rpath or -rpath-link)
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so: undefined reference to `zgesdd_'
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so: undefined reference to `zheevd_'
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libarmadillo.so: undefined reference to `cgemv_’
>> 
> After adding
> 
> setenv LD_LIBRARY_PATH /opt/intel/composerxe/lib/intel64:/opt/intel/mkl/lib/intel64/
> 
> to the environmental variables I got the pthread error I described in my mail.

Ok, I can reproduce this and I am working on a fix, but I am not sure it
will work for you, because you mentioned earlier that -lpthread did not
fix the linking errors for the Armadillo examples.  With my setup it
does.

Does the file /lib/x86_64-linux-gnu/libpthread.so.0 exist on your
system?  If it does, can you try adding that directory to
LD_LIBRARY_PATH? (that second one is a long shot because it should
already be somewhere the linker is looking...)

If we can make the Armadillo examples work with -lpthread then I will
have a solution for you in the short-term and also a long-term solution
for mlpack so that this won't happen again (...hopefully).

Thanks,

Ryan

-- 
Ryan Curtin       | "I know... but I really liked those ones."
ryan at igglybob.com |   - Vincent


More information about the mlpack mailing list