[Debian-med-packaging] Bug#606004: [Samtools-devel] SAMtools fails to build with ld --as-needed.
John Marshall
jm18 at sanger.ac.uk
Tue Dec 28 13:41:13 UTC 2010
On 10 Dec 2010, at 11:57, Charles Plessy wrote:
> SAMtools fails to build when passing the option --as-needed to ld.
[...]
> calDepth:../libbam.a calDepth.c
> - gcc -g -Wall -O2 -I.. calDepth.c -o $@ -lm -lz -L.. -lbam
> + gcc -g -Wall -O2 -I.. calDepth.c -o $@ -L.. -lbam -lm -lz
Applied, and similarly in bcftools/Makefile and the main Makefile.
(I'm a little surprised those other two built for you -- it wasn't
hard to break those in r891 by building with gcc -static.)
Makefile.mingw appears to be close to correct, but perhaps someone
should check it properly.
> The behaviour of the linker is changing in Ubuntu and Fedora and
> will change in
> Debian, rendering this patch necessary for building SAMtools on
> these platforms.
As there is no down-side, it's really simply good hygiene to put the
system libraries last in the link command. I made similar fixes in
svn r519, but problems had since sneaked back in.
Thanks,
John
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the Debian-med-packaging
mailing list