From: ben dot lentz at gmail dot com Operating system: AIX 5.3.8.2 PHP version: 5.2.6 PHP Bug Type: Compile Failure Bug description: arg list too long when compiling many modules
Description: ------------ Compiling php-5.2.6 using gcc with IBM's linker, and GNU tools (coreutils/findutils/sed/awk/grep/automake/autoconf/etc.) with many modules results in an arg list too long error from /bin/sh (ksh). Reducing the number of modules included in the build results in a successful build. I have tried manually changing the Makefile from SHELL=/bin/sh to SHELL=/opt/local/bin/bash (GNU bash 3.2.0), but this results in a different error from the build... something about an unmatched backtick '`.' I have tried building some of these modules with=shared,$WHERE but it didn't help. I've examined the resulting Makefile and the PHP_GLOBAL_OBJS is so huge that it crashes IBM's vi (Line too long for current screen size.). I suspect here in lies the problem. grep '^PHP_GLOBAL_OBJS' Makefile | wc 1 587 17353 I have tried both the release php-5.2.6 and php5.2-200811061730, and the failure was the same in both cases. If someone could throw together a patch for the Makefile or configure script, I would be very grateful. Or, if there's a way to build this differently (sets of modules at a time or something), I would be grateful for some pointers. Thanks Reproduce code: --------------- ./configure \ --prefix=$WHERE \ --enable-shared=yes \ --enable-static=no \ --with-libxml-dir=$WHERE \ --with-openssl=$WHERE \ --with-openssl-dir=$WHERE \ --with-mysql=$WHERE \ --with-mysql-sock=$WHERE/var/lib/mysql/mysql.sock \ --with-kerberos=$WHERE \ --with-zlib=$WHERE \ --with-zlib-dir=$WHERE \ --with-bz2=$WHERE \ --with-curl=$WHERE \ --with-gdbm=$WHERE \ --with-db4=$WHERE \ --with-gd=$WHERE \ --with-jpeg-dir=$WHERE \ --with-png-dir=$WHERE \ --with-freetype-dir=$WHERE \ --with-gettext=$WHERE \ --with-imap=$WHERE \ --with-imap-ssl=$WHERE \ --with-ldap=$WHERE \ --with-ldap-sasl=$WHERE \ --with-mm=$WHERE \ --with-libexpat-dir=$WHERE \ --with-iconv=$WHERE \ --with-iconv-dir=$WHERE \ --with-xsl=$WHERE \ --enable-calendar \ --enable-sockets \ --enable-bcmath \ --enable-ftp \ --with-gmp=$WHERE \ --with-pspell=$WHERE \ --with-snmp=$WHERE \ --enable-mbstring \ --with-readline=$WHERE \ --enable-soap \ --enable-wddx \ --enable-zip \ --enable-shmop \ --enable-pcntl \ --enable-exif make Expected result: ---------------- A successful build of php-cli. Actual result: -------------- >From ksh: <snip> main/internal_functions.lo -lcrypt -lc-client -lz -lexslt -lexpat -lexpat -lmm -lhistory -lreadline -lncurses -laspell -lpspell -lrt -lmysqlclient -lldap -llber -lssl -lcrypto -lcrypt -lpam -liconv -liconv -lgmp -lintl -lgd -lfreetype -lpng -lz -ljpeg -lssl -lcrypto -ldb-4.6 -lgdbm -lcurl -lbz2 -lz -lssl -lcrypto -lm -lssl -lcrypto -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -llber -lldap -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lxml2 -lz -liconv -lm -lnetsnmp -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxslt -lxml2 -lz -liconv -lm -lcrypt -o sapi/cgi/php-cgi make: execvp: /bin/sh: Arg list too long make: *** [sapi/cgi/php-cgi] Error 127 >From bash: <snip> main/internal_functions.lo -lcrypt -lc-client -lz -lexslt -lexpat -lexpat -lmm -lhistory -lreadline -lncurses -laspell -lpspell -lrt -lmysqlclient -lldap -llber -lssl -lcrypto -lcrypt -lpam -liconv -liconv -lgmp -lintl -lgd -lfreetype -lpng -lz -ljpeg -lssl -lcrypto -ldb-4.6 -lgdbm -lcurl -lbz2 -lz -lssl -lcrypto -lm -lssl -lcrypto -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -llber -lldap -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lxml2 -lz -liconv -lm -lnetsnmp -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm -lxslt -lxml2 -lz -liconv -lm -lcrypt -o sapi/cgi/php-cgi make: execvp: /opt/local/bin/bash: Arg list too long make: *** [sapi/cgi/php-cgi] Error 127 -- Edit bug report at http://bugs.php.net/?id=46511&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46511&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46511&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46511&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46511&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46511&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46511&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46511&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46511&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46511&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46511&r=support Expected behavior: http://bugs.php.net/fix.php?id=46511&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46511&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46511&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46511&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46511&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46511&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46511&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46511&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46511&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46511&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46511&r=mysqlcfg