fastQValidator icon indicating copy to clipboard operation
fastQValidator copied to clipboard

Problem compiling under Centos

Open marchoeppner opened this issue 9 years ago • 1 comments

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 -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -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

marchoeppner avatar Feb 12 '16 12:02 marchoeppner

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 [email protected] 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 -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -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.

mktrost avatar Feb 20 '16 16:02 mktrost