This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Kmergenie compilation problem

Hello,

I would like to try kmergenie, but I can't compile (actually on my machine, Ubuntu 14.04.4 LTS, there is no problem, but on the server I would like to install it I get this error:

g++ -o minia/Pool.o -c minia/Pool.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Bank.o -c minia/Bank.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Hash16.o -c minia/Hash16.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Bloom.o -c minia/Bloom.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Kmer.o -c minia/Kmer.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Utils.o -c minia/Utils.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/LinearCounter.o -c minia/LinearCounter.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/LargeInt.o -c minia/LargeInt.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/MultiConsumer.o -c minia/MultiConsumer.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o minia/Hashing.o -c minia/Hashing.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4
g++ -o specialk minia/Pool.o minia/Bank.o minia/Hash16.o minia/Bloom.o minia/Kmer.o minia/Utils.o minia/LinearCounter.o minia/LargeInt.o minia/MultiConsumer.o minia/Hashing.o main.cpp -I/opt/rh/devtoolset-2/root/usr/include -pthread  -D_largeint -DKMER_PRECISION=4 -L/opt/rh/devtoolset-2/root/usr/lib64 -L/opt/rh/devtoolset-2/root/usr/lib -lz -DSVN_REV=1.7016
minia/Bank.o:Bank.cpp:function Bank::open_stream(int): error: undefined reference to 'gzopen64'
minia/Bank.o:Bank.cpp:function Bank::init(char**, int): error: undefined reference to 'gzopen64'
minia/Bank.o:Bank.cpp:function Bank::estimate_kmers_volume(int): error: undefined reference to 'gztell64'
minia/Bank.o:Bank.cpp:function Bank::estimate_kmers_volume(int): error: undefined reference to 'gztell64'
minia/Bank.o:Bank.cpp:function Bank::estimate_nb_reads(): error: undefined reference to 'gztell64'
minia/Bank.o:Bank.cpp:function Bank::estimate_nb_reads(): error: undefined reference to 'gztell64'
minia/Bank.o:Bank.cpp:function Bank::load_position(): error: undefined reference to 'gzseek64'
collect2: error: ld returned 1 exit status
make: *** [specialk] Error 1

Theoretically dependencies are met...

Currently Loaded Modules:
  1) GCC/4.9.3-2.25                 7) ScaLAPACK/2.0.2-OpenBLAS-0.2.15-LAPACK-3.6.0  13) Java/1.8.0_72    19) HDF5/1.8.16     25) bzip2/1.0.6     31) GCCcore/4.9.3                    37) impi/5.1.2.150
  2) numactl/2.0.11                 8) ncurses/6.0                                   14) Tcl/8.6.4        20) netCDF/4.3.3.1  26) gettext/0.19.6  32) ifort/2016.1.150-GCC-4.9.3-2.25  38) python/33
  3) hwloc/1.11.2                   9) libreadline/6.3                               15) Tk/8.6.4-no-X11  21) expat/2.1.0     27) XZ/5.2.2        33) iimpi/8.1.5-GCC-4.9.3-2.25
  4) OpenMPI/1.10.2                10) libpng/1.6.21                                 16) cURL/7.47.0      22) GDAL/2.0.2      28) PCRE/8.38       34) binutils/2.25
  5) OpenBLAS/0.2.15-LAPACK-3.6.0  11) NASM/2.11.08                                  17) libxml2/2.9.3    23) PROJ/4.9.2      29) R/3.3.1         35) zlib/1.2.8
  6) FFTW/3.3.4                    12) libjpeg-turbo/1.4.2                           18) Szip/2.1         24) GMP/6.1.0       30) gcc/devtoolset  36) icc/2016.1.150-GCC-4.9.3-2.25
kmergenie next-gen assembly

Do you have the zlib-devel package installed?

This thread may be also of interest, if you do.

Sorry, I didn't reply the right way...

# Wrapped for easier reading
$ module show zlib
/opt/ebmodules/all/Compiler/GCCcore/4.9.3/zlib/1.2.8.lua:

help([[zlib is designed to be a free, general-purpose, legally unencumbered -- \
that is, not covered by any patents -- lossless data-compression library for use \
on virtually any computer hardware and operating system. - Homepage: \
http://www.zlib.net/]]) whatis("Description: zlib is designed to be a free, \
general-purpose, legally unencumbered -- that is, not covered by any \
patents -- lossless data-compression library for use on virtually any \
computer hardware and operating system. - Homepage: \
http://www.zlib.net/") conflict("zlib") \
prepend_path("CPATH","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/include") \
prepend_path("LD_LIBRARY_PATH","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib") \ prepend_path("LIBRARY_PATH","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib") \ prepend_path("MANPATH","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/share/man") \
prepend_path("PKG_CONFIG_PATH","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib/pkgconfig") \ setenv("EBROOTZLIB","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8") setenv("EBVERSIONZLIB","1.2.8") \
setenv("EBDEVELZLIB","/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/easybuild/Compiler-GCCcore-4.9.3-zlib-1.2.8-easybuild-devel")

What do you get with echo $LD_LIBRARY_PATH?

I think these two locations don't seem to have the zlib files (-L/opt/rh/devtoolset-2/root/usr/lib64 -L/opt/rh/devtoolset-2/root/usr/lib). Can you edit the Makefile for minia and add the location for your zlib files with another -L /opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib)? Or you could append this directory to your LD_LIBRARY_PATH as an alternative.

Great, here is what I get:

# Wrapped for easier reading
[wengery@login1 ~]$ echo $LD_LIBRARY_PATH

echo $LD_LIBRARY_PATH

/opt/ebsofts/Core/zlib/1.2.8/lib:\
/opt/intel/composer_xe_2015.0.090/compiler/lib/intel64:\
/opt/intel/mic/coi/host-linux-release/lib:\
/opt/intel/mic/myo/lib:/opt/intel/composer_xe_2015.0.090/mpirt/lib/intel64:\
/opt/intel/composer_xe_2015.0.090/compiler/lib/intel64:/opt/intel/composer_xe_2015.0.090/ipp/lib/intel64:\
/opt/intel/mic/coi/host-linux-release/lib:/opt/intel/mic/myo/lib:\
/opt/intel/composer_xe_2015.0.090/compiler/lib/intel64:\
/opt/intel/composer_xe_2015.0.090/mkl/lib/intel64:\
/opt/intel/composer_xe_2015.0.090/tbb/lib/intel64/gcc4.4

I do not see a makefile in the minia directory, and if I need to add the location for the zlib file to the main makefile, how shoud I do it? I am not really an expert...

Can you try

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib

What files are in /opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib?

The files in /opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib are

libz.a
libz.so -> libz.so.1.2.8
libz.so.1.2.8
libz.so.1.2.8
pkgconfig

I added

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ebsofts/Compiler/GCCcore/4.9.3/zlib/1.2.8/lib

at the beginning of the makefile, but still get the same error.

Issue the export command on the command line (don't add it to the makefile).

Still the same error. But I tested on another account on the same cluster, and it worked perfectly. So the issue must be specifically related to my account. I will try to sort things out and post here what was wrong.

Many thanks for you help !

0 answers

No answers yet.

Log in to answer this question.