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

ModelProto::ParseFromIstream missing #6

Closed
mrzealot opened this issue Jan 24, 2021 · 4 comments
Closed

ModelProto::ParseFromIstream missing #6

mrzealot opened this issue Jan 24, 2021 · 4 comments

Comments

@mrzealot
Copy link

Hi! I'm trying to compile this repo, but get the following message when running make:

src/main.cc:34:13: error: ‘class onnx::ModelProto’ has no member named ‘ParseFromIstream’; did you mean ‘ParseFromString’?

I'm not really familiar with ProtoBuf stuff (or ONNX, for that matter), but I did everything like the readme suggests, dependencies installed, submodules at their respective commits. Any idea what I'm missing?

@kraiskil
Copy link
Owner

Sounds like a ProtoBuf version mismatch. I'm not too familiar with it either - it is just a ONNX requirement.
Which OS are you on, and which version of ProtoBuf do you have installed? Recently tested are Ubuntu 16.04, 20.10 and MacOS BigSur - all with their "default" versions of ProtoBuf.

@kraiskil
Copy link
Owner

I wrote too hastily. Master branch was indeed broken on 0186da3 on Ubuntu 16.04 (when building clean - which I didn't, so I didn't notice it was broken), and I could repeat the problem you saw.
The fix is to modify onnx/onnx/onnx.proto (remove the last line), and rebuild. I added a note on this into the readme.md. Hope this fixes it for you too.

@mrzealot
Copy link
Author

Excellent, this fixes it indeed! Thanks a bunch!

@mrzealot
Copy link
Author

Just for the sake of completeness, lsb_release -a says:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

apt says:

libprotobuf-dev = (3.6.1.3-2ubuntu5).
protobuf-compiler = (3.6.1.3-2ubuntu5).

cmake says:

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/onnx2c/build

So whatever change made it work out of the box should have happened between Ubuntu 20.04 and 20.10...

lmoneta pushed a commit to lmoneta/root that referenced this issue Aug 9, 2021
lmoneta pushed a commit to root-project/root that referenced this issue Aug 10, 2021
pzhristov pushed a commit to alisw/root that referenced this issue Aug 27, 2021
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