-
Notifications
You must be signed in to change notification settings - Fork 79
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
Musl support for htslib 1.10.2 #193
Conversation
…port shipped into rust-htslib
…er compile time gotchas
…y with and for musl
…checks?check_run_id=518233498#step:5:253 is just a binutils bug according to https://bbs.archlinux.org/viewtopic.php?id=242682 and other sites...
@nlhepler @johanneskoester Looks like I'm at the last linking step and Do you have any good advice to fix that last thing up? The container has a full musl-cross-compiled toolchain with all the deps needed and I could compile
But I'm pretty sure there are much better ways to get this fixed properly? Any |
… CPPFLAGS and hopefully bypass clang/llvm errors?
…rrounded by quotes since there are spaces in the variables
Now I managed to compile all the way up to the rust-htslib$ cross build --target x86_64-unknown-linux-musl
(...)
running: "x86_64-linux-musl-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-static" "-fPIC" "-I" "/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-97a3fa03963e25fd/out/include" "-I" "/usr/local/include" "-o" "/target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out/wrapper.o" "-c" "wrapper.c"
exit code: 0
AR_x86_64-unknown-linux-musl = None
AR_x86_64_unknown_linux_musl = None
TARGET_AR = None
AR = Some("x86_64-linux-musl-ar")
running: "x86_64-linux-musl-ar" "crs" "/target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out/libwrapper.a" "/target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out/wrapper.o"
exit code: 0
cargo:rustc-link-lib=static=wrapper
cargo:rustc-link-search=native=/target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out
cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable
--- stderr
fatal: not a git repository: /target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out/htslib/../../.git/modules/htslib
fatal: not a git repository: /target/x86_64-unknown-linux-musl/debug/build/hts-sys-2bfd79b404a41047/out/htslib/../../.git/modules/htslib
./htslib/htslib/hts.h:31:10: fatal error: 'stddef.h' file not found
./htslib/htslib/hts.h:31:10: fatal error: 'stddef.h' file not found, err: true
thread 'main' panicked at 'Unable to generate bindings.: ()', hts-sys/build.rs:95:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
…al/musl/x86_64-linux-musl/include does not seem to help :/
…removing .cargo/config, not necessary
…uild on MUSL testing :)
@johanneskoester Seems to work now, but linting is happening outside |
…ously according to James and Rob from the htslib team
…will not be found
…container, way more lightweight and less messy build process, also includes MUSL as base compiler
…o be generalized later
…htslib compiles fine locally as well, no cross, just cargo
…support -> musl_support (refusing to allow an OAuth App to create or update workflow without scope)'
@johanneskoester Did you change any of the GitHub actions configuration for this repo recently (including personal access tokens)? I'm now getting the following when pushing to this branch (yesterday it was fine):
|
…sing build.env cross to passthrough that var
…musl_support (refusing to allow an OAuth App to create or update workflow...'
@johanneskoester Both MUSL and GNU are now working thanks to Cross and the docker containers under |
…nup the different Dockerfiles tested but no longer needed. build.rs now runs make clean before reconfiguring htslib for better reproducible builds
It turns out that the errors above where caused by having a HTTPS endpoint (which requires OAuth tokens now for Github Actions) instead of SSH. Switched to |
Awesome, ready for merging? |
@johanneskoester It is! The last small bit to "solve" would be to put Can be solved post-merge though since it's clearly mentioned on the README.md, I hope it doesn't generate too many issues from users. Merging then ;) |
This is a followup on #184 and #191 to restoring musl support for htslib 1.10.2 now that it requires openssl and curl (because of hfile_s3 et al).