Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何在Linux上编译源码? #69

Closed
Igamegum opened this issue Aug 1, 2017 · 10 comments
Closed

请问如何在Linux上编译源码? #69

Igamegum opened this issue Aug 1, 2017 · 10 comments

Comments

@Igamegum
Copy link

Igamegum commented Aug 1, 2017

我直接操作如下
1. cd ncnn 2. mkdir build && cd build 3. cmake .. 4. make

make 的时候报错如下
[ 90%] Linking CXX executable ncnn2mem [ 90%] Built target ncnn2mem make[2]: *** No rule to make target '../tools/PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND', needed by 'tools/caffe.pb.cc'. Stop. CMakeFiles/Makefile2:179: recipe for target 'tools/CMakeFiles/caffe2ncnn.dir/all' failed make[1]: *** [tools/CMakeFiles/caffe2ncnn.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

@nihui
Copy link
Member

nihui commented Aug 1, 2017

需要先安装protobuf devel

@BiranLi
Copy link

BiranLi commented Aug 1, 2017

少了protobuf-compiler

@Igamegum
Copy link
Author

Igamegum commented Aug 2, 2017

已解决,谢谢

@nihui nihui closed this as completed Aug 2, 2017
@522730312
Copy link

install opencv for building example 的时候遇到这么一个问题:ncnn/examples/fasterrcnn.cpp:3:33: fatal error: opencv2/core/core.hpp: 没有那个文件或目录

@creat2012
Copy link

已解决,谢谢

一样的问题, 请问是如何解决的?

@spaul13
Copy link

spaul13 commented Apr 29, 2019

Did anyone (@522730312, @creat2012) solve this issue? I am also getting the same problem of opencv2/core/core.hpp file not found.

@yuzhengfa
Copy link

ubuntu@6f2da8572426:/MyFiles/INT8/ncnn/build/examples$ ./squeezenet test.jpg
ModelBin read weight_data failed 0
layer load_model 22 failed
Segmentation fault (core dumped)
ubuntu@6f2da8572426:
/MyFiles/INT8/ncnn/build/examples$

@yuzhengfa
Copy link

make编译出现以下问题:
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Warning: File 'examples/CMakeFiles/peleenetssd_seg.dir/flags.make' has modification time 98 s in the future
[ 96%] Building CXX object examples/CMakeFiles/peleenetssd_seg.dir/peleenetssd_seg.cpp.o
/home/ubuntu/MyFiles/INT8/ncnn/examples/peleenetssd_seg.cpp: In function ‘void draw_objects(const cv::Mat&, const std::vector&, ncnn::Mat)’:
/home/ubuntu/MyFiles/INT8/ncnn/examples/peleenetssd_seg.cpp:97:53: error: in C++98 ‘color’ must be initialized by constructor, not by ‘{...}’
std::vector color = {128,255,128,244,35,232};
^
/home/ubuntu/MyFiles/INT8/ncnn/examples/peleenetssd_seg.cpp:97:53: error: could not convert ‘{128, 255, 128, 244, 35, 232}’ from ‘’ to ‘std::vector’
/home/ubuntu/MyFiles/INT8/ncnn/examples/peleenetssd_seg.cpp:150:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(color_index<color.size()) {
^
examples/CMakeFiles/peleenetssd_seg.dir/build.make:62: recipe for target 'examples/CMakeFiles/peleenetssd_seg.dir/peleenetssd_seg.cpp.o' failed
make[2]: *** [examples/CMakeFiles/peleenetssd_seg.dir/peleenetssd_seg.cpp.o] Error 1
CMakeFiles/Makefile2:436: recipe for target 'examples/CMakeFiles/peleenetssd_seg.dir/all' failed
make[1]: *** [examples/CMakeFiles/peleenetssd_seg.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@mumuyanyan
Copy link

已解决,谢谢

你好,同样在问题,请问如何解决

@jianbaba
Copy link

ubuntu@6f2da8572426:/MyFiles/INT8/ncnn/build/examples$ ./squeezenet test.jpg ModelBin read weight_data failed 0 layer load_model 22 failed Segmentation fault (core dumped) ubuntu@6f2da8572426:/MyFiles/INT8/ncnn/build/examples$

请问这个怎么解决的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants