I am building gRPC C++ for my application on Ubuntu 22.04. I am also including an existing library that already embeds a gRPC server. I am using the same version (v1.54.2) of gRPC as the one embedded in the existing library.
I am using CMAKE to build my application and I am getting the following error when I launch the built binary
ERROR: Inconsistency between flag object and registration for flag 'grpc_experiments', likely due to duplicate flags or an ODR violation. Relevant files: home/dell/github/grpc/src/core/lib/config/config_vars.cc and /opt/grpc/src/src/core/lib/config/config_vars.cc
[1] + Done "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-eytpkfgb.rs5" 1>"/tmp/Microsoft-MIEngine-Out-k00b0pg3.vme"
I have tried using the hello world example proto from gRPC repo and I noticed that whenever I comment out the line to create GreeterServiceImpl service;
(and of course everything follows) then the application runs fine.