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

Add statically compiled protoc to release artifacts #12063

Closed
malt3 opened this issue Feb 27, 2023 · 0 comments
Closed

Add statically compiled protoc to release artifacts #12063

malt3 opened this issue Feb 27, 2023 · 0 comments
Labels

Comments

@malt3
Copy link

malt3 commented Feb 27, 2023

What language does this apply to?

n/a

Describe the problem you are trying to solve.

protoc is a common build tool in different environments, including bazel projects via rules_proto.
Protoc depends on gnu standard libraries at runtime:

ldd /home/USER/.cache/bazel/_bazel_USER/f83094fca0f0f2ee3451f9caccc3e2f4/execroot/__main__/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/com_google_protobuf_protoc_linux_x86_64/protoc.exe
        linux-vdso.so.1 (0x00007fffb5bb3000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f3627ff3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f3627f13000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f3627c00000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f3627ef9000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f3627800000)
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f3627ffa000)

Some environments do not provide a glibc and libstc++ globally. Those include alpine linux and NixOS.
Using rules_proto / protoc in those environments is very hard and requires custom patches.

Describe the solution you'd like

Release artifacts of this repository should either be compiled statically by default or an extra, static version of the release artifacts should be added.
I tried this quickly by patching the bazel workspace of this repository to use musl and link protoc statically and it works.

Describe alternatives you've considered

Alternatively, users of protoc have to provide their own protoc binary which leads to outdated versions of protoc being vendored.

Additional context
Add any other context or screenshots about the feature request here.

@malt3 malt3 added the untriaged auto added to all issues by default when created. label Feb 27, 2023
copybara-service bot pushed a commit that referenced this issue Feb 27, 2023
copybara-service bot pushed a commit that referenced this issue Feb 27, 2023
copybara-service bot pushed a commit that referenced this issue Feb 27, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
copybara-service bot pushed a commit that referenced this issue Feb 28, 2023
deannagarcia pushed a commit to deannagarcia/protobuf that referenced this issue Feb 28, 2023
@googleberg googleberg removed the untriaged auto added to all issues by default when created. label Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants