-
Notifications
You must be signed in to change notification settings - Fork 0
/
caffe编译问题
38 lines (38 loc) · 3.28 KB
/
caffe编译问题
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
一、基于ubuntu自带的python2.7,基本无问题,很好编译。
二、基于anconda3的python3:
重要的事情说三遍、重要的事情说三遍、重要的事情说三遍:
一定要用conda install安装依赖、一定要用conda install安装依赖、一定要用conda install安装依赖
1.路径问题:修改Makefile.config中python路径,
ANACONDA_HOME := /home/wangzhaoming/anaconda3
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python3.7m \
$(ANACONDA_HOME)/lib/python3.7/site-packages/numpy/core/include
如果编译遇到protobuf问题,
If you have installed anaconda other than python only,
you should install other lib through conda install XXX other than pip install XXX.
也就是不要pip安装protobuf,这样还是会链接系统自带的protobuf,而conda install protobuf,就会链接到anaconda目录下的protobuf。
protoc --version 发现目前系统的protoc,
whereis protoc发现其实系统中有两个版本的protoc 分别在: usr/bin 和 $HOME/anaconda/bin里面
使用 $ protoc --version 命令可查看当前protoc版本
使用$ which protoc 命令可查看protoc的安装位置。
2.问题:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFReadEncodedTile@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFReadRGBATile@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFRGBAImageOK@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFOpen@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFSetWarningHandler@LIBTIFF_4.0'
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_unparse_lower@UUID_1.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libopencv_highgui.so: undefined reference to `TIFFSetErrorHandler@LIBTIFF_4.0'
解决方法:conda uninstall libtiff
3.问题:CXX/LD -o .build_release/tools/convert_dec_data.bin
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0'
//usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to `uuid_unparse_lower@UUID_1.0'
collect2: error: ld returned 1 exit status
Makefile:628: recipe for target '.build_release/tools/convert_dec_data.bin' failed
make: *** [.build_release/tools/convert_dec_data.bin] Error 1
解决方法:conda install -c conda-forge xorg-libsm