php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60019 Function time_nanosleep() is undefined on OS X
Submitted: 2011-10-08 23:45 UTC Modified: 2011-10-14 12:43 UTC
From: php-bugs-2011 at ryandesign dot com Assigned: iliaa (profile)
Status: Closed Package: *Compile Issues
PHP Version: 5.3.8 OS: OS X 10.6.8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs-2011 at ryandesign dot com
New email:
PHP Version: OS:

 

 [2011-10-08 23:45 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-14 12:43 UTC] 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-14 12:43 UTC] iliaa@php.net
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.


 [2011-10-14 12:43 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4ee578f8a1777ddd1a8498eaab7af969d38862ef
Log: Fixed bug #60019 (Function time_nanosleep() is undefined on OS X).
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4ee578f8a1777ddd1a8498eaab7af969d38862ef
Log: Fixed bug #60019 (Function time_nanosleep() is undefined on OS X).
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of iliaa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4ee578f8a1777ddd1a8498eaab7af969d38862ef
Log: Fixed bug #60019 (Function time_nanosleep() is undefined on OS X).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC