php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34393 compile error: /tmp/php-5.0.4/main/reentrancy.c:193: error: too few arguments t
Submitted: 2005-09-06 16:35 UTC Modified: 2005-10-29 11:35 UTC
From: tamer23 at myrealbox dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.0.5 OS: Gentoo Linux 2005.1
Private report: No CVE-ID: None
 [2005-09-06 16:35 UTC] tamer23 at myrealbox dot com
Description:
------------
Hi!
After I installed with the instruction (as it is described in the README) Apache 2.0 I tried to compile php with this configure command:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-openssl --with-kerberos --enable-dbx



Actual result:
--------------
The compilation error results:

/tmp/php-5.0.4/main/reentrancy.c: In function `php_readdir_r':
/tmp/php-5.0.4/main/reentrancy.c:193: error: too few arguments to function `readdir_r'



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-07 08:49 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-09-07 14:17 UTC] tamer23 at myrealbox dot com
The error is the same. Even though, I have updated the gcc-compiler from 3.3.5 to 3.4.4 and the error still exists. The error message is EXACTLY the same of php-5.0.4 and that one from the CVS. 

Has it got something todo with the c++ library installed on my system?! 

Tamer
 [2005-09-07 14:29 UTC] sniper@php.net
The error can't be same for the CVS snapshot since there's nothing on line 193 in it..what's the exact error you get with the snapshot?
 [2005-09-07 23:46 UTC] sniper@php.net
I asked only for this, not for 5.0.5 and not the whole page:

/tmp/php5-200509070630/main/reentrancy.c: In function `php_readdir_r':
/tmp/php5-200509070630/main/reentrancy.c:143: error: too few arguments
to function `readdir_r'
make: *** [main/reentrancy.lo] Error 1
 [2005-09-07 23:46 UTC] sniper@php.net
Put the main/php_config.h somewhere where we can download it from. (the one from the _snapshot_ build!!!)

 [2005-09-08 09:30 UTC] tamer23 at myrealbox dot com
Sorry, missunderstanding! 

Here is the file: 
http://tamersworld.gmxhome.de/php_config.h

Thanks for your help
 [2005-09-08 12:29 UTC] sniper@php.net
Also put the config.log file online. There's something really odd going on if configure thinks your system doesn't have POSIX compliant readdir_r()..

 [2005-09-08 15:26 UTC] tamer23 at myrealbox dot com
I uploaded the log-file.  
 
Tamer 
 
http://tamersworld.gmxhome.de/config.log
 [2005-09-08 17:04 UTC] sniper@php.net
Try this configure line:

# ./configure --disable-all --disable-cgi 

 [2005-09-08 17:23 UTC] tamer23 at myrealbox dot com
./configure --disable-all --disable-cgi

Errorresults:

/tmp/php5-200509070630/ext/standard/datetime.c: In function `zif_strptime':
/tmp/php5-200509070630/ext/standard/datetime.c:261: warning: assignment makes pointer from integer without a cast
/tmp/php5-200509070630/main/reentrancy.c: In function `php_readdir_r':
/tmp/php5-200509070630/main/reentrancy.c:143: error: too few arguments to function `readdir_r'
make: *** [main/reentrancy.lo] Error 1
 [2005-09-08 17:27 UTC] sniper@php.net
Are you compiling as root..?

 [2005-09-08 17:41 UTC] tamer23 at myrealbox dot com
as user: the configure and make
and as root: make install
 [2005-09-10 23:10 UTC] sniper@php.net
The gentoo people couldn't reproduce this so I'm pretty sure it's something seriously wrong with your installation.
Feel free to reopen if you can reproduce this on some other machine too.

 [2005-10-29 11:33 UTC] tamer23 at myrealbox dot com
I solved the problem! 
The point is, that the system definitly not broken. Gentoo delivers it's distribution with it's glibc's package not compiled with the suboption "linuxthreats-tls" and "glibc-compat20"

the problem can be solved completly by merging the glibc package by hand with this command:

USE="glibc-compat20 linuxthreads-tls" emerge glibc

After merging the package, the process to compile php by hand goes without errors! the package which I compiled are apache-2.0.55 and php-5.0.5!

I guess the gentoo guys used the gentoo-overlay package, who knows....

Tamer
 [2005-10-29 11:35 UTC] tamer23 at myrealbox dot com
In this case the problem is closed!
 [2010-11-21 16:24 UTC] vsalomaki at gmail dot com
Hello.

Although this is a very old bug, I had the same problem on gentoo distro. After some digging I found out that the ./configure checks the readdir-function by reading from root of the system, aka /. If the configure-script doesn't have read rights to root, the readdir-capabilities are configured incorrectly.

Solution: Give read-rights to all with command "chmod a+r /"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 13 14:01:33 2024 UTC