I am trying to compile the latest bcftools
(version 1.9) with the GNU Scientific Library, in order to be able to use the polysomy
algorithm.
I'm not sudo on the shared system, so I installed zlib-1.2.11
in my home directory.
Then in the bcftools directory I tried:
./configure --enable-libgsl CPPFLAGS="-l/my_home/lib/zlib-1.2.11"
Output:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for grep that handles long lines and -e... /bin/grep
checking for C compiler warning flags... -Wall
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking location of HTSlib source tree... htslib-1.9
checking shared library type... plain .so
checking for library containing dlopen... -ldl
checking if the compiler accepts -rdynamic... yes
checking for zlib.h... yes
checking for inflate in -lz... no
configure: error: zlib development files not found
BCFtools uses compression routines from the zlib library <http://zlib.net>.
Building bcftools requires zlib development files to be installed on the build
machine; you may need to ensure a package such as zlib1g-dev (on Debian or
Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions) is installed.
FAILED. This error must be resolved in order to build bcftools successfully.
What is "inflate"? A library? A command? What is "lz"?
An easy workaround would be to install
bcftools
via a package manager such asconda
.Yes, I tried installing the GNU Scientific Library, then bcftools with conda. Both installations worked, but the GSL is not integrated/linked and thus I cannot get
polysomy
.I found that adding the following to your
bashrc
solved most of these issues. I would install zlib (but not bcftools) with conda, then add the flags below tobashrc
and then see if you can compilebcftools
with that.Try adding
/include
to your configure command and also addingLDFLAGS
, maybe that would help