forked from sergei-ivanov/maven-protoc-plugin
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Invoke protoc in a way that works on NixOS Linux #108
Comments
Same here. |
same happens on Alpine Linux, which doesn't have glibc:
is there a workaround that uses system protoc? |
I got it running like so. I'm not a java buff, but the key is setting
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When protobuf-maven-plugin downloads a protoc binary, that binary expects the ELF interpreter to exist at
/lib64/ld-linux-x86-64.so.2
. Unfortunately, on NixOS,/lib64/ld-linux-x86-64.so.2
does not exist, because different applications are allowed to use different versions of the loader. This means invoking the protoc compiler fails.Describe the solution you'd like
I would like the maven plugin to detect the
NIX_CC
environment variable on Linux, and when it exists, explicitly invoke$NIX_CC/nix-support/dynamic-linker
to load the protoc binary. This is the solution/workaround used by protoc-bridge as well.Describe alternatives you've considered
patchelf
utility to fix up the downloaded binary. This is inconvenient, since it is somewhat obscure, and would need to be repeated each time thetarget
directory is clearedAdditional context
I understand this is something rather obscure. If you don't have objections againt the approach I'm happy to provide a PR implementing it.
The text was updated successfully, but these errors were encountered: