walaj / SeqLib

C++ htslib/bwa-mem/fermi interface for interrogating sequence data
http://bioinformatics.oxfordjournals.org/content/early/2016/12/21/bioinformatics.btw741.full.pdf+html
Other
132 stars 36 forks source link

lzma.h: No such file or directory - but works for htslib 1.9 #25

Closed jelber2 closed 6 years ago

jelber2 commented 6 years ago

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.

walaj commented 6 years ago

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

jelber2 commented 6 years ago

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"