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

Cross compiling from windows to linux-musl #33608

Closed
Diggsey opened this issue May 12, 2016 · 3 comments · Fixed by #33698
Closed

Cross compiling from windows to linux-musl #33608

Diggsey opened this issue May 12, 2016 · 3 comments · Fixed by #33698

Comments

@Diggsey
Copy link
Contributor

Diggsey commented May 12, 2016

It works! Almost.

rustc passes an additional library to the linker -lutils, which doesn't exist in the musl std package, and doesn't seem to be required. With that library removed, cross compiling to linux works out of the box with rustup (assuming you can obtain an elf linker...).

@sanmai-NL
Copy link

Do you propose to remove that linker option? May seem obvious, but you didn't state that.

@Diggsey
Copy link
Contributor Author

Diggsey commented May 16, 2016

Well I was hoping that someone could tell me whether utils is required for musl builds, or if its presence in the linker flags is a mistake.

Having looked into it, it seems to be the case that libutils for musl is just an empty library, but is still required in case we're linking with C code which expects to be able to link to it, so probably we should be including libutils as part of the rust package.

@alexcrichton
Copy link
Member

Added in rust-lang/libc#246 by accident I fixed in rust-lang/libc#287 but we unfortunately can't update until rust-lang/libc#291 lands (but hopefully that'll be soon!)

alexcrichton added a commit to alexcrichton/rust that referenced this issue May 17, 2016
Brings in a fix where `-lutil` is no longer passed for musl targets, lifting the
need for a musl toolchain to be installed again.

Closes rust-lang#33608
Manishearth added a commit to Manishearth/rust that referenced this issue May 19, 2016
std: Update libc submodule

Brings in a fix where `-lutil` is no longer passed for musl targets, lifting the
need for a musl toolchain to be installed again.

Closes rust-lang#33608
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

Successfully merging a pull request may close this issue.

3 participants