protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Many of the libprotoc related headers not exist in the /installprefix/include directory

Open junyang-zh opened this issue 3 years ago • 1 comments

What version of protobuf and what language are you using? Version: tested releases of v3.8.0 and v21.2 Language: C++

What operating system (Linux, Windows, ...) and version? Linux 5.4.19.bsk.2-amd64 #5.4.19.bsk.2 SMP Debian

What runtime / compiler are you using (e.g., python version or gcc version) llvm-clang11

What did you do? Steps to reproduce the behavior:

  1. Install protobuf and libprotoc
  2. Write a cc file that #include <google/protobuf/compiler/cpp/helpers.h>
  3. Implement my CodeGenerator
  4. Compile and link against libprotoc

What did you expect to see Produces my protoc plugin

What did you see instead?

cpp3rdlib/protobuf/include/google/protobuf/compiler/cpp/helpers.h:44:10: fatal error: 'google/protobuf/compiler/scc.h' file not found
#include <google/protobuf/compiler/scc.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommands failed.

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

When I checked files in my install prefix /usr/include/google/protobuf/compiler/cpp, I only had:

cpp_generator.h  file.h  generator.h  helpers.h  names.h

, which is fairly not enough.

junyang-zh avatar Jul 21 '22 07:07 junyang-zh

Seems like you are using Ninja to build? Can you provide more details on what your implementation looks like and how you are building?

zhangskz avatar Jul 22 '22 15:07 zhangskz

I suspect that upcoming build system work will interact with this and may even fix it

fowles avatar Sep 01 '22 18:09 fowles

I think this seems very specific to your use case. I'm going to close for now, if you still see this problem please provide a simple reproduction case.

deannagarcia avatar Sep 01 '22 19:09 deannagarcia