statgen / fastQValidator

Validate FastQ Files
36 stars 10 forks source link

Problem compiling under Centos #8

Open marchoeppner opened 8 years ago

marchoeppner commented 8 years ago

Hi,

been trying to compile the bundled release (fastQValidator + libStatGen) on a university HPC Cluster running Centos 6.

Specifically, as we cannot easily install library system-wide, I tend to compile them myself and pass them to compilers via e.g. LD_LIBRARY_PATH or INCLUDE. The Makefile zoo used by fastQValidator doesn't seem to know how to handle that. The issue seems to concern Zlib:

"g++ -O4 -pipe -Wall -I../../libStatGen/include -L/ifs/data/nfs_share/ikmb_repository/software/zlib/1.2.8/lib -I/ifs/data/nfs_share/ikmb_repository/software/zlib/1.2.8/include -DZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -DSTDC_LIMITMACROS -o ../bin/fastQValidator ../obj/FastQValidator.o ../../libStatGen/libStatGen.a -lm ../../libStatGen/libStatGen.a(BgzfFileTypeRecovery.o): In function BGZFReader::readahead(long)': BgzfFileTypeRecovery.cpp:(.text+0xc48): undefined reference toinflateInit2' BgzfFileTypeRecovery.cpp:(.text+0xc54): undefined reference to inflateEnd' BgzfFileTypeRecovery.cpp:(.text+0xc79): undefined reference toinflate' BgzfFileTypeRecovery.cpp:(.text+0xc86): undefined reference to inflateEnd' ../../libStatGen/libStatGen.a(GzipFileType.o): In functionGzipFileType::GzipFileType(char const, char const)': GzipFileType.cpp:(.text+0x50): undefined reference to gzopen64' GzipFileType.cpp:(.text+0x93): undefined reference togzdopen' GzipFileType.cpp:(.text+0xc2): undefined reference to `gzdopen' "

And so on.

I first ran the Makefiles "as is" and then hard-coded the lib and include for Zlib into the Makefile.include (so it shows up in the compile instruction as seen above). But it nevertheless fails.

Any suggestions on how to get it fixed? (libStatGen on its own compiles fine, it is a problem during some other step that tries to build the fastQValidate binary). Pretty sure the local Zlib install is OK, already used it for other software installs.

Greetings, Marc

mktrost commented 8 years ago

The command seems to be missing the -lz at the end of the compile command. I think then it isn't pulling in the zlib information when compiling. I'm pretty sure that the zlib load has to be at the end.

If you need to set it to something other than -lz, you can modify libStatGen Makefile.include to change the ZLIB_LIB = -lz setting.

Let me know if adding it to the end helps.

Mary Kate

On Fri, Feb 12, 2016 at 7:48 AM, marchoeppner notifications@github.com wrote:

Hi,

been trying to compile the bundled release (fastQValidator + libStatGen) on a university HPC Cluster running Centos 6.

Specifically, as we cannot easily install library system-wide, I tend to compile them myself and pass them to compilers via e.g. LD_LIBRARY_PATH or INCLUDE. The Makefile zoo used by fastQValidator doesn't seem to know how to handle that. The issue seems to concern Zlib:

"g++ -O4 -pipe -Wall -I../../libStatGen/include -L/ifs/data/nfs_share/ikmb_repository/software/zlib/1.2.8/lib -I/ifs/data/nfs_share/ikmb_repository/software/zlib/1.2.8/include -DZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -DSTDC_LIMITMACROS -o ../bin/fastQValidator ../obj/FastQValidator.o ../../libStatGen/libStatGen.a -lm ../../libStatGen/libStatGen.a(BgzfFileTypeRecovery.o): In function BGZFReader::readahead(long)': BgzfFileTypeRecovery.cpp:(.text+0xc48): undefined reference to inflateInit2' BgzfFileTypeRecovery.cpp:(.text+0xc54): undefined reference to inflateEnd' BgzfFileTypeRecovery.cpp:(.text+0xc79): undefined reference toinflate' BgzfFileTypeRecovery.cpp:(.text+0xc86): undefined reference to inflateEnd' ../../libStatGen/libStatGen.a(GzipFileType.o): In functionGzipFileType::GzipFileType(char const, char const)': GzipFileType.cpp:(.text+0x50): undefined reference to gzopen64' GzipFileType.cpp:(.text+0x93): undefined reference togzdopen' GzipFileType.cpp:(.text+0xc2): undefined reference to `gzdopen' "

And so on.

I first ran the Makefiles "as is" and then hard-coded the lib and include for Zlib into the Makefile.include (so it shows up in the compile instruction as seen above). But it nevertheless fails.

Any suggestions on how to get it fixed? (libStatGen on its own compiles fine, it is a problem during some other step that tries to build the fastQValidate binary). Pretty sure the local Zlib install is OK, already used it for other software installs.

Greetings, Marc

— Reply to this email directly or view it on GitHub https://github.com/statgen/fastQValidator/issues/8.