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 doesn't seem to be fully static #1

Closed
r-darwish opened this issue Apr 22, 2016 · 3 comments
Closed

Binary doesn't seem to be fully static #1

r-darwish opened this issue Apr 22, 2016 · 3 comments

Comments

@r-darwish
Copy link

First of all, thanks for this image.

When trying to compile this project using docker run --rm -it -v "$(pwd)":/home/rust/src ekidd/rust-musl-builder cargo build --release the resulted binary doesn't seem to be static:

$ ldd transporter
    linux-vdso.so.1 (0x00007ffe895f1000)
    libc.so => not found
$ ./transporter
-bash: ./transporter: /lib/ld64.so.1: bad ELF interpreter: No such file or directory

I'm probably doing something wrong here, but I couldn't figure out what is it

@emk
Copy link
Owner

emk commented Apr 22, 2016

I poked at this for a bit, and it looks like one of your dependencies is linking to the dynamic copy of libc:

$ readelf -a ./target/x86_64-unknown-linux-musl/debug/transporter | grep 'Shared library'
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]

This might be a build.rs script in a crate somewhere that isn't portable enough, or something else of that nature. I don't think it appears in any of the hyper dependencies, because programs using hyper worked fine for me a couple of weeks ago. So to find this, we're going to need to look at your non-hyper dependencies, and see if one of them is misbehaving.

I haven't figured out a really efficient way to track errors like this down yet, unfortunately.

@r-darwish
Copy link
Author

Thank you. I'll try to track down which dependency is causing this

@r-darwish
Copy link
Author

It seems that my raven library is causing this, maybe to due to the libc dependency, so it's probably not a problem with your image. However, do you happen to know what should be changed in raven in order for it to be able to compile with MUSL?

emk pushed a commit that referenced this issue Mar 25, 2018
Added ARMhf build info to README
jeff-hiner added a commit to jeff-hiner/rust_cross that referenced this issue Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants