HI, folks --
- Platform: Linux Ubuntu 22.04.2 LTS
- g++ : g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
- protoc: libprotoc 23.4
- protocol buffers: v23.4
I am very stuck in trying to use protoc to generate Python bindings using --python_out argument. I have also installed protobuf-v23.4/ headers in my /usr/include/google dir.
Am experimenting with this version and have to next try how the --pyi_out feature works.
The problem I have now is that the generated C++ pb.cc file is not compiling. The error is as shown below [1].
I have installed the libabsl-dev package, but am not finding the log/ sub-dir under /usr/include/absl .
Checking around there was some post that suggested to add these flags to the cc, but that did not help either: -D ABSL_BUILD_TESTING=ON -D ABSL_BUILD_TEST_HELPERS=ON -D ABSL_USE_EXTERNAL_GOOGLETEST=ON
My questions are:
- What may be the solution for this specific compilation issue I'm facing?
- What is the stable version of protoc / protocol buffers one can use to not run into this missing-header-file (absl) issue?
- Where are the how-to instructions to download a specific working version of protocol buffer? (I had to unzip the package and manually sudo cp'over the files to /usr/include ...)
- Is this feature support of generating python bindings using protoc --python_out --pyi_out stable? (I've gone through the tutorials.)
Thanks, in advance,
--AdityA>
[1] Compilation error:
compiling
certifier.pb.ccg++ -I ../include -I/usr/local/opt/openssl@1.1/include/ -I ./sev-snp -g -Wall -std=c++11 -Wno-unused-variable -D X64 -Wno-deprecated-declarations -O3 -D SEV_SNP -fpic -Wno-array-bounds -o ./certifier.pb.o -c
certifier.pb.ccIn file included from ../include/certifier.pb.h:24,
from
certifier.pb.cc:4:
/usr/include/google/protobuf/io/coded_stream.h:132:10: fatal error: absl/log/absl_check.h: No such file or directory
132 | #include "absl/log/absl_check.h"
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.