ID: 41794
User updated by: geoffwa at cs dot rmit dot edu dot au
Reported By: geoffwa at cs dot rmit dot edu dot au
Status: Open
Bug Type: Compile Failure
Operating System: Solaris 10
PHP Version: 5.2.3
New Comment:
The following patch allows PHP to configure and build successfully:
--- php-old/configure.in 2007-05-31 04:45:59.000000000 +1000
+++ php-new/configure.in 2007-06-25 17:16:31.902000000 +1000
@@ -326,4 +326,6 @@
PHP_CHECK_FUNC(dn_skipname, resolv, bind)
+dnl I wish Solaris came with a
/usr/lib/pkgconfig/normal_base_system.pc
+PHP_CHECK_LIBRARY(rt, nanosleep, [PHP_ADD_LIBRARY(rt)], [])
dnl Then headers.
I used PHP_CHECK_LIBRARY in lieu of PHP_CHEC_FUNC as the later picks
up a __nanosleep() symbol from Sun's libc, and
ext/standard/basic_functions.c makes use of nanosleep()
Previous Comments:
------------------------------------------------------------------------
[2007-06-25 05:21:41] geoffwa at cs dot rmit dot edu dot au
Description:
------------
The library test for external SQLite3 libraries fails on Solaris 10
as it does not include -lrt and consequently always fails.
When building with bundled sqlite3 library, there is a test
for -lrt on line 122 of ext/pdo_sqlite/config.m4:
dnl Solaris fix
PHP_CHECK_LIBRARY(rt, fdatasync, [
PHP_ADD_LIBRARY(rt,, PDO_SQLITE_SHARED_LIBADD)])
This test could be moved so it's usable by both the bundled and
non-bundled builds.
(I'd offer a patch but my M4 foo is weak)
Reproduce code:
---------------
shell:
./configure --prefix=/usr/local --with-pdo-sqlite=shared,/usr/local
*snip*
checking for sqlite 3 support for PDO... yes, shared
checking for PDO includes... (cached) /export/work/php-5.2.3/ext
checking for sqlite3_open in -lsqlite3... no
configure: error: wrong sqlite lib version or lib not found
config.log:
configure:76889: cc -o conftest -I/usr/include -O -I/usr/local/include
-D_POSIX_PTHREAD_SEMANTICS -R/usr/local/lib -L/usr/local/lib -L/usr/lib
-L/usr/local/
lib -R/usr/local/lib -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib
-L/usr/local/lib -lm conftest.c -lsqlite3 -lintl -lbz2 -lz -lpcre
-lresolv -lm -lnsl -ls
ocket -lxml2 -lz -lm -lsocket -lnsl -lxml2 -lz -lm -lsocket -lnsl
1>&5
Undefined first referenced
symbol in file
fdatasync /usr/local/lib/libsqlite3.so
ld: fatal: Symbol referencing errors. No output written to conftest
configure: failed program was:
#line 76878 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char sqlite3_open();
int main() {
sqlite3_open()
; return 0; }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41794&edit=1