awk is always installed on a Debian system (via base-files), but you
can't be sure which one of mawk and gawk will be installed. As libpng
use mawk functionalities, you need to build-depends on it, and call mawk
instead of awk.
Please find attached a patch to do that.
I have set the severity of the bug to serious, but as mawk seems to be
the package installed by default on a system, you may want to decrease
the severity of the bug.
Message-Id: <email address hidden>
Date: Fri, 23 Sep 2005 16:16:15 +0200
From: Aurelien Jarno <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: libpng: FTBFS when awk is provided by gawk
--===== ======= ===0087526773= = Transfer- Encoding: 7bit Disposition: inline
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
Content-
Package: libpng
Version: 1.2.8rel-3
Severity: serious
Tags: patch
Hi,
libpng fails to build when awk is provided by gawk, but builds well when
awk is provided by mawk. See below:
...
awk -F '[\t [\]();]' -v PNGMAJ=0 'BEGIN{ printf( "PNG12_ %s {global: \n",PNGMAJ) }\ "PNG_FUNCTION_ EXPORT" && $(i+2)=="END")\ "PNG_DATA_ EXPORT" )\ libpng12. so.0 \ script, libpng. syms \ ld:libpng. syms:2: syntax error in VERSION script so.0.1. 2.8] Error 1 buildd/ libpng- 1.2.8rel' stamp-makefile- build] Error 2
{ for (i=1;i+2<=NF;++i)\
if ($(i)==
print $(i+1) ";";\
for (i=1;i+1<=NF;++i)\
if ($(i)==
print $(i+1) ";";}\
END{print "local: *; };"}' >libpng.syms.new
awk: warning: escape sequence `\]' treated as plain `]'
rm -f libpng.syms
mv libpng.syms.new libpng.syms
gcc -shared -lz -lm -Wl,-soname,
-Wl,-version-
-o libpng12.so.0.1.2.8 \
png.pic.o pngset.pic.o pngget.pic.o pngrutil.pic.o pngtrans.pic.o pngwutil.pic.o pngread.pic.o pngrio.pic.o pngwio.pic.o pngwrite.pic.o pngrtran.pic.o pngwtran.pic.o pngmem.pic.o pngerror.pic.o pngpread.pic.o
/usr/bin/
collect2: ld returned 1 exit status
make[1]: *** [libpng12.
make[1]: Leaving directory `/build/
make: *** [debian/
...
awk is always installed on a Debian system (via base-files), but you
can't be sure which one of mawk and gawk will be installed. As libpng
use mawk functionalities, you need to build-depends on it, and call mawk
instead of awk.
Please find attached a patch to do that.
I have set the severity of the bug to serious, but as mawk seems to be
the package installed by default on a system, you may want to decrease
the severity of the bug.
Bye,
Aurelien
-- System Information: fr_FR.UTF- 8 (charmap=UTF-8)
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.4-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=
--===== ======= ===0087526773= = Transfer- Encoding: 7bit Disposition: attachment; filename= "libpng_ awk.patch"
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
Content-
diff -u libpng- 1.2.8rel/ debian/ control libpng- 1.2.8rel/ debian/ control 1.2.8rel/ debian/ control 1.2.8rel/ debian/ control
--- libpng-
+++ libpng-
@@ -2,7 +2,7 @@
Section: libs
Priority: optional
Maintainer: Josselin Mouette <email address hidden>
-Build-Depends: debhelper (>= 4.2), zlib1g-dev, cdbs
+Build-Depends: debhelper (>= 4.2), zlib1g-dev, cdbs, mawk
Standards-Version: 3.6.2
Package: libpng12-0 1.2.8rel/ debian/ patches/ makefile. patch libpng- 1.2.8rel/ debian/ patches/ makefile. patch 1.2.8rel/ debian/ patches/ makefile. patch 1.2.8rel/ debian/ patches/ makefile. patch printf( "PNG12_ %s {global: \n",PNGMAJ) }\ printf( "PNG12_ %s {global: \n",PNGMAJ) }\ ="PNG_FUNCTION_ EXPORT" && $$(i+2)=="END")\
diff -u libpng-
--- libpng-
+++ libpng-
@@ -35,7 +35,7 @@
libpng.syms: png.h pngconf.h
$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS png.h |\
- awk -F '[\t [\]();]' 'BEGIN{print "{global:"}\
-+ awk -F '[\t [\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{
++ mawk -F '[\t [\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{
{ for (i=1;i+2<=NF;++i)\
if ($$(i)=
print $$(i+1) ";";\
--===== ======= ===0087526773= =--