/usr/bin/ld: skipping incompatible foo.so when searching for foo

user1403483 picture user1403483 · Jun 4, 2013 · Viewed 61.5k times · Source

I am using Ubuntu 13.10 64bit and I am getting the following errors while compiling the python wrappers of vlfeat library.

g++ -o _vlfeat.so ../../vl/aib.o ../../vl/generic.o ../../vl/hikmeans.o ../../vl/ikmeans.o ../../vl/imopv.o ../../vl/mathop.o ../../vl/pgm.o ../../vl/rodrigues.o ../../vl/stringop.o ../../vl/getopt_long.o ../../vl/host.o ../../vl/imop.o ../../vl/imopv_sse2.o ../../vl/mser.o ../../vl/random.o ../../vl/sift.o ../../vl/dsift.o mser/vl_erfill.o mser/vl_mser.o sift/vl_sift.o sift/vl_dsift.o sift/vl_siftdescriptor.o imop/vl_imsmooth.o misc/vl_binsum.o kmeans/vl_hikmeans.o kmeans/vl_ikmeans.o kmeans/vl_hikmeanspush.o kmeans/vl_ikmeanspush.o py_vlfeat.o -m64 -msse -m32 -msse -shared  -lboost_python-mt-py27
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libboost_python-mt-py27.so when searching for -lboost_python-mt-py27
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../libboost_python-mt-py27.a when searching for -lboost_python-mt-py27
/usr/bin/ld: skipping incompatible /usr/lib/libboost_python-mt-py27.so when searching for -lboost_python-mt-py27
/usr/bin/ld: skipping incompatible /usr/lib/libboost_python-mt-py27.a when searching for -lboost_python-mt-py27
/usr/bin/ld: cannot find -lboost_python-mt-py27
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.a when searching for -lm
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
make: *** [_vlfeat.so] Error 1

Any solutions to make this library work on 64 bit architecture?

Answer

D3Hunter picture D3Hunter · Nov 25, 2014

remove -m32 in command line flags

to build with 32bit binary, you have to install

sudo apt-get install gcc-multilib and sudo apt-get install ia32-libs-dev