libcaffe.so.1.0.0-rc3 not found - caffe

i am new in caffe.i am trying to install caffe on my ubontu 14.4 flowing https://chunml.github.io/ChunML.github.io/project/Installing-Caffe-CPU-Only/
tutorial but when i run the commend make all i get the error
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc5
/usr/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc5] Error 1
i can not understand why i am facing this. i googled a lot to fix this problem but got no solution. can someone help me?

The liker didn't find opencv_imgcodecs library in your system. Make sure that opencv is correctly installed. If it is, add the library location to LD_LIBRARY_PATH and run ldconfig.
In summary, run:
sudo updatedb
locate libopencv_imgcodecs.so
Found? if not, install opencv. if yes, run:
export LD_LIBRARY_PATH=<library location>:$LD_LIBRARY_PATH
sudo ldconfig
and then run make again.

Related

CUDA linking error on OS X El Capitan

I've been trying to install CUDA and cuDNN for TensorFlow as instructed on the TensorFlow page. Everything works until I do the following:
$ cp -r /usr/local/cuda/samples ~/cuda-samples
$ pushd ~/cuda-samples
$ make
I then get the following error:
clang++ -rpath /Developer/NVIDIA/CUDA-7.5/lib -L/Developer/NVIDIA/CUDA-7.5/lib -framework CUDA -o clock_nvrtc clock.o -lnvrtc
ld: framework not found CUDA
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [clock_nvrtc] Error 1
make: *** [0_Simple/clock_nvrtc/Makefile.ph_build] Error 2
My question of course is what's causing the error, and how to fix it. I had previously installed CUDA 7.5, and then I installed 8.0. The whole of CUDA (and its installation) is just a black box to me; I'm just trying to get it to work with TensorFlow.
Thanks!
Add the folder containing the folder CUDA.framework to the command line as such:
-F<folder>
It looks like the linker isn't able to find the framework and you have to point it where it is
Run the following in your terminal -
xcode-select --install
Then try to run make again.
Saw the answer on an NVidia forum - https://devtalk.nvidia.com/default/topic/628298/cuda-samples-on-mac-os-x-mavericks-10-9-matrixmuldrv/
It's also documented in this Quick Start Guide - http://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#axzz4YvZYOZc0

"/usr/bin/ld: cannot find -lopenblas" error in Caffe compilation

When I was compiling Caffe, I had this error, despite OpenBLAS is installed:
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: cannot find -lopenblas
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/lib/libcaffe.so] Error 1
Is there a solution for it?
Including the base packs even after cloning OpenBlas and making will link the appropriate libraries in 14.04 and 16.
apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev
apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev
I faced the same problem. Even adding library directory "/opt/OpenBLAS/lib/" to ldconfig cache didn't help (as my libopenblas.so is at "/opt/OpenBLAS/lib/libopenblas.so").
Using cmake helped me. Try this from caffe root directory:
mkdir build
cd build
cmake -DBLAS=open ..
make all
make runtest
If you need to use make, add the symlink of libopenblas.so to /usr/lib. I did the following:
ln -s /opt/OpenBLAS/lib/libopenblas.so /usr/lib/libopenblas.so
I saw the similar problem (I'm compiling caffe again for some reason).
I found the library file the builder is looking for (-lcblas or -latlas means libcblas.so and libatlas.so) are under /usr/lib64/atlas. So just added symbolic links under /usr/lib64 like this.
sudo ln /usr/lib64/atlas/libcblas.so.3.0 /usr/lib64/libcblas.so
sudo ln -s /usr/lib64/atlas/libatlas.so.3.0 /usr/lib64/libatlas.so
But I guess more proper method is to set Makefile.config (the CBLAS path). (I thought the default path will do away with it reading the comment saying so, but it did not.) Hope this helps anyone.

Octave not compiling, confused by build error

I'm a modest user of Linux; but I appear to have hit a wall here when building Octave.
I need to use Octave 4.0.0 on (64-bit) Ubuntu 14.04, and it seems the only option for me (so far) is to build from source (as the repos apparently don't offer anything prebuilt for this version yet). Anyway, I do
./configure
make
...and then get this:
/usr/bin/ld: /usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-analyze.o): relocation R_X86_64_32 against `.gomp_critical_user_GM_GetImageDepthCallBack' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libGraphicsMagick.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
I figured this was because my graphicsmagick install wasn't build with -fPIC. So I downloaded graphicsmagick and did
./configure --with-shared
and built out a new graphicsmagick (make install). Still the same error. So I tried to "force it" by doing the following to graphicsmagick:
./configure CCSHARED="-fPIC" CXXFLAGS="-fPIC"
This time I did a search within the generated Makefile and found -fPIC was, indeed, added to the CXXFLAGS. But after making and install the new graphicsmagick, I still get the same error.
This seems like a build chain problem that I've caused. Any thoughts?
Try with:
./configure --enable-shared --disable-static

Unable to compile mysql-proxy into an rpm

I am trying to compile and package mysql-proxy-0.8.4.tar.gz into rpm. I followed the instructions to build
[root#localhost mysql-proxy]# rpmbuild -ta --clean mysql-proxy-0.8.4.tar.gz
I get this error
checking which pkg-config file to use to find Lua... configure: error: MySQL Proxy can't be built using --without-lua, lua 5.1 is required
error: Bad exit status from /var/tmp/rpm-tmp.r6iTWn (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.r6iTWn (%build)
I checked my build machine and I have all the build dependencies, I can see that pkg-config listing lua libraries
[root#localhost mysql-proxy]# pkg-config --list-all | less
lua Lua - An Extensible Extension Language
Could someone let me know what am I missing?
That error is telling you that you might need to pass --with-lua to rpmbuild when you build the package.
You also, as #hjpotter92 was getting at, likely need to install the lua-devel package to go along with the lua package.
Try installing that first and then re-running your command and see if the error changes.

facing /usr/lib/libpcap.so: undefined reference to `pcap_lex' while running make command nprobe

I am trying to install nprobe on my system when i followed the following steps
git clone https://github.com/xrl/nprobe.git
sudo apt-get install libpcap-dev
cd nprobe/plugsins
./buildMakefile.sh >Makefile.in
cd ..
./autogen.sh
./configure
make
all above commands run absolutely fine but when i try to run make its give me the following error.
usr/lib/libpcap.so: undefined reference to `pcap_lex'
collect2: ld returned 1 exit status
Yeah... we came across this with our netflow exporter. You need to have flex installed (the GNU implementation of UNIX lex). You'll probably also need to install bison, and I think it might use m4 too.
It seems that not only libpcap-devel need to be installed, but also libpcap.