Skip to content

protobuf not building under /tmp due to sandboxing #22226

@oquenchil

Description

@oquenchil

Reported by @comius .

Repro:

cd /tmp
wget https://github.com/protocolbuffers/protobuf/releases/download/v27.0-rc1/protobuf-27.0-rc1.zip
unzip protobuf-27.0-rc1.zip
cd protobuf-27.0-rc1/examples/
bazel build //:all

Failure:

ERROR: /home/comius/.cache/bazel/_bazel_comius/ecd2c3661e608f19b46344e5624b778e/external/com_google_protobuf/src/google/protobuf/BUILD.bazel:238:11: Compiling src/google/protobuf/port.cc [for tool] failed: (Exit 1): gcc failed: error executing CppCompile command (from target @@com_google_protobuf//src/google/protobuf:port) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 26 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/com_google_protobuf/src/google/protobuf/port.cc:12:10: fatal error: google/protobuf/port_def.inc: No such file or directory
   12 | #include "google/protobuf/port_def.inc"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Target //:add_person_java failed to build

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)team-Local-ExecIssues and PRs for the Execution (Local) teamtype: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions