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

Protoc 2.6.1 - Unrecognized syntax identifier "proto3". This parser only recognizes "proto2". #579

Closed
AppVineyard opened this issue Jul 9, 2015 · 12 comments

Comments

@AppVineyard
Copy link

I've been trying to setup an 'EC2 - g2.2xlarge' environment to do some "deep dream" testing and utilize the nvidia CUDA GPU benefits. Problem is I can't get past the setup for protobuf in python. I've followed the instruction all the way the point of :

  1. Build and run the tests:

$ python setup.py build

The problem is I get the following output when I run the command above:

Terminal Log:

(venv)ubuntu@ip-XXXX:/protobuf/protobuf-3.0.0-alpha-3/python$ protoc --version
libprotoc 2.6.1
(venv)ubuntu@ip-XXXX:
/protobuf/protobuf-3.0.0-alpha-3/python$ python setup.py build
running build
running build_py
Generating google/protobuf/map_unittest_pb2.py...
google/protobuf/map_unittest.proto:31:10: Unrecognized syntax identifier "proto3". This parser only >recognizes "proto2".
(venv)ubuntu@ip-XXXX:~/protobuf/protobuf-3.0.0-alpha-3/python$

I can't figure out for the life of me what is causing the problem. I read on other websites similar problems but no solutions except for "Your protoc is out of date. You need to update it." From what I know version 2.6.1 is the latest version.....therefore I am stumped. Apprecaite any help or insight anyone has.

@skybrian
Copy link

skybrian commented Jul 9, 2015

protoc 2.6.1 is the latest stable version, but it won't work. It doesn't support the "proto3" language yet. You need to use an alpha release of protoc 3.0. (I don't think Ubuntu has it yet so maybe you need to compile it from source?)

@AppVineyard
Copy link
Author

Oh thay makes more sense. @skybrian

Is there a tutuorial on how to compile from the source?

@AppVineyard
Copy link
Author

Actually nevermind I figured it out. Thanks for the insight @skybrian

@nitinkash
Copy link

@AppVineyard I am having the same issue, could you please help me out as to what you did to solve the issue.

@collectvic
Copy link

I have the same issue , have you got the solution?

@collectvic
Copy link

Hello, we can this page to find the solution: #368 (comment)

@shahbhoomi
Copy link

shahbhoomi commented Jun 28, 2016

Hi i am having the same error "Unrecognized syntax identifier "proto3". This parser only recognizes "proto2"." while doing this:
To generate the client and server side interfaces:

$ ./run_codegen.sh
Which internally invokes the protocol buffer compiler as:

$ protoc -I ../../protos --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=which grpc_python_plugin ../../protos/helloworld.proto
@AppVineyard
Did anyone find the solution and can help me please?

@skybrian
Copy link

If you want to use proto3, you will need to upgrade your protobuf software to version 3. For a Mac you can get it from here:

https://github.com/google/protobuf/releases

It may also be available through Homebrew or Linux distros.

@SravyaKeerthana
Copy link

Hi,

On the Compilation of openairinterface develop-nb-iot branch,the following errors are occurring:

The commands used after downloading the develop branch:

cd openairinterface-develop-nb-iot
source oaienv
cd cmake_targets
./build_oai -I

Error:

t/issue330/issue330.proto:1:10: Unrecognized syntax identifier "proto3". This parser only recognizes "proto2".
Makefile:2417: recipe for target 't/issue330/issue330.pb-c.h' failed
make: *** [t/issue330/issue330.pb-c.h] Error 1
make: *** Waiting for unfinished jobs....
t/issue330/issue330.proto:1:10: Unrecognized syntax identifier "proto3". This parser only recognizes "proto2".
Makefile:2417: recipe for target 't/issue330/issue330.pb-c.c' failed
make: *** [t/issue330/issue330.pb-c.c] Error 1

The errors are occuring while it is trying to compile the protobuf-c of version 2.6.1
What can be the solution?

regards,
Sravya Keerthana R

@acozzette
Copy link
Member

@SravyaKeerthana You will need to use protoc 3.0 or higher if you're working with .proto files that have syntax = "proto3".

@SravyaKeerthana
Copy link

Can I know how to update the protoc version from 2.6.1 to protoc 3.0 ?

@acozzette
Copy link
Member

You can download a protoc binary from our releases page here: https://github.com/protocolbuffers/protobuf/releases

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

7 participants