From: toconnell at southcomm dot com Operating system: Fedora Core 3 PHP version: 4.4.8 PHP Bug Type: Compile Failure Bug description: using PHP 4 optimization leaves request_rec undeclared in apc_cache_expunge
Description: ------------ I have an FC3 server on which I've built Apache 1.3.41 and PHP 4.4.8 from source. I just downloaded the latest stable tarball of APC (3.0.18). Per the recommendation for optimizing against PHP 4 in INSTALL, I modified my CPPFLAGS to reference httpd.h and the APC_PHP4_STAT macro. But I get an undeclared identifier error from gcc. Reproduce code: --------------- Here's my bash command: export CPPFLAGS="-I/path/to/apache/include -DAPC_PHP4_STAT" Here's my configure string: configure --enable-apc --with-php-config=/path/to/php-config --with-apxs=/path/to/apxs Expected result: ---------------- I expected APC to build successfully. Actual result: -------------- gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/gdbm -DUSE_HSREGEX - I. -I/path/to/APC-3.0.18 -DPHP_ATOM_INC -I/path/to/APC-3.0.18/include -I/path/to/APC-3.0.18/main -I/path/to/APC-3.0.18 - I/path/to/php/include/php -I/path/to/php/include/php/main - I/path/to/php/include/php/TSRM -I/path/to/php/include/php/Zend - I/path/to/apache/include -DAPC_PHP4_STAT -DHAVE_CONFIG_H -g -O2 -c /path/to/APC-3.0.18/apc_cache.c -fPIC -DPIC -o apc_cache.lo /path/to/APC-3.0.18/apc_cache.c: In function `apc_cache_expunge': /path/to/APC-3.0.18/apc_cache.c:318: error: `request_rec' undeclared (first use in this function) /path/to/APC-3.0.18/apc_cache.c:318: error: (Each undeclared identifier is reported only once /path/to/APC-3.0.18/apc_cache.c:318: error: for each function it appears in.) /path/to/APC-3.0.18/apc_cache.c:318: error: syntax error before ')' token make: *** [apc_cache.lo] Error 1 If I add an include statement for "httpd.h" directly to apc_cache.c, I am able to build successfully. -- Edit bug report at http://bugs.php.net/?id=44747&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44747&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44747&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44747&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44747&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44747&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44747&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44747&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44747&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44747&r=support Expected behavior: http://bugs.php.net/fix.php?id=44747&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44747&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44747&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44747&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44747&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44747&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44747&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44747&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44747&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44747&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44747&r=mysqlcfg
