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

Unhelpful error message when wrong version of protobuf #203

Open
WilliamTambellini opened this issue Jan 28, 2019 · 2 comments
Open

Unhelpful error message when wrong version of protobuf #203

WilliamTambellini opened this issue Jan 28, 2019 · 2 comments

Comments

@WilliamTambellini
Copy link

Hi
Menoh fails to compile probably because my local protobuf is too old :

$ cmake
...
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread (found version "2.5.0")
-- Found Protobuf: /usr/lib64/libprotobuf.so;-lpthread;-lpthread (found version "2.5.0")
...
cmake exits successfully

$ make
Scanning dependencies of target gen_onnx_proto
[ 1%] Running gen_proto.py on onnx/onnx.in.proto
Processing /home/wtambellini/repos/menoh/external/onnx/onnx/onnx.in.proto
Writing /home/wtambellini/repos/menoh/Debug/external/onnx/onnx/onnx.proto
Writing /home/wtambellini/repos/menoh/Debug/external/onnx/onnx/onnx.proto3
generating /home/wtambellini/repos/menoh/Debug/external/onnx/onnx/onnx_pb.py
[ 2%] Running C++ protocol buffer compiler on /home/wtambellini/repos/menoh/Debug/external/onnx/onnx/onnx.proto
onnx/onnx.proto:393:5: Expected "required", "optional", or "repeated".
onnx/onnx.proto:393:17: Missing field number.
onnx/onnx.proto:420:3: Expected "required", "optional", or "repeated".
onnx/onnx.proto:420:15: Missing field number.
make[2]: *** [external/onnx/onnx/onnx.pb.cc] Error 1
make[1]: *** [external/onnx/CMakeFiles/gen_onnx_proto.dir/all] Error 2
make: *** [all] Error 2

Yes, I know the md doc state protobuf 2.6.1, but should nt cmake simply assert/check the version of protoc/protobuf ?

I see in the main cmake :
find_package(Protobuf ${PROTOBUF_VERSION} REQUIRED)

but PROTOBUF_VERSION is not set so empty so not imposing any minimum version.
I could prepare a PR if you re ok to check protobuf version at cmake time.
Kind

@okdshin
Copy link
Contributor

okdshin commented Jan 29, 2019

Thank you for your report @WilliamTambellini and sorry for the trouble.
Checking at cmake time is suitable. We would like to take your PR.

@WilliamTambellini
Copy link
Author

ok I ll prepare a PR.

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

2 participants