LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   PHP (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=19)
-   -   PHP Compile Issue in web interface (http://www.litespeedtech.com/support/forum/showthread.php?t=2138)

quags 06-18-2008 01:35 PM

PHP Compile Issue in web interface
 
I'm having a php compile issue through the web interface.

Code:

/bin/sh /opt/lsws/phpbuild/php-5.2.5/libtool --silent --preserve-dup-deps --mode=compile gcc  -Imain/ -I/opt/lsws/phpbuild/php-5.2.5/main/ -DPHP_ATOM_INC -I/opt/lsws/phpbuild/php-5.2.5/include -I/opt/lsws/phpbuild/php-5.2.5/main -I/opt/lsws/phpbuild/php-5.2.5 -I/opt/xml2/include/libxml2 -I/opt/curlssl//include -I/opt/lsws/phpbuild/php-5.2.5/ext/date/lib -I/usr/include/freetype2 -I/opt/php_with_imap_client//include -I/opt/lsws/phpbuild/php-5.2.5/ext/mbstring/oniguruma -I/opt/lsws/phpbuild/php-5.2.5/ext/mbstring/libmbfl -I/opt/lsws/phpbuild/php-5.2.5/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/opt/lsws/phpbuild/php-5.2.5/TSRM -I/opt/lsws/phpbuild/php-5.2.5/Zend    -I/usr/include -g -O2  -c /opt/lsws/phpbuild/php-5.2.5/main/reentrancy.c -o main/reentrancy.lo
/opt/lsws/phpbuild/php-5.2.5/main/reentrancy.c: In function 'php_readdir_r':
/opt/lsws/phpbuild/php-5.2.5/main/reentrancy.c:139: error: too few arguments to function 'readdir_r'
make: *** [main/reentrancy.lo] Error 1

I've tried both 5.2.5 and 5.2.6. I removed the mail header patch to see if it maid any difference and it did not. Anyone see this error before? I am switching from apache and PHP did compile with the same options before and this is the first time I've had a PHP error in the web interface for a compile I couldn't fix.

mistwang 06-18-2008 01:48 PM

Which OS are you using?

For some reason, the "configure" script failed to properly detect "readdir_r()" system function all in order to define "HAVE_POSIX_READDIR_R" macro. Maybe you should check your config.log under /opt/lsws/phpbuild/php-5.2.5/

quags 06-18-2008 02:20 PM

OS is centos5.

It seems to work manually when make clean; export CFLAGS="-I/usr/include"; then the compile line from config.log is run.

mistwang 06-18-2008 02:34 PM

Maybe gcc find a wrong "dirent.h" file in a directory specified by "-I..." or could not find it at all. Try rearrange the configuration parameters see if you can make "-I/usr/include" the first gcc "-I..." option.


All times are GMT -7. The time now is 06:23 PM.