php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35443 Configuration script missing that system doesn't have old style readdir_r
Submitted: 2005-11-28 12:42 UTC Modified: 2005-11-28 13:28 UTC
From: paniemin at cc dot hut dot fi Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.0 OS: Red Hat Linux 7.3
Private report: No CVE-ID: None
 [2005-11-28 12:42 UTC] paniemin at cc dot hut dot fi
Description:
------------
I think that this bug is low priority.

I tried to uprade from php 5.0 to 5.1 on web server where I don't have root privilegs.

I faced build failure:
/home/customers/antin/php5.1/php-5.1.0/main/reentrancy.c: In function `php_readdir_r':
/home/customers/antin/php5.1/php-5.1.0/main/reentrancy.c:143: too few arguments to function `readdir_r'
make: *** [main/reentrancy.lo] Error 1


The problem seems to be that systems is quite old. I think that makes bug low priority or irrelevant.
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)


I found that actual problem is that HAVE_OLD_READDIR_R is set even thought the system doesn't include correct version. It builds well when I change source code so that pre-complier choose else branch in reentrancy.c.

I tried to check the configuration script but I'm not familiar with autoconf style so I cannot say what is the exact problem in this system. 

configure:
'./configure' \
'--enable-sysvshm' \
'--enable-pcntl' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-jpeg-dir' \
'--with-png-dir' \
'--enable-sysvsem' \
'--with-zlib' \
'--prefix=~/php5.1' \
'--enable-discard-path' \
'--with-bz2' \
'--with-libxml-dir=~/libxml2/' \
'--with-freetype-dir=~/freetype' \
'--with-ttf' \

I can build the PHP5.1 but I just wanted to inform that there maybe problems with older systems.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-28 12:50 UTC] sniper@php.net
1) There is no such GCC version as 2.96, see:
    http://gcc.gnu.org/gcc-2.96.html
2) Check your config.nice file and see if you have any empty lines after the options.

 [2005-11-28 13:28 UTC] paniemin at cc dot hut dot fi
Ok. Maybe I don't know about gcc versions. But that is what gcc -v sayes :)


The think is that I have compiled it and all php code works well. The compile failure is because the problem in configuration script that sets HAVE_OLD_READDIR_R even thought system don't support it.

I can easily change php_config.h so that everything works but it might help someone else if the problem is solved in acinclude.m4 in line 1280:
AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;

That line is execute even there isn't support for old-style readdir_r.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 21:01:33 2025 UTC