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

[Request] Add musl/static builds to release assets, for easy installation on Alpine, etc. #4

Closed
AndydeCleyre opened this issue Jun 7, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@AndydeCleyre
Copy link

On Alpine, the prebuilt amd64 asset:

$ ldd /usr/local/bin/pacaptr
        /lib64/ld-linux-x86-64.so.2 (0x7f695f48c000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f695f48c000)
        librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f695f48c000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f695f48c000)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/local/bin/pacaptr)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f695f48c000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/bin/pacaptr)
Error relocating /usr/local/bin/pacaptr: _Unwind_Resume: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetRegionStart: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_SetGR: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetDataRelBase: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_RaiseException: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_FindEnclosingFunction: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetIP: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_Backtrace: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetIPInfo: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_GetTextRelBase: symbol not found
Error relocating /usr/local/bin/pacaptr: _Unwind_SetIP: symbol not found
@rami3l
Copy link
Owner

rami3l commented Jun 8, 2020

@AndydeCleyre Acknowledged!
Sorry for the inconvenience, but my finals are coming and I might be slow to respond. :(

@rami3l
Copy link
Owner

rami3l commented Jun 8, 2020

@AndydeCleyre I'm not familiar with this, but according to this issue, I think when the target is musl, the output binary should be fully static.

However I met this problem during the test for Alpine (you can see my test action for this repo). It seems that simply targeting musl won't work unless a dynamic binary output is specified. 🤔

@rami3l rami3l added the help wanted Extra attention is needed label Jun 8, 2020
@rami3l
Copy link
Owner

rami3l commented Jun 8, 2020

@AndydeCleyre Interesting issue...
It seems that I must cross-compile it using Ubuntu and target musl... (See here.)

@rami3l
Copy link
Owner

rami3l commented Jun 8, 2020

@AndydeCleyre I gave it a try in 5a366e3. Not sure if it's working or not, but I think this must be a good start (just tried to run pacaptr -h in my Docker container and it seems to be fine).

If you think that's OK then maybe we can close this issue very soon.

By the way, it seems that these two linux binaries are not compatible (the one built on ubuntu using gnu toolchain works fine with fedora, for example, but not with alpine, and I believe the same is true in another direction)... How may I distribute these binaries in a possibly more elegant way?

@rami3l rami3l removed the help wanted Extra attention is needed label Jun 9, 2020
@rami3l
Copy link
Owner

rami3l commented Jun 9, 2020

@AndydeCleyre Alright. This issue should be closed by f38cf01: I've replaced the original linux binary with a static musl binary.

Please feel free to comment if you encounter any problem.

@rami3l rami3l closed this as completed Jun 9, 2020
@rami3l rami3l added the enhancement New feature or request label Jun 9, 2020
@rami3l rami3l changed the title Request: Add musl/static builds to release assets, for easy installation on Alpine, etc. [Request] Add musl/static builds to release assets, for easy installation on Alpine, etc. Jun 9, 2020
@AndydeCleyre
Copy link
Author

Thanks!

Yes, this is fully static, and works great on 64 bit glibc and musl systems I've tested. Very handy.

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

No branches or pull requests

2 participants