lzma.h: No such file or directory - but works for htslib 1.9
jelber2 opened this issue · 2 comments
Hi,
I am trying to install SeqLib and do not have a system install of lzma.h. I was able to work around that with LDFLAGS and CPPFLAGS with htslib 1.9 and xz-5.2.4
Install xz-5.2.4
cd ~/bin
wget https://tukaani.org/xz/xz-5.2.4.tar.bz2
cd xz-5.2.4
./configure CC=`which icc` --prefix=$PWD
Install samtools 1.9, bcftools 1.9, htslib 1.9
cd ~/bin
wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2
tar xjf htslib-1.9.tar.bz2
cd ../htslib-1.9
./configure CC=`which icc` CPPFLAGS="-I${HOME}/bin/xz-5.2.4/include" LDFLAGS="-L${HOME}/bin/xz-5.2.4/lib" --prefix=$PWD/
make && make install
Try to install SeqLib
cd ~/bin
git clone --recursive https://github.com/walaj/SeqLib.git
cd SeqLib
./configure CC=`which icc` CPPFLAGS="-I${HOME}/bin/xz-5.2.4/include" LDFLAGS="-L${HOME}/bin/xz-5.2.4/lib"
Make
make
cram/cram_io.c:60:18: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^
compilation terminated.
make[2]: *** [cram/cram_io.o] Error 1
make[2]: Leaving directory `/home/jelber2/bin/SeqLib/htslib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jelber2/bin/SeqLib'
make: *** [all] Error 2
What am I doing wrong here? Operating system is Red Hat Enterprise Linux Server release 6.8 (Santiago). Really, I am trying to install SeqLib as part of STITCH, but I couldn't install it through the recommended way. So, I am trying to compile SeqLib by itself with no success.
Can you confirm that lzma.h
is in -I${HOME}/bin/xz-5.2.4/include
? I am not sure what is wrong otherwise -- I am able to pass compiler flags with CPPFLAGS
in SeqLib:
In SeqLib dir:
make CPPFLAGS="-Itmp/bin/xz-5.2.4/include"
Produces (abbr):
make[2]: Entering directory `/broad/hptmp/jwala/SeqLib/htslib'
gcc -g -Wall -O2 -I. -Itmp/bin/xz-5.2.4/include -fpic -c -o cram/cram_io.pico cram/cram_io.c
I can confirm it is in the folder - it compiles if I do:
make CC=`which icc` CPPFLAGS="-I${HOME}/bin/xz-5.2.4/include" LDFLAGS="-L${HOME}/bin/xz-5.2.4/lib"