Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#20647 - [lib32-zlib] PKGBUILD doesn't remove optimization flags

Attached to Project: Community Packages
Opened by Ng Oon-Ee (ngoonee) - Saturday, 28 August 2010, 05:48 GMT
Last edited by Ionut Biru (wonder) - Tuesday, 31 August 2010, 23:25 GMT
Task Type Bug Report
Category Packages: Multilib
Status Closed
Assigned To Ionut Biru (wonder)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


PKGBUILD for lib32-zlib removes -O2 but adds -O3 to the CFLAGS variable, causing segfault.

Additional info:
* package version(s) ([multilib] version)
* config and/or log files etc.

Steps to reproduce:
makepkg lib32-zlib, the -O3 flag is clearly used.
This task depends upon

Closed by  Ionut Biru (wonder)
Tuesday, 31 August 2010, 23:25 GMT
Reason for closing:  Fixed
Additional comments about closing:  lib32-zlib-1.2.5-4
Comment by Ionut Biru (wonder) - Monday, 30 August 2010, 23:16 GMT Comment by Laurent Carlier (lordheavy) - Monday, 30 August 2010, 23:17 GMT
This bug is known, and already under investigations.

Apparently the bug is in gcc 4.5.0, see

A possible workaround should be to build zlib with the following flags:
-O3 and -free-vectorize or -03 and -mstackrealign
Comment by Ng Oon-Ee (ngoonee) - Tuesday, 31 August 2010, 00:23 GMT
I can confirm that with
export CFLAGS="${CFLAGS/-O2/-O3 -fno-tree-vectorize} -DUNALIGNED_OK"
the segfault does not occur with my app. I leave it up to wonder to decide whether this is a 'fix' or (more likely) just a hack.