/usr/bin/ld: cannot find -lmemcached_gem - ruby

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.

Related

ERROR:relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC

I am getting a make error while running omnetpp.
I have turned the clang and the lld off. The exact error is:
Creating shared library: /home/ash/omnetpp-master/out/gcc-release/src/sim/liboppsim.so
/usr/bin/ld: /usr/local/lib/libpython3.10.a(pythonrun.o): warning: relocation against _Py_UnhandledKeyboardInterrupt' in read-only section .text'
/usr/bin/ld: /usr/local/lib/libpython3.10.a(bytearrayobject.o): relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:135: /home/ash/omnetpp-master/out/gcc-release/src/sim/liboppsim.so] Error 1
make[1]: *** [Makefile:134: sim] Error 2
make: *** [Makefile:35: allmodes] Error 2
Do NOT use the omnetpp master branch. There is absolutely no guarantee that the master branch is properly working or at least compiling at any given time.

How to rebuild libiberty.a with -fPIC flag

I've getting the following linking error while compiling mlpack:
[ 37%] Linking CXX shared library ../../lib/libmlpack.so
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/libiberty.a(cplus-dem.o): warning: relocation against `libiberty_demanglers' in read-only section `.text'
/usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib/libiberty.a(cp-demangle.o): relocation R_X86_64_PC32 against symbol `cplus_demangle_builtin_types' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/build.make:1040: lib/libmlpack.so.3.4] Error 1
make[1]: *** [CMakeFiles/Makefile2:2106: src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
It seems I need to recompile libiberty.a library with -fPIC flag. How do I do that?
I found this bug report on the issue. In my case I was able to fix things by downgrading a few packages (as described in the report):
binutils 2.36.1-3
gcc 11.1.0-3
gcc-libs 11.1.0-3
gcc fortran-11.1.0-3
Ultimately this should be resolved when binutils gets updated.

How do I fix this error /usr/bin/ld: cannot find crtbeginS.o:

what cause this error aoc: Compiling for Emulation ....
/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
aocl-clang: error: linker command failed with exit code 1 (use -v to see invocation)
To fix the problem. You must give the crt file with it's absolute path. For the missing libraries, you can pass the path by using -L option.

Error "make all" /usr/bin/ld: cannot find -lprotobuf when installing caffe

I want to install caffe with conda. In the tutorial I followed it was told to install these stuff
sudo apt-get install protobuf-compiler libprotobuf-dev
Soon I found out that is was out-of-date and removed both of them and got latest protoc 3.9.1 . But I'm facing an error that said there is no protobuff in the folder.
I got confused about protobuf lib and protoc.
I have only one protoc in this folder
protoc: /usr/bin/protoc
And here's what I have after performing
sudo make all -j4
CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin
CXX/LD -o .build_release/tools/convert_imageset.bin
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
CXX/LD -o .build_release/tools/extract_features.bin
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools
/convert_imageset.bin' failed
make: *** [.build_release/tools/convert_imageset.bin] Error 1
make: *** Ожидание завершения заданий…
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools
/upgrade_solver_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_solver_proto_text.bin]
Error 1
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools/upgrade_net_proto_text.bin' failed
make: *** [.build_release/tools/upgrade_net_proto_text.bin] Error 1
/usr/bin/ld: cannot find -lprotobuf
collect2: error: ld returned 1 exit status
Makefile:635: recipe for target '.build_release/tools/extract_features.bin' failed
make: *** [.build_release/tools/extract_features.bin] Error 1
Can you help me solving this issue? And also it would be great if you explain me the matter with protoc and protobuff

Error in caffe 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.

Resources