Bug #50345 [Asn->ReO]: nanosleep not detected properly on some solaris versions
| From: | uw@php.net | Date: | Tue, 05 Oct 2010 13:27:51 +0000 |
| Subject: | Bug #50345 [Asn->ReO]: nanosleep not detected properly on some solaris versions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-154925@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50345&edit=1
ID: 50345
Updated by: uw@php.net
Reported by: sle at ocf dot berkeley dot edu
Summary: nanosleep not detected properly on some solaris
versions
-Status: Assigned
+Status: Re-Opened
Type: Bug
Package: Compile Failure
Operating System: Solaris 10
PHP Version: 5.3.1
Assigned To: tony2001
Block user comment: N
New Comment:
This would fix it, could someone double-check and apply the patch?
nixnutz@linux-fuxh:~/php/php-src/branches/PHP_5_3> svn diff
configure.in
Index: configure.in
===================================================================
--- configure.in (Revision 304085)
+++ configure.in (Arbeitskopie)
@@ -611,7 +611,7 @@
)
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
-PHP_CHECK_FUNC(nanosleep, rt)
+PHP_CHECK_FUNC_LIB(nanosleep, rt)
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
Previous Comments:
------------------------------------------------------------------------
[2010-10-04 13:28:13] uw@php.net
According to previous bug comments this commit should be reverted:
nixnutz@linux-fuxh:~/php/php-src/branches/PHP_5_3> svn diff
-r297960:297961
Index: configure.in
===================================================================
--- configure.in (Revision 297960)
+++ configure.in (Revision 297961)
@@ -611,7 +611,7 @@
)
svn log -r297961
------------------------------------------------------------------------
r297961 | tony2001 | 2010-04-13 14:41:46 +0200 (Di, 13. Apr 2010) | 2
Zeilen
simplify configure check for nanosleep()
------------------------------------------------------------------------
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
-AC_CACHE_CHECK([for nanosleep], ac_cv_func_nanosleep,
[PHP_CHECK_FUNC_LIB(nanosleep, rt)])
+PHP_CHECK_FUNC(nanosleep, rt)
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
Antony, can you shed some light on it? Thanks!
------------------------------------------------------------------------
[2010-10-04 13:19:32] uw@php.net
Manually setting -lrt will fix it, but maybe this could be fixed in the
source? This breaks Solaris 8, 9 and 10 builds. Any PHP version since at
least 5.3.1 is affected.
NAME
nanosleep - high resolution sleep
SYNOPSIS
cc [ flag... ] file... -lrt [ library... ]
#include <time.h>
int nanosleep(const struct timespec *rqtp, struct timespec
*rmtp);
------------------------------------------------------------------------
[2010-09-17 19:42:57] svinopas at gmail dot com
I am experiencing this issue on Solaris 09/10 SPARC and 5.3.3.
Is there fix available yet?
------------------------------------------------------------------------
[2010-07-23 13:52:58] rainer dot jung at kippdata dot de
Sorry: I meant r297961.
BTW: this is a regression, it was already fixed successful in 5.3.2.
------------------------------------------------------------------------
[2010-07-23 13:51:25] rainer dot jung at kippdata dot de
Unfortunately the issue needs to be reopened.
The change in revision 297960 reintroduced this problem, at least on
Solaris 8, but likely also on more modern Solaris.
Before the change library rt was added to EXTRA_LIBS, after the change
the symbol __nanosleep is found and the library no longer added. During
linking we then get (as expected):
Undefined first referenced
symbol in file
nanosleep
ext/standard/.libs/basic_functions.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
Observed for version 5.3.3.
Reverting the pseudo-optimization in r297960 fixes the issue.
Thanks for considering this,
Rainer
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=50345
--
Edit this bug report at http://bugs.php.net/bug.php?id=50345&edit=1