PHP Compile Issue in web interface

#1
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

LiteSpeed Staff
#2
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/
 
#3
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

LiteSpeed Staff
#4
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.
 
Top