Skip to content

MUSL build fails on OSX #259

@edmundlth

Description

@edmundlth

Hello,

I have been trying cargo build on rust-htslib:

$ git clone --recursive https://github.com/rust-bio/rust-htslib.git
$ cd rust-htslib 
$ cargo build

which output a whole lot warning on the c source code and a fatal

    error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/hts-sys-bf3eaa6abc104e1b/out/htslib" "-I" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/libz-sys-7c94d09687ec3ebf/out/include" "-I" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/bzip2-sys-1b34115e67e42ca9/out/include" "-I" "/Users/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.16/xz-5.2/src/liblzma/api" "-I" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/curl-sys-6886d1c85d5521de/out/include" "-Wall" "-Wextra" "-o" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/hts-sys-bf3eaa6abc104e1b/out/htslib/sam.o" "-c" "/Users/admin/Desktop/MGHA_bioinformatics/PROJECT_rust_bio/rust-htslib/target/debug/build/hts-sys-bf3eaa6abc104e1b/out/htslib/sam.c" with args "cc" did not execute successfully (status code exit code: 1).

I have also tried

$ brew install FiloSottile/musl-cross/musl-cross
$ brew install bzip2 zlib xz curl-openssl
$ cross build

with the same result.

However, cross build --target x86_64-unknown-linux-musl does work.

Other info:

  • OS: MacOS Catalina 10.15.6
$ cc --version
Apple clang version 12.0.0 (clang-1200.0.31.1)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions