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

Binary releases don't work with musl libc #460

Open
juliusknorr opened this issue Mar 27, 2019 · 4 comments · Fixed by #844 · May be fixed by #903
Open

Binary releases don't work with musl libc #460

juliusknorr opened this issue Mar 27, 2019 · 4 comments · Fixed by #844 · May be fixed by #903

Comments

@juliusknorr
Copy link

juliusknorr commented Mar 27, 2019

I was trying to get krankerl working inside of a alpine docker container. However it seems the binary is not compatible with musl libc, which is default in alpine.

/usr/local/bin # ldd krankerl 
	/lib64/ld-linux-x86-64.so.2 (0x7fac0726c000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fac0726c000)
	ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7fac0683c000)
	libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 (0x7fac065ce000)
	libssl.so.1.0.0 => /lib/libssl.so.1.0.0 (0x7fac06365000)
	libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0x7fac05f46000)
	libz.so.1 => /lib/libz.so.1 (0x7fac05d2f000)
	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fac0726c000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fac0726c000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fac05b1d000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fac0726c000)
	libnghttp2.so.14 => /usr/lib/libnghttp2.so.14 (0x7fac058fc000)
	libssh2.so.1 => /usr/lib/libssh2.so.1 (0x7fac056d4000)
	libssl.so.45 => /lib/libssl.so.45 (0x7fac05488000)
	libcrypto.so.43 => /lib/libcrypto.so.43 (0x7fac050dd000)
Error relocating krankerl: __vsnprintf_chk: symbol not found
Error relocating krankerl: __fprintf_chk: symbol not found
Error relocating krankerl: __strncpy_chk: symbol not found
Error relocating krankerl: __rawmemchr: symbol not found
Error relocating krankerl: __fdelt_chk: symbol not found
Error relocating krankerl: __memcpy_chk: symbol not found
Error relocating krankerl: __register_atfork: symbol not found
Error relocating krankerl: __snprintf_chk: symbol not found
Error relocating krankerl: __res_init: symbol not found

Is there a way to make the binary compatible with the current build pipeline? 😉

@ChristophWurst
Copy link
Owner

Good point. I think I gave this a try in the beginnings of developing this tool but I forgot if (and if not then why) it worked with musl. Let me have another look.

@ChristophWurst ChristophWurst self-assigned this Apr 2, 2019
@ChristophWurst
Copy link
Owner

Okay, this is a bit complicated as stuff like openssl has to be compiled as well (obviously). So the simple approach like

PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --target=x86_64-unknown-linux-musl

won't quite work.

@ChristophWurst ChristophWurst removed their assignment Apr 2, 2019
@icewind1991
Copy link
Contributor

https://github.com/emk/rust-musl-builder includes musl versions of openssl (and some others) to allow for easy building

@Pytal
Copy link
Contributor

Pytal commented Dec 14, 2021

Could this be reopened @ChristophWurst @icewind1991? As I tried the binary from https://github.com/ChristophWurst/krankerl/releases on alpine and it doesn't seem to work, could be resolved by #903

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