can't find libjpeg.so.8 while compling caffe (under py-faster-rcnn/caffe-fast-rcnn) when it's there

820 views
Skip to first unread message

Chan Kim

unread,
Jan 23, 2016, 2:35:59 AM1/23/16
to Caffe Users
Hi,
I've succeeded this path a couple of days ago but somehow doing it again, but me with this trouble.
while compiling, when I do 'make all'
I see
...
CXX/LD -o .build_release/tools/net_speed_benchmark.bin
CXX/LD -o .build_release/tools/caffe.bin
/usr/bin/ld: warning: libjpeg.so.8, needed by /home/ckim/anaconda2/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libpng16.so.16, needed by /home/ckim/anaconda2/lib/libopencv_highgui.so, not found (try using -rpath or -rpath-link)
/home/ckim/anaconda2/lib/libopencv_highgui.so: undefined reference to `png_set_filter@PNG16_0'
/home/ckim/anaconda2/lib/libopencv_highgui.so: undefined reference to `png_get_IHDR@PNG16_0'
...
/home/ckim2/anaconda2/lib/libopencv_highgui.so is looking for libjpeg.so.8. 
Actually the libjpeg.so.8 file (it's a symbolic link pointing to libjpeg.so.8.4.0 in the same location /home/ckim2/anaconda2/lib/)

inside Makefile.config,
ANACONDA_HOME := $(HOME)/anaconda2
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
        $(ANACONDA_HOME)/include/python2.7 \
        $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
and the Makefile includes this Makefile.config

I dont't know why the compiler can't find the libjpeg8.so file when it's in the lib path, and also I don't know how to use -rath or -rpath-link.
Can anyone help me?
I'm doing it on CentOS6.7.
Thanks,
Chan

Chan Kim

unread,
Jan 23, 2016, 3:41:02 AM1/23/16
to Caffe Users
I solved it by adding entry for anaconda lib directory using /etc/ld.so.conf (and lower directory).
But I'm seeing new error saying..
..
XX/LD -o .build_release/examples/mnist/convert_mnist_data.bin
CXX/LD -o .build_release/examples/cifar10/convert_cifar_data.bin
CXX/LD -o .build_release/examples/siamese/convert_mnist_siamese_data.bin
/home/ckim/anaconda2/lib/libpng16.so.16: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
collect2: ld returned 1 exit status
/home/ckim/anaconda2/lib/libpng16.so.16: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
collect2: ld returned 1 exit status
/home/ckim/anaconda2/lib/libpng16.so.16: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
collect2: make: *** [.build_release/tools/device_query.bin] Error 1
ld returned 1 exit status
...
libpng16.so.16 calls inflateReset2@ZLIB_1.2.3.4. I can see inflateReset2 function is in ~/anaconda2/lib/libz.so.
That lib directory is in the -L option (using PYTHON_LIB) and ld also knows the path.
How can I fix this?

S.Majid Azimi

unread,
Jan 23, 2016, 9:59:42 AM1/23/16
to Chan Kim, Caffe Users
regarding the first problem installing jpeg by anaconda would resolve the issue. you have to make sure you have library path of anaconda included in the make file as well as include path which you've shown here.

regarding the second problem I had this issue before I resolved it by installing a libpng15 and put it in a folder in anaconda library and adding its path in bash file.

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/2a59ce19-d3cc-468b-bd93-4adbb118b3f8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages