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

protobuf build for i686-unknown-linux-gnu fails in devcontainer #1194

Open
mzabaluev opened this issue Nov 24, 2024 · 0 comments
Open

protobuf build for i686-unknown-linux-gnu fails in devcontainer #1194

mzabaluev opened this issue Nov 24, 2024 · 0 comments

Comments

@mzabaluev
Copy link
Contributor

While the protobuf crate is built successfully with the default toolchain in the devcontainer on x86_64 Linux, trying to build it for the i686 architecture results in C++ compiler failures.

Steps to reproduce

  1. Enter the devcontainer shell in e.g. Visual Studio Code.
  2. Run rustup target install i686-unknown-linux-gnu 1.
  3. Run sudo apt-get install gcc-multilib g++-multilib 1.
  4. Run cargo test --target i686-unknown-linux-gnu -p tests.

Error output

Lots of C++ compiler errors, including:

   /workspaces/prost/third_party/protobuf/src/google/protobuf/test_messages_proto2.pb.cc:10781:24: error: ‘::PROTOBUF_NAMESPACE_ID’ has not been declared
  10781 |     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
        |                        ^~~~~~~~~~~~~~~~~~~~~
  /workspaces/prost/third_party/protobuf/src/google/protobuf/test_messages_proto2.pb.cc:10781:70: error: expected ‘,’ or ‘...’ before ‘*’ token
  10781 |     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
        |                                                                      ^

Other observations

Building with the x86_64 target has google::protobuf generated instead of PROTOBUF_NAMESPACE_ID in the *.pb.cc files.

Footnotes

  1. It would be nice to have these installed in the x86_64 devcontainer out of the box. 2

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

No branches or pull requests

1 participant