红联Linux门户
Linux帮助

在py-faster-rcnn/lib里make时报错: unrecognized command line

发布时间:2016-08-19 16:45:23来源:linux网站作者:wuzuyu365
在py-faster-rcnn/lib里make时报错:
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/nms/nms_kernel.o build/temp.linux-x86_64-2.7/nms/gpu_nms.o -lcudart -o /home/wzy/py-faster-rcnn/lib/nms/gpu_nms.so  
c++: 错误: unrecognized command line option ‘-Wdate-time’  
c++: 错误: unrecognized command line option ‘-fstack-protector-strong’  
c++: 错误: unrecognized command line option ‘-Wdate-time’  
c++: 错误: unrecognized command line option ‘-fstack-protector-strong’  
error: command 'c++' failed with exit status 1  
 
突然想到之前装cuda时gcc版本过高降低了的,现在可能是要改回去。
root@wzy-ubuntu:/usr/bin# ls gcc*  
gcc      gcc-5   gcc-ar-4.7  gcc-nm      gcc-nm-5    gcc-ranlib-4.7  
gcc-4.7  gcc-ar  gcc-ar-5    gcc-nm-4.7  gcc-ranlib  gcc-ranlib-5  
root@wzy-ubuntu:/usr/bin# rm gcc   
root@wzy-ubuntu:/usr/bin# ln -s gcc-5 gcc   
root@wzy-ubuntu:/usr/bin# rm g++  
root@wzy-ubuntu:/usr/bin# ln -s g++-5 g++  
root@wzy-ubuntu:/usr/bin# ls  
 
然后make,貌似好了。
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -Ipycocotools -I/usr/include/python2.7 -c pycocotools/_mask.c -o build/temp.linux-x86_64-2.7/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99  
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/pycocotools/maskApi.o build/temp.linux-x86_64-2.7/pycocotools/_mask.o -o /home/wzy/py-faster-rcnn/lib/pycocotools/_mask.so  
rm -rf build
 
本文永久更新地址:http://www.linuxdiyf.com/linux/23450.html