getting enum value name(STOP) conflict between controlSim.proto and coordinatorService.proto when using protoc compiling proto files in 'msgs' directory(txSimDSK_linux)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 465
- Forks
- 122
- PR merge metrics
- No merged PRs in 30d
Description
After building txSimGradingSDK_linux, I get libtxSimGradingExternal.so.
Importing the external grading algorithm to TADsim with dynamic library way.
Run a scenario in TAD sim, the external grading algorithm log terminal getting the following message:
path: /opt/tadsim/resources/app/service/txsim-module-launcher
arg0: "/opt/tadsim/resources/app/service/txsim-module-launcher"
arg1: "Ego_001-custom_grading"
arg2: "/home/xxx/Desktop/TAD-sim-Ubuntu/txSimGradingSDK_linux/build/bin/libtxSimGradingExternal.so"
arg3: "127.0.0.1:21302"
[libprotobuf FATAL google/protobuf/stubs/common.cc:76] This program requires version 3.13.0 of the Protocol Buffer runtime library, but the installed version is 3.12.4. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/build/common/message/build/grading_report.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.13.0 of the Protocol Buffer runtime library, but the installed version is 3.12.4. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/build/common/message/build/grading_report.pb.cc".)
But building txSimSDK_linux, I getting
Importint the excutable to TAD sim, the log terminal message is expected.like this:
path: /home/xxx/Desktop/TAD-sim-Ubuntu/txSimSDK_linux/example/build/bin/my-module-main
arg0: "/home/xxx/Desktop/TAD-sim-Ubuntu/txSimSDK_linux/example/build/bin/my-module-main"
arg1: "--ip_addr_port"
arg2: "127.0.0.1:21302"
name:127.0.0.1:21302
module:0x5c58f2330db0
address:
Module 127.0.0.1:21302 connected to TAD Sim @ tcp://127.0.0.1:21302
=======================================
the TAD sim, txSimGradingSDK_linux and txSimSDK_linux download from here.
running enviroment as follow:
- system: Ubuntu22.04
- protobuf : 3.12.4
Why txSimSDK_linux example running without error, but txSimGradingSDK_linux example running with error message?
And I can not find the error message mentioned file '/build/common/message/build/grading_report.pb.cc'.
Given error message, 'If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. ', would the error disappear if i use my protoc (3.12.4) to complie all tadsim proto and replace with new generated files?
Another problem is that when i try complie all proto file, getting the following error log:
Ubuntu/txSimSDK_linux/msgs/*.proto
coordinatorService.proto:29:3: "sim_msg.RESET" is already defined in file "controlSim.proto".
coordinatorService.proto:29:3: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "RESET" must be unique within "sim_msg", not just within "Command".
coordinatorService.proto:32:3: "sim_msg.PAUSE" is already defined in file "controlSim.proto".
coordinatorService.proto:32:3: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "PAUSE" must be unique within "sim_msg", not just within "Command".
coordinatorService.proto:33:3: "sim_msg.STOP" is already defined in file "controlSim.proto".
coordinatorService.proto:33:3: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "STOP" must be unique within "sim_msg", not just within "Command".
compile command: 'protoc --proto_path=/home/xxx/Desktop/TAD-sim-Ubuntu/txSimSDK_linux/msgs --cpp_out=./cpp_proto_build /home/xxx/Desktop/TAD-sim-Ubuntu/txSimSDK_linux/msgs/*.proto'
Any help will be appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Protocol Buffer versions used to build txSimGradingSDK_linux and txSimSDK_linux, then inspect the generated grading_report.pb.cc path shown in the runtime error. Reproduce the protoc command against msgs/controlSim.proto and coordinatorService.proto, and verify the result against the Ubuntu 22.04 environment. Done means the grading SDK runs with matching runtime and generated files, and the reported enum conflicts are understood or resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100