sebhtml / ray

Ray -- Parallel genome assemblies for parallel DNA sequencing
http://denovoassembler.sf.net
Other
65 stars 12 forks source link

Makefile linker flag ordering issue GCC 4.6.3 #177

Closed ctSkennerton closed 11 years ago

ctSkennerton commented 11 years ago

Ray build consistently fails when linking when the HAVE_LIBZ flag is set.

mpicxx  -lz  code/TheRayGenomeAssembler.a RayPlatform/libRayPlatform.a -o Ray
code/TheRayGenomeAssembler.a(FastqGzLoader.o): In function `FastqGzLoader::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)':
FastqGzLoader.cpp:(.text+0x39): undefined reference to `gzopen'
FastqGzLoader.cpp:(.text+0x6f): undefined reference to `gzgets'
FastqGzLoader.cpp:(.text+0x8d): undefined reference to `gzclose'
FastqGzLoader.cpp:(.text+0x9a): undefined reference to `gzopen'
code/TheRayGenomeAssembler.a(FastqGzLoader.o): In function `FastqGzLoader::load(int, ArrayOfReads*, MyAllocator*, int)':
FastqGzLoader.cpp:(.text+0x15e): undefined reference to `gzgets'
FastqGzLoader.cpp:(.text+0x1b4): undefined reference to `gzclose'
collect2: ld returned 1 exit status
make: *** [Ray] Error 1

However this problem can be rectified by changing the linking flag to:

mpicxx code/TheRayGenomeAssembler.a RayPlatform/libRayPlatform.a -lz -o Ray

or

mpicxx code/TheRayGenomeAssembler.a RayPlatform/libRayPlatform.a -o Ray -lz
sebhtml commented 11 years ago

I believe that this was fixed by:

commit 450f1074ad492a89bcac32a6ec5ceea45597e60a Author: Sébastien Boisvert sebastien.boisvert.3@ulaval.ca Date: Mon Nov 5 16:05:07 2012 -0500

Fixed a linking error caused by ordering

This patch fixes a build error in Debian and Ubuntu.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692238

Signed-off-by: Sébastien Boisvert <sebastien.boisvert.3@ulaval.ca>
ctSkennerton commented 11 years ago

My appologies, I had only downloaded the stable release from sourceforge