-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add build script and LIBC_PATH environ variable #17
Conversation
This helps building binaries with alternate libc, in particular musl
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR! This was actually fixed upstream and we just need to update libc to pick up the change. We haven't updated yet because there was a breaking change in liblibc. |
@alexcrichton So how do you recommend to build libc now? It's also not clear what stops you to update now? Is it incompatibility in "nix" crate? And when do you plan to upgrade? |
Lack of time to deal with this right now stops the update unfortunately. |
Add build script for GNU make, which compiles (but doesn't work yet)
Sync to rust-lang/libc branch master
# This is the 1st commit message: chore: add labels to FIXMEs # This is the commit message rust-lang#2: change label for .field FIXMEs # This is the commit message rust-lang#3: add fixme csv # This is the commit message rust-lang#4: Update fixmes.csv # This is the commit message rust-lang#5: Update fixmes.csv # This is the commit message rust-lang#6: Update fixmes.csv # This is the commit message rust-lang#7: Update fixmes.csv # This is the commit message rust-lang#8: Update fixmes.csv # This is the commit message rust-lang#9: Update fixmes.csv # This is the commit message rust-lang#10: Update fixmes.csv # This is the commit message rust-lang#11: Update fixmes.csv # This is the commit message rust-lang#12: Update fixmes.csv # This is the commit message rust-lang#13: Update fixmes.csv # This is the commit message rust-lang#14: Update fixmes.csv # This is the commit message rust-lang#15: Update fixmes.csv # This is the commit message rust-lang#16: Update fixmes.csv # This is the commit message rust-lang#17: Update fixmes.csv # This is the commit message rust-lang#18: updates to csv # This is the commit message rust-lang#19: Update fixmes.csv # This is the commit message rust-lang#20: Update fixmes.csv # This is the commit message rust-lang#21: Update fixmes.csv # This is the commit message rust-lang#22: Update fixmes.csv remove hurd" # This is the commit message rust-lang#23: Update fixmes.csv remove "'s
Well, the solution here is probably not optimal. But it's the easiest way I've found so far to build libc (as dependency) for
x86_64-unknown-linux-musl
.The problem is that when building with musl, the target libc is not the one in default path. So I get output similar to:
According to cargo docs the
build.rs
script is there suited to find dependencies (or sometimes build one if not found). So with this script setting env var toLIBC_PATH=/usr/local/musl/lib
I can now build my project.Any other ideas of how to build the lib are appreciated.