[TriLUG] PHP 5.2.6 from fedora 9 src with Suhosin patch on RHEL4

Cristóbal Palmer cmp at cmpalmer.org
Sat Jun 28 17:37:26 EDT 2008


What I want: PHP 5.2.6 from fedora 9 source with latest Suhosin patch
built on RHEL4 for RHEL4 deployment.

What happens when I edit the .spec to add the Suhosin patch and try to build...

  rpmbuild -bp /usr/src/redhat/SPECS/php.spec
  [...]
  rpmbuild -ba –target=i686 /usr/src/redhat/SPECS/php.spec
  [...]
  [what looks like successful tests, successful compiling]
  [...]
  [compiling finishes up:]

+ cat files.json files.dbase files.zip
+ install -d /var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/etc/rpm
+ sed -e 's/@PHP_APIVER@/20041225/;s/@PHP_ZENDVER@/20060613/;s/@PHP_PDOVER@/20060511/'
+ install -m 644 -c macros.php
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/etc/rpm/macros.php
+ rm -rf /var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/bcmath.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/dba.a
 /var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/dbase.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/dom.a
/var/tmp
/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/gd.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/imap.a
/var/tmp/php-5.2.6-
2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/json.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/ldap.a
/var/tmp/php-5.2.6-2.1.RHEL4
.suhosin-root-root/usr/lib/php/modules/mbstring.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/mysql.a
/var/tmp/php-5.2.6-2.1.RHEL4.suh
osin-root-root/usr/lib/php/modules/mysqli.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/ncurses.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin
-root-root/usr/lib/php/modules/odbc.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/pdo.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root
/usr/lib/php/modules/pdo_mysql.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/pdo_odbc.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root
/usr/lib/php/modules/pdo_pgsql.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/pdo_sqlite.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-ro
ot/usr/lib/php/modules/pgsql.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/pspell.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr
/lib/php/modules/snmp.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/soap.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/
modules/xmlreader.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/xmlrpc.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/mo
dules/xmlwriter.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules/xsl.a
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/lib/php/modules
/zip.a '/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/bin/{phptar}'
/var/tmp/php-5.2.6-2.1.RHEL4.suhosin-root-root/usr/share/pear
/var/tmp/php-5.2.6-2.1
.RHEL4.suhosin-root-root/usr/lib/libphp5.la
+ rm -f README.Zeus README.QNX README.CVS-RULES
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.97302
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd php-5.2.6
+ cd build-apache
+ export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+ NO_INTERACTION=1
+ REPORT_EXIT_STATUS=1
+ MALLOC_CHECK_=2
+ unset TZ LANG LC_ALL
+ make test

Build complete.
Don't forget to run 'make test'.

[ ... Followed immediately by:]

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/bcmath.so' -
/usr/src/redhat/BUILD/php-5.2.6/
build-apache/modules/bcmath.so: cannot open shared object file: No
such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/bcmath.so' -
/usr/src/redhat/BUILD/php-5.2.6/build
-apache/modules/bcmath.so: cannot open shared object file: No such
file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dba.so' -
/usr/src/redhat/BUILD/php-5.2.6/bui
ld-apache/modules/dba.so: cannot open shared object file: No such file
or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dba.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dba.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dbase.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dbase.so: cannot
open shared object file: No such file or directory in Unknown on line
0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dbase.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dbase.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dom.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dom.so: cannot
open shared object file: No such file or directory in Unknown on line
0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dom.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/dom.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/gd.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/gd.so: cannot
open shared object file: No such file or directory in Unknown on line
0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/gd.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/gd.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/imap.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/imap.so: cannot
open shared object file: No such file or directory in Unknown on line
0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/imap.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/imap.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/json.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/json.so: cannot
open shared object file: No such file or directory in Unknown on line
0

[... much more of the same ...]

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/xsl.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/xsl.so: cannot
open shared object file: No such file or directory in Unknown on line
0
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so: cannot
open shared object file: No such file or directory in Unknown on line
0

Warning: PHP Startup: Unable to load dynamic library
'/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so' -
/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so: cannot
open shared object file: No such file or directory in Unknown on line
0

=====================================================================
PHP         : /usr/src/redhat/BUILD/php-5.2.6/build-apache/sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 5.2.6
ZEND_VERSION: 2.2.0
PHP_OS      : Linux - Linux laudine.metalab.unc.edu 2.6.9-67.0.15.EL
#1 Tue Apr 22 13:39:22 EDT 2008 i686
INI actual  : /usr/src/redhat/BUILD/php-5.2.6/build-apache/tmp-php.ini
More .INIs  : /etc/php.d/bcmath.ini,/etc/php.d/dba.ini,/etc/php.d/dbase.ini,/etc/php.d/dom.ini,/etc/php.d/gd.ini,/etc/php.d/imap.ini,/etc/php.d/json.ini,/etc/php.d/ldap.ini,/etc/php.d/mbstring.ini,/etc/php.d/mysql.ini,/etc/php.d/mysqli.ini,/etc/php.d/ncurses.ini,/etc/php.d/odbc.ini,/etc/php.d/pdo.ini,/etc/php.d/pdo_mysql.ini,/etc/php.d/pdo_odbc.ini,/etc/php.d/pdo_pgsql.ini,/etc/php.d/pdo_sqlite.ini,/etc/php.d/pgsql.ini,/etc/php.d/pspell.ini,/etc/php.d/snmp.ini,/etc/php.d/soap.ini,/etc/php.d/xmlreader.ini,/etc/php.d/xmlrpc.ini,/etc/php.d/xmlwriter.ini,/etc/php.d/xsl.ini,/etc/php.d/zip.ini
CWD         : /usr/src/redhat/BUILD/php-5.2.6
Extra dirs  :
=====================================================================
TIME START 2008-06-28 06:50:08
=====================================================================
FAIL EXPECT [tests/run-test/test001.phpt]
FAIL EXPECTF [tests/run-test/test002.phpt]
FAIL EXPECTREGEX [tests/run-test/test003.phpt]
FAIL INI section allows '=' [tests/run-test/test004.phpt]

And then it stayed stuck on test 5 overnight; I just killed it a few
minutes ago.

See the full spec file here: http://garp.metalab.unc.edu/php.spec

Please note that I'm leaning heavily on this blog post:
http://www.ibiblio.org/dls/blog/?p=83 and on this howto:
http://www.howtoforge.com/php_suhosin_fedora7 (but with the most
recent versions, obviously). What'd I miss? What more info shall I
give?

Cheers,
-- 
Cristóbal M. Palmer
"Small acts of humanity amid the chaos of inhumanity provide hope. But
small acts are insufficient."
 -- Paul Rusesabagina


More information about the TriLUG mailing list