Tencent / ncnn

ncnn is a high-performance neural network inference framework optimized for the mobile platform
Other
20.24k stars 4.15k forks source link

make出错,疑似是protobuf的问题,Could not make proto path relative #5686

Closed qwert123q closed 4 weeks ago

qwert123q commented 4 weeks ago

detail | 详细描述 | 詳細な説明

报错代码: (base) tian@DESKTOP-RHO7G45:/mnt/f/wsl_tian/ncnn/build$ make -j4 [ 0%] Running cpp protocol buffer compiler on caffe.proto Consolidate compiler generated dependencies of target ncnnmerge Consolidate compiler generated dependencies of target mxnet2ncnn [ 0%] Built target ncnn-generate-spirv /mnt/f/wsl_tian/ncnn/tools/caffe: warning: directory does not exist. Could not make proto path relative: /mnt/f/wsl_tian/ncnn/tools/caffe/caffe.proto: No such file or directory make[2]: [tools/caffe/CMakeFiles/caffe2ncnn.dir/build.make:75: tools/caffe/caffe.pb.h] Error 1 make[1]: [CMakeFiles/Makefile2:1129: tools/caffe/CMakeFiles/caffe2ncnn.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 0%] Built target ncnnmerge [ 0%] Running cpp protocol buffer compiler on onnx.proto [ 1%] Built target mxnet2ncnn /mnt/f/wsl_tian/ncnn/tools/onnx: warning: directory does not exist. Could not make proto path relative: /mnt/f/wsl_tian/ncnn/tools/onnx/onnx.proto: No such file or directory make[2]: [tools/onnx/CMakeFiles/onnx2ncnn.dir/build.make:75: tools/onnx/onnx.pb.h] Error 1 make[1]: [CMakeFiles/Makefile2:1181: tools/onnx/CMakeFiles/onnx2ncnn.dir/all] Error 2 make: [Makefile:136: all] Error 2

这是第二次编译了,原本在96%左右位置报错,原因一样。 换了protobuf版本或者不安装protobuf都有这个情况,不知是不是这里出了问题。 明明有这些文件,却报错找不到,网上搜不到类似错误,请求大佬看看。

wzyforgit commented 4 weeks ago

你不转模型的话就在cmake阶段屏蔽掉转模型的工具

qwert123q commented 4 weeks ago

你不转模型的话就在cmake阶段屏蔽掉转模型的工具

谢谢回复,屏蔽后编译成功了,但是感觉这不是长久之计,请问出错原因是什么呢。环境是wsl2 ubuntu20.04 protobuf3.20.0 cmake3.22

wzyforgit commented 4 weeks ago

你不转模型的话就在cmake阶段屏蔽掉转模型的工具

谢谢回复,屏蔽后编译成功了,但是感觉这不是长久之计,请问出错原因是什么呢。环境是wsl2 ubuntu20.04 protobuf3.20.0 cmake3.22

一般我是直接apt install这个玩意儿的,实在不行就全部install上去=。= 其实能用上protobuf的也不多,caffe算一个远古时期的玩意儿,onnx目前又有pnnx可以弄,而pnnx是官方给你编好了一个全静态链接的文件,可以直接用,其它好像没了

qwert123q commented 4 weeks ago

你不转模型的话就在cmake阶段屏蔽掉转模型的工具

谢谢回复,屏蔽后编译成功了,但是感觉这不是长久之计,请问出错原因是什么呢。环境是wsl2 ubuntu20.04 protobuf3.20.0 cmake3.22

一般我是直接apt install这个玩意儿的,实在不行就全部install上去=。= 其实能用上protobuf的也不多,caffe算一个远古时期的玩意儿,onnx目前又有pnnx可以弄,而pnnx是官方给你编好了一个全静态链接的文件,可以直接用,其它好像没了

明白了,谢谢讲解