FS#24147 - [zziplib] does not build with gcc 4.6

Attached to Project: Community Packages
Opened by Leonid Isaev (lisaev) - Saturday, 07 May 2011, 17:42 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 07 May 2011, 21:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

community/zziplib 0.13.60-1 does not compile with latest gcc 4.6.0-4 (it compiles with older gcc 4.5). The error message is:

/bin/sh ../libtool --silent --tag=CC --mode=link gcc -march=native -O2 -pipe -fstack-protector-all -D_USE_MMAP -fomit-frame-pointer -Wall -Wpointer-arith -Wsign-compare -Wmissing-declarations -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wstrict-aliasing -Warray-bounds -Wstrict-prototypes --export-dynamic -Wl,--hash-style=gnu -Wl,--as-needed -o zzipwrap zzipwrap.o libzzipwrap.la
gcc: error: unrecognized option '--export-dynamic'
make[3]: *** [zzipwrap] Error 1
make[3]: Leaving directory `/home/lisaev/archlinux-local-builds/zziplib/src/zziplib-0.13.60/Linux_2.6.38-ARCH_i686.d/zzipwrap'

The fix is to patch PKGBUILD as:
~> diff /var/abs/community/zziplib/PKGBUILD ~/archlinux-local-builds/zziplib/PKGBUILD
--- /var/abs/community/zziplib/PKGBUILD 2011-05-01 00:13:35.000000000 -0400
+++ /home/lisaev/archlinux-local-builds/zziplib/PKGBUILD 2011-05-07 13:34:15.135253807 -0400
@@ -20,6 +20,7 @@
cd "${srcdir}/${pkgname}-${pkgver}"

export PYTHON=/usr/bin/python2
+ sed -i 's/--export-dynamic/-export-dynamic/g' ./configure
./configure --prefix=/usr
make
}

Thanks.
This task depends upon

Closed by  Eric Belanger (Snowman)
Saturday, 07 May 2011, 21:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in svn
Comment by Rémy Oudompheng (remyoudompheng) - Saturday, 07 May 2011, 17:53 GMT
That doesn't look like a fix. The --export-dynamic is a ld option and should probably be prefixed by "-Wl,".
Comment by Leonid Isaev (lisaev) - Saturday, 07 May 2011, 18:05 GMT
That was fast :)

OK, this also works: sed -i 's/--export-dynamic/-Wl,--export-dynamic/g' ./configure

Either way some patching is required. Here are the offending lines:
~> grep export-dynamic ./zziplib-0.13.60/configure
export_dynamic_flag_spec='${wl}--export-dynamic'
test ".$can_build_shared" != ".no" && ZZIPLIB_LDFLAGS="--export-dynamic"

Loading...