From: [EMAIL PROTECTED] Operating system: Heavily modified Red Hat 6.2 PHP version: 4.2.1 PHP Bug Type: Compile Failure Bug description: Undeclared 'phpext_ps_mm_ptr' in internal_functions{,_cli}.c
I'm compiling PHP 4.2.1 with: ./configure --with-config-file-path=/usr/local/etc \ --with-layout=GNU \ --with-apxs=/usr/local/sbin/apxs \ --enable-dependency-tracking \ --with-openssl=shared \ --enable-libgcc=shared \ --with-zlib-dir=/usr \ --with-zlib=shared \ --with-aspell=/usr \ --enable-bcmath=shared \ --with-bz2=shared \ --enable-calendar=shared \ --with-crack=shared \ --with-curl=shared \ --enable-dba=shared \ --with-gdbm=shared \ --with-ndbm=shared \ --with-db2=shared \ --with-db3=shared \ --enable-dbase=shared \ --enable-dbx=shared \ --enable-dio=shared \ --with-dom=shared \ --with-dom-xslt=shared \ --with-dom-exslt=shared \ --enable-exif=shared \ --enable-filepro=shared \ --enable-ftp=shared \ --with-tiff-dir=/usr \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-xpm-dir=/usr/X11R6 \ --with-freetype-dir=/usr \ --with-gd=shared,/usr/gd-with_gif/ \ --enable-gd-native-ttf=shared \ --with-gettext=shared \ --with-gmp=shared \ --with-icap=shared \ --with-iconv=shared \ --with-imap=shared \ --with-kerberos \ --with-imap-ssl \ --with-java=/usr/java/j2sdk1.4.0 \ --with-ldap=shared \ --enable-mbstring=shared \ --enable-mbstr-enc-trans \ --enable-mbregex \ --with-mcal=shared \ --with-mcrypt=shared \ --with-mhash=shared \ --with-pdflib=shared \ --with-pgsql=shared \ --with-pspell=shared \ --with-recode=shared \ --with-mm=shared \ --enable-shmop=shared \ --enable-sockets=shared \ --with-regex=php \ --enable-sysvsem=shared \ --enable-sysvshm=shared \ --enable-tokenizer=shared \ --enable-wddx=shared \ --with-xmlrpc=shared \ --enable-xslt=shared \ --with-xslt-sablot=shared,/usr \ --with-expat-dir=/usr \ --with-sablot-js=shared,/usr \ --enable-yp=shared \ --with-zip=shared \ --enable-versioning=shared \ --enable-shared=shared \ --enable-inline-optimization=shared \ --enable-memory-limit=shared I added '=shared' to so many of the options because the compile documentation sucks my left testicle, and it was faster to add '=shared' to a bunch of the options than read through the 'configure' script for hours to determine which options are actually affected by '=shared'. Anyways, the 'configure' script completed successfully, and I went ahead with 'make'. After a few minutes, I got this error: internal_functions.c:53: `phpext_ps_mm_ptr' undeclared here (not in a function) internal_functions.c:53: initializer element is not constant internal_functions.c:53: (near initialization for `php_builtin_extensions[9]') I examined 'main/internal_functions.c' and found this: zend_module_entry *php_builtin_extensions[] = { phpext_xmlrpc_ptr, phpext_xml_ptr, phpext_standard_ptr, phpext_posix_ptr, phpext_pcre_ptr, phpext_openssl_ptr, phpext_mysql_ptr, phpext_ctype_ptr, phpext_aspell_ptr, phpext_ps_mm_ptr, }; First, just to try, I cleaned up the code, removing that trailing comma after 'phpext_ps_mm_ptr'. But, as I suspected, that did nothing. Then I noticed all the #INCLUDEs just above the declaration for 'php_builtin_extensions[]', noticing that they tended to correspond with the elements of 'php_builtin_extensions[]'. So I determined to find in which header file 'phpext_ps_mm_ptr' was being defined with 'grep -r phpext_ps_mm_ptr *'. I found it being defined in 'ext/session/mod_mm.h'; which, for some reason or another, wasn't be #INCLUDEd in 'main/internal_functions.c'. So I added the following line: #include "ext/session/mod_mm.h" Running 'make' again, 'main/internal_functions.c' compiled just fine. Except now 'main/internal_functions_cli.c' failed compilation with the same error--and, consequently, the same fix. Anyways, that's it. -- Edit bug report at http://bugs.php.net/?id=17519&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17519&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17519&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17519&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17519&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17519&r=support Expected behavior: http://bugs.php.net/fix.php?id=17519&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17519&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17519&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17519&r=globals