Package: pristine-tar
Version: 1.11
Severity: minor
Tags: patch

pristine-tar fails to build when --as-needed is passed to the linker:

gcc -Wall -O2 -lz -o zgz/zgz zgz/zgz.c zgz/gzip/*.c zgz/old-bzip2/*.c
zgz/gzip/deflate.c: In function 'gnu_deflate':
zgz/gzip/deflate.c:556:9: warning: 'flush' may be used uninitialized in
this function
/tmp/ccMjcP9V.o: In function `main':
zgz.c:(.text+0x6ea): undefined reference to `deflateInit2_'
zgz.c:(.text+0x70e): undefined reference to `crc32'
zgz.c:(.text+0x760): undefined reference to `crc32'
zgz.c:(.text+0x78b): undefined reference to `deflate'
zgz.c:(.text+0x883): undefined reference to `deflate'
zgz.c:(.text+0x8fa): undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make[1]: *** [zgz/zgz] Error 1
make[1]: Leaving directory `/build/buildd/pristine-tar-1.11'
dh_auto_build: make -j1 returned exit code 2

diff -Nru pristine-tar-1.11/Makefile.PL pristine-tar-1.11/Makefile.PL
--- pristine-tar-1.11/Makefile.PL	2010-11-10 23:00:35.000000000 +0100
+++ pristine-tar-1.11/Makefile.PL	2010-11-19 11:06:02.000000000 +0100
@@ -19,7 +19,7 @@
 
 ZGZ_SOURCES = zgz/zgz.c zgz/gzip/*.c zgz/old-bzip2/*.c
 zgz/zgz: $(ZGZ_SOURCES)
-	gcc -Wall -O2 -lz -o $@ $(ZGZ_SOURCES)
+	gcc -Wall -O2 -o $@ $(ZGZ_SOURCES) -lz
 
 extra_install:
 	install -d $(DESTDIR)/usr/bin

Reply via email to