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

v21.0 does not install all the required headers #10046

Closed
coryan opened this issue May 26, 2022 · 1 comment
Closed

v21.0 does not install all the required headers #10046

coryan opened this issue May 26, 2022 · 1 comment
Labels

Comments

@coryan
Copy link
Contributor

coryan commented May 26, 2022

What version of protobuf and what language are you using?

Version: v21.0
Language: C++

What operating system (Linux, Windows, ...) and version?

Linux, but I assume it affects all operating systems

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

 gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What did you do?

Compiled and installed Protobuf using CMake. To workaround #10045 I used the CMake FindProtobuf module.

What did you expect to see

I would expect a simple program that includes google/protobuf/message.h to compile.

What did you see instead?

The program does not compile with this error:

18 0.913 /usr/bin/c++    -MD -MT CMakeFiles/main.dir/test.cc.o -MF CMakeFiles/main.dir/test.cc.o.d -o CMakeFiles/main.dir/test.cc.o -c /var/tmp/build/test/test.cc
#18 0.913 In file included from /usr/local/include/google/protobuf/unknown_field_set.h:53,
#18 0.913                  from /usr/local/include/google/protobuf/generated_message_reflection.h:47,
#18 0.913                  from /usr/local/include/google/protobuf/message.h:124,
#18 0.913                  from /var/tmp/build/test/test.cc:1:
#18 0.913 /usr/local/include/google/protobuf/parse_context.h:45:10: fatal error: google/protobuf/endian.h: No such file or directory
#18 0.913    45 | #include <google/protobuf/endian.h>
#18 0.913       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
#18 0.913 compilation terminated.

Anything else we should know about your project / environment

You can use Dockerfile-2.txt to repro the problem, just run:

docker buildx build --progress plain -t test - <Dockerfile-2.txt
@zhangskz zhangskz changed the title v0.21 does not install all the required headers v21.0 does not install all the required headers May 26, 2022
@zhangskz zhangskz added the cmake label May 26, 2022
@acozzette
Copy link
Member

@coryan Thanks for the bug report! #10057 fixes this and the fix will be released in 21.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants