wheaton5 / distinguishing_kmers

Memory efficient (approximate) thresholded kmer set subtraction using mod hash minimizer.
5 stars 0 forks source link

Failed to build crate 'rust-htslib v0.22.0' #1

Open TGeneralovic opened 5 years ago

TGeneralovic commented 5 years ago

Hi, Cargo is installed and added to path however, on building the k-mer_distinguishing tool with cargo build --release the package rust-htslib v0.22.0 fails to build resulting in a error out exit code: 101

Is there a known work around? Running on Linux

version cargo 1.32.0 (8610973aa 2019-01-02)

stdout printed below:

error: failed to run custom build command for `rust-htslib v0.22.0`
process didn't exit successfully: `/home/tng23/privatemodules/distinguishing_kmers/target/release/build/rust-htslib-f821b40362c6e380/build-script-build` (exit code: 101
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = Some("/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = Some("-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe")
DEBUG = Some("false")
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
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o kfunc.o kfunc.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o knetfile.o knetfile.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o kstring.o kstring.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o bgzf.o bgzf.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o errmod.o errmod.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o faidx.o faidx.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o hfile.o hfile.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.9"' > version.h
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o hts.o hts.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o hts_os.o hts_os.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o md5.o md5.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o multipart.o multipart.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o probaln.o probaln.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o realn.o realn.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o regidx.o regidx.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o sam.o sam.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o synced_bcf_reader.o synced_bcf_re
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o vcf_sweep.o vcf_sweep.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o tbx.o tbx.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o textutils.o textutils.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o thread_pool.o thread_pool.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o vcf.o vcf.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o vcfutils.o vcfutils.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_codecs.o cram/cram_code
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_decode.o cram/cram_deco
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_encode.o cram/cram_enco
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_external.o cram/cram_ex
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_index.o cram/cram_index
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_io.o cram/cram_io.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_samtools.o cram/cram_sa
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/cram_stats.o cram/cram_stats
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/files.o cram/files.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/mFILE.o cram/mFILE.c
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/open_trace_file.o cram/open_
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/pooled_alloc.o cram/pooled_a
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/rANS_static.o cram/rANS_stat
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/sam_header.o cram/sam_header
/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc -O3 -ffunction-sections -fdata-sections -fPIC -march=nocona -mtune=haswell -ftree-vectorize --m64 -static -I /home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include -I.  -c -o cram/string_alloc.o cram/string_a
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.oo 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/rANS_static.o cram/sam_header.o cram/string_alloc.o
ranlib libhts.a
running: "/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-march=nocona" "-mtune=hasw "-O2" "-ffunction-sections" "-pipe" "-m64" "-static" "-I" "/home/tng23/privatemodules/distinguishing_kmers/target/release/build/bzip2-sys-a279142b31be80d5/out/include"/build/rust-htslib-f9226c71391d8169/out/wrapper.o" "-c" "wrapper.c"
exit code: 0
AR_x86_64-unknown-linux-gnu = None
AR_x86_64_unknown_linux_gnu = None
HOST_AR = None
AR = Some("/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-ar")
running: "/home/tng23/.conda/envs/Biopython-local/bin/x86_64-conda_cos6-linux-gnu-ar" "crs" "/home/tng23/privatemodules/distinguishing_kmers/target/release/build/rust-hdistinguishing_kmers/target/release/build/rust-htslib-f9226c71391d8169/out/wrapper.o"
exit code: 0
cargo:rustc-link-lib=static=wrapper
cargo:rustc-link-search=native=/home/tng23/privatemodules/distinguishing_kmers/target/release/build/rust-htslib-f9226c71391d8169/out

--- stderr
thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib64/clang-private/libclang.so.5.0 could not be opened: libclangAST.so.5: cae/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
wheaton5 commented 5 years ago

Hmm... What version of linux?

htslib is supposed to work with g++ but maybe the rust dependency install specifies clang. Do you have clang installed? Try '''apt list --installed 2>/dev/null | grep clang''' And if not try installing clang with instructions at https://blog.kowalczyk.info/article/k/how-to-install-latest-clang-6.0-on-ubuntu-16.04-xenial-wsl.html

TGeneralovic commented 5 years ago

I'm running on Linux 7.5, after installing xz and clang individually and rebuilding with cargo build --release I can now call the k-mer distinguishing tool!

Thanks for the help.