Error in caffe installation - installation

I am facing a issue when i run the following command while installing caffe on fedora 21
make all
Output:
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: skipping incompatible /usr/lib/libleveldb.so when searching for -lleveldb
/usr/bin/ld: cannot find -lleveldb
/usr/bin/ld: cannot find -lsnappy
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status
Makefile:544: recipe for target '.build_release/lib/libcaffe.so' failed
make: *** [.build_release/lib/libcaffe.so] Error 1
[root#parags-pc caffe]#
Some help please!
I still can't get rid of the last two (-lcblas and -latlas) errors. I have installed atlas and OpenBLAS long ago. Also I tried the following commands but with no success
echo "/usr/lib64/atlas" >/etc/ld.so.conf.d/atlas-x86_64.conf
ldconfig -v
Need some inputs!!

The leveldb present in your system seems to be of a different architecture, most probably a 32bit compiled leveldb and 64bit compiled caffe, or vice-versa.
The rest of the libraries are to be installed in Fedora before compiling Caffe.

Related

/usr/bin/ld: cannot find -lgcc: No such file or directory

Recently, I was trying to compile a C program into 16-bit with this command:
gcc -m16 main.c
all was going well until I saw these errors:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/11/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc: No such file or directory
collect2: error: ld returned 1 exit status
What is wrong and how do I fix these errors?

gcc -m32 error /usr/bin/ld: skipping incompatible

I'm trying to compile an application for both 64bit and 32bit systems. During compilation I am receving an error for the 32bit application:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
I've read around and found that I need gcc-multilib so I tried to install it:
me#ubuntu:~/bin/c/find-files$ sudo apt-get install gcc-multilib
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc-multilib is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
linux-headers-4.8.0-41 linux-headers-4.8.0-41-generic
linux-image-4.8.0-36-generic linux-image-4.8.0-41-generic
linux-image-extra-4.8.0-36-generic linux-image-extra-4.8.0-41-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It's already installed. So I look a little more and found that I should be exporting to the lib32 directory:
me#ubuntu:~/bin/c/find-files$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib32:/usr/lib32:/usr/lib/i386-linux-gnu
Tried to compile again, same error. Then I though maybe if I used g++ and installed it's multilib:
me#ubuntu:~/bin/c/find-files$ sudo apt-get install g++-multilib
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++-multilib is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
linux-headers-4.8.0-41 linux-headers-4.8.0-41-generic
linux-image-4.8.0-36-generic linux-image-4.8.0-41-generic
linux-image-extra-4.8.0-36-generic linux-image-extra-4.8.0-41-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
How can I cross compile an application for both 32bit and 64bit operating systems?

/usr/bin/ld: cannot find -lmemcached_gem

While trying to make the memcached gem, i am getting the following error:
*linking shared-object rlibmemcached.so
/usr/bin/ld: skipping incompatible /ghostcache/nightly_build/components/ruby-memcached/akamai/ruby-memcached/memcached-1.8.0/ext/lib/libmemcached_gem.a when searching for -lmemcached_gem
/usr/bin/ld: skipping incompatible /ghostcache/nightly_build/components/ruby-memcached/akamai/ruby-memcached/memcached-1.8.0/ext/lib/libmemcached_gem.a when searching for -lmemcached_gem
/usr/bin/ld: cannot find -lmemcached_gem
collect2: ld returned 1 exit status
make[2]: *** [rlibmemcached.so] Error 1*
Looks like there is some platform issue. The libmemcached_gem.a library does exist in that path. I tried building by passing -m32 and -m64, but it fails for the same reason.
Any help will be much appreciated.

Cannot find crtn.o, linking 32 bit code on 64 bit system

I'm attempting to assemble some 32-bit code using NASM and GCC on a 64-bit system. I use the following two commands
nasm -f elf32 -g -F stabs coc.asm
gcc -m32 -o coc coc.o
NASM appears to do fine, but LD complains:
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6.1/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
I'm running Ubuntu 11.10, and I checked and I'm pretty sure libc is installed.
You are not assembling, but linking an executable, which needs OS startup files.
It seems you don't have gcc-*-multilib installed, which contains the necessary files: http://packages.ubuntu.com/oneiric/amd64/gcc-4.6-multilib/filelist
You need to install gcc-multilib to get the proper 32-Bit lib
I had a very similar problem on ubuntu 11.10. See my question on SO about this. What helped for me, was linking the crt*.o to /lib/. After that I never had other problems with this issue. A bit more of a cludge, but for me it solved the problems.

building gcc 4.5.2 on amd x86_64 only building 64 bit libraries

I tried building gcc-4.5.2 from sources on a Debian 64-bit machine.
I ended up having just a 64-bit version of the compiler but no 32-bit.
When I try to build 32-bit applications, I see the following linker error.
When I tried ‘-m32′ options, I’m getting this message:
/usr/bin/ld: skipping incompatible /usr/local/gcc452/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
What should I do to build gcc properly.
You also need a 32bit version of "ld" (the linker). ld is found in the binutils package.

Resources