Bug #60019 [Opn->Csd]: Function time_nanosleep() is undefined on OS X
| From: | iliaa@php.net | Date: | Fri, 14 Oct 2011 12:43:37 +0000 |
| Subject: | Bug #60019 [Opn->Csd]: Function time_nanosleep() is undefined on OS X | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164322@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60019&edit=1
ID: 60019
Updated by: iliaa@php.net
Reported by: php-bugs-2011 at ryandesign dot com
Summary: Function time_nanosleep() is undefined on OS X
-Status: Open
+Status: Closed
Type: Bug
Package: *Compile Issues
Operating System: OS X 10.6.8
PHP Version: 5.3.8
-Assigned To:
+Assigned To: iliaa
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-10-14 12:43:27] iliaa@php.net
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=318106
Log: Fixed bug #60019 (Function time_nanosleep() is undefined on OS X).
------------------------------------------------------------------------
[2011-10-08 23:45:59] php-bugs-2011 at ryandesign dot com
Description:
------------
Between PHP 5.3.3 and 5.3.4 the detection of the C nanosleep function
got broken on OS X, such that the time_nanosleep PHP function is no
longer available.
This problem was previously reported on Stack Overflow:
http://stackoverflow.com/questions/7503250
And to the MacPorts project:
https://trac.macports.org/ticket/31530
The fix for PHP bug 50345 seems to be the culprit. I fixed it in
MacPorts by reverting the change that resolved that bug (this is
what's in the attached patch), but this probably re-opens bug 50345.
PHP is looking for the nanosleep C function in the "rt" library, but
there is no such library on Mac OS X, leading to this error in the
config.log:
ld: library not found for -lrt
Thus the test for existence of the nanosleep C function fails, and
therefore PHP gets built without the time_nanosleep PHP function.
Test script:
---------------
php -r 'echo (int)function_exists("time_nanosleep")."\n";'
Expected result:
----------------
1
Actual result:
--------------
0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60019&edit=1