Reputation: 89
While attempting to setup a Python package (mlabwrap), I received the following link errors:
/usr/bin/ld: cannot find -leng
/usr/bin/ld: cannot find -lmx
/usr/bin/ld: cannot find -lmat
/usr/bin/ld: cannot find -lut
The build command is shown below:
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/mlabraw.o -L/usr/local/MATLAB/R2015a/bin/glnx86 -Wl,-R/usr/local/MATLAB/R2015a/bin/glnx86 -leng -lmx -lmat -lut -lstdc++ -o build/lib.linux-x86_64-2.7/mlabrawmodule.so
A grep of the specified directory shows that all the required shared object libraries are present:
ls /usr/local/MATLAB/R2015a/bin/glnxa64/ | grep "libeng.so\|libmx.so\|libmat.so\|libut.so"
libeng.so
libmat.so
libmx.so
libut.so
Does anyone have any clue why the linker would not recognize the necessary libraries? Is there a better way to debug the linker to see where it is looking for these libraries?
From my knowledge the -L/usr/local/MATLAB/R2015a/bin/glnx86
section of the compilation string should direct the linker to that folder.
Upvotes: 0
Views: 568
Reputation: 879759
/usr/local/MATLAB/R2015a/bin/glnx86
is not
/usr/local/MATLAB/R2015a/bin/glnxa64/
Note the a
in glnxa64
.
Upvotes: 0