I think I pretty much followed all the instructions in:
https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide.
I still get the error:
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:567: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error
Has anyone come across this?
Did you install OpenBLAS? Try the following command and repeat the compillation process:
sudo apt-get install -y libopenblas-dev
If it fails, you could try compilling caffe with cmake.
From the build folder, do:
cmake -DBLAS=open ..
make all -j $(($(nproc) + 1))
make install
make runtest
You should provide the config file to better understand the links.
Related
Hi I was trying to install a python package called 'pysptk' under the Ubuntu 16.04, but when I use:
pip install pysptk
I have encountered the following error.
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
However, I already have gcc 4.8.5 installed as 'gcc -v' produces an output. My python version is 3.6.1 and the environment is Anaconda. I have googled the bug but reinstalling gcc and python3-dev does not work.
The code
easy_install pysptk
will give the following output.
Searching for pysptk
Reading https://pypi.python.org/simple/pysptk/
Downloading https://pypi.python.org/packages/3d/86/5520242ab99426d8d9b2f18a86ed73f1be848b9fb14e57b2b81b8f17a1bb/pysptk-0.1.8.tar.gz#md5=d34133d2eaccba83f634310602721657
Best match: pysptk 0.1.8
Processing pysptk-0.1.8.tar.gz
Writing /tmp/easy_install-0xk7me9z/pysptk-0.1.8/setup.cfg
Running pysptk-0.1.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0xk7me9z/pysptk-0.1.8/egg-dist-tmp-wm2zkn7r
fatal: Not a git repository (or any of the parent directories): .git
-- Building version 0.1.8
In file included from /home/luke/anaconda3/lib/python3.6/site-
packages/numpy/core/include/numpy/ndarraytypes.h:1809:0,
from /home/luke/anaconda3/lib/python3.6/site-
packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/luke/anaconda3/lib/python3.6/site-
packages/numpy/core/include/numpy/arrayobject.h:4,
from pysptk/_sptk.c:436:
/home/luke/anaconda3/lib/python3.6/site-
packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning:
#warning "Using deprecated NumPy API, disable it by " "#defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by " \
^
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
Does anyone know what the problem is? I really appreciate your help! If there is any missing information. Please let me know. Thanks very much.
First, I don't know if you should use pip to install packages on Anaconda. Use conda install instead to install packages. Likely what's happening is that pip tries to install packages on a different python on your computer, but that Python does not have 'gcc' installed. I run into this issue before when I installed Python from source with the gcc command. Try pip -V to see which Python the pip command is callinng.
Another thing I noticed is that you said your Python is Python3.6.1, but you did not use pip3 command. I suggest you try to do either conda install pysptk or pip3 install pysptk.
I'm trying to install PyOpenCL on Ubuntu 16.04, but getting the following error:
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
How can I solve this issue?
Thanks.
You need to install: ocl-icd-opencl-dev
apt-get install ocl-icd-opencl-dev
You can check what was actually installed with that package running:
$ dpkg -L ocl-icd-opencl-dev
which should return something along these lines:
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/ocl-icd-opencl-dev
/usr/share/doc/ocl-icd-opencl-dev/copyright
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/OpenCL.pc
/usr/share/doc/ocl-icd-opencl-dev/changelog.Debian.gz
/usr/lib/x86_64-linux-gnu/libOpenCL.so # <--- this is the important bit
Bonus
If you get a complaint about missing headers, e.g CL/cl.h, then you should install:
apt-get install opencl-headers.
Don't forget to install specific OpenCL drivers for your platform. You could be running against an Intel CPU/GPU, an AMD or NVidia graphics card or even an FPGA.
A good way of checking everything is well setup, is to run clinfo which will show useful information about available platforms (apt-get install clinfo).
Based on this page, it seems that I had to only run this command on my bash for the error to be removed:
apt-get install python-pyopencl
I´m was trying to install locustio following this steps (http://docs.locust.io/en/latest/installation.html), in my terminal:
pip install locustio
I get this:
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
I also have tried with easy_install:
sudo easy_install locustio
I get the same error. After that, yesterday I was looking for information about this, and some people says that you may to need install gcc.
brew install gcc
I get this message:
Warning: gcc-5.3.0 already installed
After a couple of hours looking for information, I read about Anaconda, I install Anaconda and I create my new environment... and in my new environment I get this again:
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
I´m getting crazy. I would like to work in environments but I need some of help to do this because I lost a lot time trying to resolve this problem to use locustio.
I´m using Mac Yosemite 10.10.3
My Anaconda version is 3.19.0
My Python version is 2.7.11
My gcc is gcc-5.3.0
Someone can help me?
I just wanna launch locustio in my pc =(
When I run pip install M2Crypto, I get:
/usr/include/openssl/opensslconf.h:31: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.
error: command 'swig' failed with exit status 1
I tried the answer here (https://stackoverflow.com/a/7855209/828584), but when trying to run the script with "build", I get
gcc: error trying to exec 'as': execvp: Permission denied
Is there a way to get around either error or another way to install M2Crypto?
I found another answer https://stackoverflow.com/a/4380239/289192
Try this command:
env SWIG_FEATURES="-cpperraswarn -includeall -D__`uname -m`__ -I/usr/include/openssl" pip install M2Crypto
I am trying to install the python library pyinterval. It requires the crlibm C headers which I have installed without error, but seem to be at the root of the problem.
When I run:
$ sudo easy_install pyinterval
I get the following:
Searching for pyinterval
Reading http://pypi.python.org/simple/pyinterval/
Reading http://pyinterval.googlecode.com/
Best match: pyinterval 1.0b21
Downloading http://pypi.python.org/packages/source/p/pyinterval/pyinterval-1.0b21.tar.gz#md5=a65fe9855d3b6b0a9ddcc5b2f1e1e421
Processing pyinterval-1.0b21.tar.gz
Running pyinterval-1.0b21/setup.py -q bdist_egg --dist-dir /tmp/easy_install-K58WK9/pyinterval-1.0b21/egg-dist-tmp-Tp03Mb
ext/crlibmmodule.c: In function ‘crlibm_cospi_rn’:
ext/crlibmmodule.c:45:1: warning: implicit declaration of function ‘cospi_rn’
ext/crlibmmodule.c: In function ‘crlibm_cospi_ru’:
ext/crlibmmodule.c:45:1: warning: implicit declaration of function ‘cospi_ru’
...
ext/crlibmmodule.c: In function ‘crlibm_log1p_rz’:
ext/crlibmmodule.c:59:1: warning: implicit declaration of function ‘log1p_rz’
/usr/bin/ld: /usr/local/lib/libcrlibm.a(addition_scs.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libcrlibm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
I have called:
$ sudo apt-get install python-all-dev
and that did not fix the problem.
In case anyone still has problems with this, you need to set "CPPFLAGS = -fPIC" in "scs_lib/Makefile", not "./Makefile".
I had been having the same problem, and I found the issue was with crlibm (the flags -fPIC are mentioned in the error).
I ended up installing crlibm from source, and was able to get the the installation working. Once I'd run ./configure for crlibm, I manually edited the Makefile by changing the line "CPPFLAGS = " to "CPPFLAGS = -fPIC". From here I ran "make", "make install", and then "sudo easy_install pyinterval".
I'll add that I'm not 100% confident in this solution, and its not very elegant. I'm not sure about the technical details of the -fPIC flag, and what effect it really has.
But it does work.
It seems to work ok for me:
wget http://lipforge.ens-lyon.fr/frs/download.php/152/crlibm-1.0beta3.tar.gz
tar vfxz crlibm-1.0beta3.tar.gz
cd crlibm-1.0beta3
export CPPFLAGS=-fPIC
./configure
make
sudo make install
sudo pip install pyinterval
python
>>> from interval import *
Thanks for the answer.
I just went through installing pyinterval on ubuntu 12.10 using the above suggestions for crlibm.
I tried adding -fPIC to CPPFLAGS in the scs_lib Makefile but it didn't work. I think later versions of crlibm (I am using 1.0beta-4) require that crlibm_private.o is also compiled with -fPIC so the flag needs to be added to CPPFLAGS in the Makefile of the base directory