CoREse / kled

MIT License
6 stars 0 forks source link

Software installation issue #1

Open joanetLiew opened 1 week ago

joanetLiew commented 1 week ago

Hi There, Thanks for making Kled available for the community. I would like to have a try.

I encountered an error, listed below, while installing this software.

Can you please help me sort it out?

Thanks a lot in advancce.

Best -- Joanet

OS: Linux headnode 5.4.0-200-generic #220-Ubuntu SMP Fri Sep 27 13:19:16 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Command and Error message:

$ make

'/home/sw/SV_detections/longreads/kled/optutils'
/home/miniconda3/bin/x86_64-conda-linux-gnu-c++ -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/miniconda3/include -Wall -O3 -std=c++11 -fPIE  -c -o OptHelper.o OptHelper.cpp
In file included from OptHelper.cpp:1:0:
OptHelper.h:5:10: fatal error: vector: No such file or directory
 #include <vector>
          ^~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: OptHelper.o] Error 1
make[1]: Leaving directory '/home/sw/SV_detections/longreads/kled/optutils'
make: *** [Makefile:38: optutils] Error 2
CoREse commented 1 week ago

Hi joanetLiew,

Thanks for using kled.

It seems to be a compiler issue, try opening a new conda environment and install gcc and gxx (conda create -n kled gcc gxx), and try again. If the problem persists, or if you have any other questions, please feel free to contact me again.

Best wishes, CRE

joanetLiew commented 1 week ago

Hi @CoREse ,

Thanks a lot for your prompt reply.

Following your suggestion, I did not succeed in configuring it.

It seems to be an issue associated with install htslib.

Install htslib using conda install htslib did not help. apt-get install zlib1g-dev did not either.

make
make -C crelib
make[1]: Entering directory '/home/sw/SV_detections/longreads/kled/crelib'
make[1]: Nothing to be done for 'libs'.
make[1]: Leaving directory '/home/sw/SV_detections/longreads/kled/crelib'
make -C optutils
make[1]: Entering directory '/home/sw/SV_detections/longreads/kled/optutils'
make[1]: Nothing to be done for 'libs'.
make[1]: Leaving directory '/home/sw/SV_detections/longreads/kled/optutils'
cd htslib && autoreconf -i && ./configure
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 ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for C compiler warning flags... -Wall
checking for pkg-config... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking shared library type for unknown-Linux... plain .so
checking whether the compiler accepts -fvisibility=hidden... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for gmtime_r... yes
checking for fsync... yes
checking for drand48... yes
checking for srand48_deterministic... no
checking whether fdatasync is declared... yes
checking for fdatasync... yes
checking for library containing log... -lm
checking for zlib.h... no
checking for inflate in -lz... no
configure: error: zlib development files not found

HTSlib uses compression routines from the zlib library <http://zlib.net>.
Building HTSlib 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 or Cygwin)
is installed.

FAILED.  This error must be resolved in order to build HTSlib successfully.
make: *** [Makefile:44: htslib/config.status] Error 1
CoREse commented 1 week ago

Hi joanetLiew,

You are welcome. For the installation of zlib and bzip2 dependencies, you can follow the instructions I wrote in the readme:

Here are instructions to get some dependencies from source if systemwide installation is not available:

zlib: download from https://github.com/madler/zlib/releases, unzip and cd and ./configure && make && make install prefix=/path/to/your/local libbz2: download from https://sourceforge.net/projects/bzip2/, unzip and cd and make && make install PREFIX=/path/to/your/local And export CPATH to make compiler know where the lib is: export CPATH=/path/to/your/local/include:$CPATH

Best wishes, CRE

joanetLiew commented 6 days ago

Thanks very much @CoREse . I am not familiar with configuring. But i was able to install htslib only when i switch on configure --disable-lzma .

This led to successful making of kled.

Best - Joanet

CoREse commented 6 days ago

Hi joanetLiew,

My pleasure.

I am glad to hear that. If you have any further questions, please feel free to contact me.

Best regards, CRE