cargo:warning=couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
brainstorm opened this issue · 4 comments
Related issues: softprops/lambda-rust#53 rust-lang/backtrace-rs#86
I'm trying to cross-compile this crate for musl but so far I'm finding compile issues with all muslrust
, lambdaci
and lamda-rust
docker images, but it does compile locally on OSX:
$ cargo build --release --target x86_64-unknown-linux-musl
Finished dev [unoptimized + debuginfo] target(s) in 1.76s
On the other hand, here's the (failing) output with muslrust:
$ docker run -v $PWD:/volume --rm -t clux/muslrust cargo build
Unable to find image 'clux/muslrust:latest' locally
latest: Pulling from clux/muslrust
0a01a72a686c: Pull complete
cc899a5544da: Pull complete
19197c550755: Pull complete
716d454e56b6: Pull complete
cc2fa4ce2fea: Pull complete
069a6b39f1e3: Pull complete
f1ba2b4885a9: Pull complete
b54a539413d1: Pull complete
b8be703dae0a: Pull complete
1156374be0e9: Pull complete
b59035b32a9d: Pull complete
40e6f54354c2: Pull complete
48f82dcf98bc: Pull complete
Digest: sha256:97f4f4780639288dc10afabf16c3a115abb4663f3df328ae32f335081119c17c
Status: Downloaded newer image for clux/muslrust:latest
Updating crates.io index
Downloaded serde_json v1.0.45
Downloaded lambda_runtime v0.2.1
Downloaded tokio v0.1.22
Downloaded itoa v0.4.5
(...)
Downloaded maybe-uninit v2.0.0
Downloaded smallvec v1.2.0
Downloaded unicode-xid v0.1.0
Compiling libc v0.2.66
Compiling cfg-if v0.1.10
Compiling semver-parser v0.7.0
(...)
Compiling tokio-fs v0.1.6
Compiling tokio v0.1.22
Compiling lambda_runtime_client v0.2.2
error: failed to run custom build command for `rust-htslib v0.26.1`
Caused by:
process didn't exit successfully: `/volume/target/debug/build/rust-htslib-def38763f3f129c9/build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-musl")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-musl = None
CC_x86_64_unknown_linux_musl = None
TARGET_CC = None
CC = Some("musl-gcc")
CFLAGS_x86_64-unknown-linux-musl = None
CFLAGS_x86_64_unknown_linux_musl = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
echo '/* Default config.h generated by Makefile */' > config.h
echo '#define HAVE_LIBBZ2 1' >> config.h
echo '#define HAVE_LIBLZMA 1' >> config.h
echo '#define HAVE_LZMA_H 1' >> config.h
echo '#define HAVE_FSEEKO 1' >> config.h
echo '#define HAVE_DRAND48 1' >> config.h
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o kfunc.o kfunc.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o knetfile.o knetfile.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o kstring.o kstring.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o bcf_sr_sort.o bcf_sr_sort.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o bgzf.o bgzf.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o errmod.o errmod.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o faidx.o faidx.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o hfile.o hfile.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.9"' > version.h
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o hts.o hts.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o hts_os.o hts_os.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o md5.o md5.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o multipart.o multipart.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o probaln.o probaln.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o realn.o realn.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o regidx.o regidx.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o sam.o sam.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o synced_bcf_reader.o synced_bcf_reader.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o vcf_sweep.o vcf_sweep.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o tbx.o tbx.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o textutils.o textutils.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o thread_pool.o thread_pool.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o vcf.o vcf.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o vcfutils.o vcfutils.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_codecs.o cram/cram_codecs.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_decode.o cram/cram_decode.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_encode.o cram/cram_encode.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_external.o cram/cram_external.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_index.o cram/cram_index.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_io.o cram/cram_io.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_samtools.o cram/cram_samtools.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/cram_stats.o cram/cram_stats.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/files.o cram/files.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/mFILE.o cram/mFILE.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/open_trace_file.o cram/open_trace_file.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/pooled_alloc.o cram/pooled_alloc.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/rANS_static.o cram/rANS_static.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/sam_header.o cram/sam_header.c
musl-gcc -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -static -I /volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include -I /volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include -I /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api -I. -c -o cram/string_alloc.o cram/string_alloc.c
ar -rc libhts.a kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o
ranlib libhts.a
running: "musl-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-static" "-I" "/volume/target/x86_64-unknown-linux-musl/debug/build/libz-sys-87df8d74632487e5/out/include" "-I" "/volume/target/x86_64-unknown-linux-musl/debug/build/bzip2-sys-51abd0a51f271b1c/out/include" "-I" "/root/.cargo/registry/src/github.com-1ecc6299db9ec823/lzma-sys-0.1.15/xz-5.2/src/liblzma/api" "-o" "/volume/target/x86_64-unknown-linux-musl/debug/build/rust-htslib-4d52c3f3da17113f/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 = None
running: "ar" "crs" "/volume/target/x86_64-unknown-linux-musl/debug/build/rust-htslib-4d52c3f3da17113f/out/libwrapper.a" "/volume/target/x86_64-unknown-linux-musl/debug/build/rust-htslib-4d52c3f3da17113f/out/wrapper.o"
exit code: 0
cargo:rustc-link-lib=static=wrapper
cargo:rustc-link-search=native=/volume/target/x86_64-unknown-linux-musl/debug/build/rust-htslib-4d52c3f3da17113f/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
thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
(base) brainstorm:htslib romanvg$ pwd
/Users/romanvg/dev/umccr/htsget/serverless-aws-rust-multi-fail-native-crate/htslib
When dealing with native C libraries, they often need specific things available inside the build container/environment. Looks like your library relies on clang and llvm being available at compile time? Or it's not picking up on musl being available. There are a bunch of evars exposed inside this build container, you might need to look at other *-sys crates to see how they pick up on them.
You are right @clux, I just fixed the issue with a simple:
apt update && apt install clang-3.9
Would it make sense to include/ship clang-3.9 by default on your container? :)
You are right @clux, I just fixed the issue
Awesome :-)
Would it make sense to include/ship clang-3.9 by default on your container? :)
Maybe. Not sure how common this dependency is, and also am a bit wary of making this build image larger than it already is. For now I would suggest you follow the builder pattern like portier broker and extend this image.
Gotcha, thanks @clux! ;)