mod_php-4.3.6-r1 fails to build for me with hardenedphp set. Last lines of output: /bin/sh /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/libtool --silent --preserve-dup-deps --mode=compile /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/meta_ccld -Imain/ -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/ -DPHP_ATOM_INC -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/include -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6 -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/Zend -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/imap -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/ext/mbstring/mbregex -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/ext/mbstring/libmbfl -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/ext/mbstring/libmbfl/mbfl -I/usr/include/mcal -I/usr/include/mysql -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/ext/xml/expat -D_REENTRANT -I/var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/TSRM -march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -fstack-protector -ffast-math -fforce-addr -falign-functions=4 -pthread -DZTS -prefer-pic -c /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/hardened_php.c -o main/hardened_php.lo /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/hardened_php.c: In function `php_security_log': /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/hardened_php.c:56: error: `tsrm_ls' undeclared (first use in this function) /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/hardened_php.c:56: error: (Each undeclared identifier is reported only once /var/tmp/portage/mod_php-4.3.6-r1/work/php-4.3.6/main/hardened_php.c:56: error: for each function it appears in.) make: *** [main/hardened_php.lo] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: dev-php/mod_php-4.3.6-r1 failed. !!! Function php-sapi_src_compile, Line 489, Exitcode 2 !!! compile problem PHP is compiled with the following USE-flags: [ebuild R ] dev-php/mod_php-4.3.6-r1 -X +apache2 +berkdb +crypt +curl +doc -fdftk -firebird -flash +freetds +gd -gd-external +gdbm +gmp +hardenedphp +imap -informix +ipv6 +java +jpeg -kerberos +ldap +mcal -memlimit +mysql +nls -oci8 +odbc +pam +pdflib +png -postgres -qt +snmp -spell +ssl +tiff +truetype +xml2 +yaz I suppose it's an upstream problem with the patch, but php-4.3.6 builds fine. I'm not sure if the hardened-patch is included in the cli-build, but the flag is also set on emerge -pv. I'm using the hardened-x86-2004.0 profile, and ACCEPT_KEYWORDS="~x86" for the whole system.
Please post the output from 'emerge info'.
Portage 2.0.50-r6 (hardened-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 AMD Duron(tm) Gentoo Base System version 1.4.15 distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -fstack-protector -ffast-math -fforce-addr -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -fstack-protector -ffast-math -fforce-addr -falign-functions=4" DISTDIR="/storage/portage/distfiles" FEATURES="autoaddcvs ccache sandbox sfperms strict" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://gentoo.inode.at/source/ http://gentoo.inode.at" MAKEOPTS="-j1" PKGDIR="/storage/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://localhost/gentoo-portage" USE="3dnow acl acpi activefilter apache2 apm atm berkdb cdr chroot crypt curl doc evms2 exiscan-acl freetds gd gdbm gif gmp gpm hardened hardenedphp imagemagick imap innodb ipv6 java jpeg ldap libwww lmtp maildir mcal mmx mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses nls nptl odbc pam parse-clocks pdflib perl pic pie png python readline samba sasl slang snmp socks5 sse ssl tcpd tetex threads tiff truetype usb vhosts wildlsearch x86 xml xml2 yaz zlib"
Me too :( I wonder if it has anything to do about me recompiling apache with threads enabled (it seems to have worked without threads)
Yes! That's right! It doesn't work when apache is compiled with +threads, but without it, it compiles fine. Correcting bug summary :-)
Solution for this bug: Bump hardened-php patch to version 0.1.2, which has ZTS compatibility now. :-)
I've updated the ebuilds to use hardened-php-0.1.2. Please give this a try, and let me know how you get on. Best regards, Stu
The eclass php-sapi still contains the hardened-php version 0.1.1, synced a few hours ago, so I can't test.