building error with torch
There is no problem when I compile mxnet with USE_TORCH=0.
But when I set USE_TORCH=1, the problem turns out like this
~/torch/install/lib/libTH.so: undefined reference to sgeqrf_' ~/torch/install/lib/libTH.so: undefined reference tossyev_'
~/torch/install/lib/libTH.so: undefined reference to sgesvd_' ~/torch/install/lib/libTH.so: undefined reference todsyev_'
~/torch/install/lib/libTH.so: undefined reference to dorgqr_' ~/torch/install/lib/libTH.so: undefined reference todpotri_'
~/torch/install/lib/libTH.so: undefined reference to dgesv_' ~/torch/install/lib/libTH.so: undefined reference tosgels_'
~/torch/install/lib/libTH.so: undefined reference to dgels_' ~/torch/install/lib/libTH.so: undefined reference todtrtrs_'
~/torch/install/lib/libTH.so: undefined reference to sorgqr_' ~/torch/install/lib/libTH.so: undefined reference tospotrs_'
~/torch/install/lib/libTH.so: undefined reference to dpstrf_' ~/torch/install/lib/libTH.so: undefined reference tosgetri_'
~/torch/install/lib/libTH.so: undefined reference to dpotrf_' ~/torch/install/lib/libTH.so: undefined reference todgetri_'
~/torch/install/lib/libTH.so: undefined reference to sormqr_' ~/torch/install/lib/libTH.so: undefined reference todgeqrf_'
~/torch/install/lib/libTH.so: undefined reference to strtrs_' ~/torch/install/lib/libTH.so: undefined reference todormqr_'
~/torch/install/lib/libTH.so: undefined reference to dpotrs_' ~/torch/install/lib/libTH.so: undefined reference tosgesv_'
~/torch/install/lib/libTH.so: undefined reference to dgetrf_' ~/torch/install/lib/libTH.so: undefined reference todgeev_'
~/torch/install/lib/libTH.so: undefined reference to sgetrf_' ~/torch/install/lib/libTH.so: undefined reference todgesvd_'
~/torch/install/lib/libTH.so: undefined reference to spotrf_' ~/torch/install/lib/libTH.so: undefined reference tospstrf_'
~torch/install/lib/libTH.so: undefined reference to sgeev_' ~/torch/install/lib/libTH.so: undefined reference tospotri_'
collect2: error: ld returned 1 exit status
make: *** [bin/im2rec] Error 1
Is it caused by torch or mxnet?
Thank you
It seems like torch link problem (with altas or lapack). Check your torch building.
does your torch installation work?
yes, torch works well, and openblas is ok...
but the problem is here...
try adding -L/path/to/lapack -llapack to LDFLAGS?
the additional link flags you want to add
ADD_LDFLAGS =-L/usr/lib/lapack -llapack
i add it like this, but it still doesnt work
@shuaitang Have you fixed the problem? I've also find the exactly same problem and can not figure out the solution.
Same compilation error with a clean torch install on ubuntu 14.04, gcc 4.8 . Did someone solve the issue ? Which version of altas and lapack are required ?
I experienced the same kind of error yesterday and the problem ended up being that I'd compiled lapack with gcc 4.x but had compiled torch with 5.x. The "undefined reference to..." is a huge hint that's what's going on as I've been slowly upgrading my (Gentoo) system and I've hit that error countless times. That may not be your problem but I figured I'd post a potential solution in case it helps someone.
Another possible cause can be the fact that torch install a custom version of openBlas in /opt/OpenBLAS/, which may conflict with another version installed with apt-get (used by Caffe for instance).