#47272 [Com]: Library test for external Mysql misses -lrt and fails

2009-02-02 Thread yannick dot leny at atosorigin dot com
 ID:   47272
 Comment by:   yannick dot leny at atosorigin dot com
 Reported By:  yannick dot leny at atosorigin dot com
 Status:   Open
 Bug Type: Compile Failure
 Operating System: Sun Solaris 8 (SunOS 5.8)
 PHP Version:  5.2.8
 New Comment:

I try ld from Sun Solaris 8 Sparc and ld from GNU binutils 2.17 but
with no success.

#/usr/ccs/bin/ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.289

#/usr/local/bin/ld -V
GNU ld version 2.17
  Supported emulations:
   elf32_sparc
   elf64_sparc


Previous Comments:


[2009-02-02 10:00:53] yannick dot leny at atosorigin dot com

Description:

The library test for external Mysql static libraries fails on Solaris 8
(Sparc CPU) as it does not include -lrt and consequently always fails.

I found the same problem with Sqlite3 here :
http://bugs.php.net/bug.php?id=41794

And I try the workaround to add LDFLAGS=-lrt but it don't works.
I have a linking error when libtool try to create the libphp5.la file
:
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
I try ld from Sun Solaris and ld from binutils but with no success



I use :
 autoconf-2.63 
 automake-1.10.2 
 bison-2.4.1 
 coreutils-6.12 
 flex-2.5.35 
 gcc-3.4.6 
 libiconv-1.11 
 libintl-3.4.0 
 libsigsegv-2.6 
 libtool-1.5.24 
 m4-1.4.12 
 make-3.81 
 perl-5.8.8
 pkgconfig-0.23


Reproduce code:
---
Configure parameters :

CFLAGS=-O3 -mcpu=ultrasparc -mtune=ultrasparc CC=gcc CXX=gcc \
CPPFLAGS=-I/opt/apache-2.2.11/lib/openssl-0.9.8j/\
include/openssl \
-I/opt/apache-2.2.11/lib/openldap-2.4.11/include \
-I/opt/apache-2.2.11/lib/libxml2-2.6.32/include \
LDFLAGS=-R/opt/apache-2.2.11/lib/libgcc-3.4.2/lib \
-R/opt/apache-2.2.11/lib/oracle-10.2.0.4/lib \
-L/opt/apache-2.2.11/lib/libgcc-3.4.2/lib \
-L/opt/apache-2.2.11/lib/openssl-0.9.8j/lib \
-L/opt/apache-2.2.11/lib/openldap-2.4.11/lib \
-L/opt/apache-2.2.11/lib/libxml2-2.6.32/lib \
./configure \
--prefix=/opt/apache-2.2.11/php-5.2.8 \
--with-apxs2=/opt/apache-2.2.11/bin/apxs \
--with-config-file-path=/opt/apache-2.2.11/php-5.2.8 \
--with-libxml-dir=/opt/apache-2.2.11/lib/\
libxml2-2.6.32 \
--with-openssl=/opt/apache-2.2.11/lib/openssl-0.9.8j \
--with-pcre-regex \
--with-zlib=/opt/apache-2.2.11/lib/zlib-1.2.3 \
--with-bz2=shared,/opt/apache-2.2.11/lib/\
bzip2-1.0.5 \
--enable-calendar \
--enable-ctype \
--with-curl=shared,/opt/apache-2.2.11/lib/curl-7.19.3
--enable-dom \
--enable-filter \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/opt/apache-2.2.11/lib/jpeg-6b \
--with-png-dir=/opt/apache-2.2.11/lib/libpng-1.2.34 \
--with-ttf=/usr \
--with-freetype-dir=/opt/apache-2.2.11/lib/\
freetype-2.3.8 \
--enable-gd-native-ttf \
--enable-hash \
--with-gettext=shared,/opt/apache-2.2.11/lib/\
gettext-0.17 \
--with-iconv-dir=/opt/apache-2.2.11/lib/libiconv-1.12 \
--enable-json \
--with-ldap=/opt/apache-2.2.11/lib/openldap-2.4.11 \
--enable-mbstring=shared \
--with-mcrypt=shared,/opt/apache-2.2.11/lib/\
libmcrypt-2.5.8 \
--with-mysql=shared,/opt/apache-2.2.11/lib/mysql-5.1.30 \
--with-mysqli=/opt/apache-2.2.11/lib/\
mysql-5.1.30/bin/mysql_config \
--with-oci8=shared,/opt/apache-2.2.11/lib/\
oracle-10.2.0.4 \
--enable-pdo \
--with-pdo-mysql=shared,/opt/apache-2.2.11/lib/mysql-5.1.30 \
--with-pdo-oci=shared,/opt/apache-2.2.11/lib/oracle-10.2.0.4 \
--without-pdo-sqlite \
--enable-posix \
--enable-reflection \
--enable-session \
--with-mm=/opt/apache-2.2.11/lib/mm-1.4.2 \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--enable-spl \
--without-sqlite \
--enable-tokenizer \
--enable-xml \
--enable-xmlreader \
--enable-xmlwriter \
--with-xsl=shared,/opt/apache-2.2.11/lib/\
libxslt-1.1.24 \
--enable-zip=shared \
--disable-static --enable-shared --with-pic


1) Configure error because PHP configure don't use -lrt option 

*snip*
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for
more information.
make: Fatal error: No arguments to build


config.log:
configure:56417: checking for mhash support
configure:56901: checking whether to include mime_magic support
configure:57267: checking for MING support
configure:58507: checking for mSQL support
configure:59028: checking for MSSQL support via FreeTDS
configure:59689: checking for MySQL support
configure:59736: checking for specified location of the MySQL UNIX
socket
configure:59794: checking for MySQL UNIX socket location
configure:59985: checking for mysql_close in -lmysqlclient
configure:60004: gcc -o conftest -I/usr

#47272 [NEW]: Library test for external Mysql misses -lrt and fails

2009-02-02 Thread yannick dot leny at atosorigin dot com
From: yannick dot leny at atosorigin dot com
Operating system: Sun Solaris 8 (SunOS 5.8)
PHP version:  5.2.8
PHP Bug Type: Compile Failure
Bug description:  Library test for external Mysql misses -lrt and fails

Description:

The library test for external Mysql static libraries fails on Solaris 8
(Sparc CPU) as it does not include -lrt and consequently always fails.

I found the same problem with Sqlite3 here :
http://bugs.php.net/bug.php?id=41794

And I try the workaround to add LDFLAGS=-lrt but it don't works.
I have a linking error when libtool try to create the libphp5.la file :
ld: fatal: relocations remain against allocatable but non-writable
sections
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
I try ld from Sun Solaris and ld from binutils but with no success



I use :
 autoconf-2.63 
 automake-1.10.2 
 bison-2.4.1 
 coreutils-6.12 
 flex-2.5.35 
 gcc-3.4.6 
 libiconv-1.11 
 libintl-3.4.0 
 libsigsegv-2.6 
 libtool-1.5.24 
 m4-1.4.12 
 make-3.81 
 perl-5.8.8
 pkgconfig-0.23


Reproduce code:
---
Configure parameters :

CFLAGS=-O3 -mcpu=ultrasparc -mtune=ultrasparc CC=gcc CXX=gcc \
CPPFLAGS=-I/opt/apache-2.2.11/lib/openssl-0.9.8j/\
include/openssl \
-I/opt/apache-2.2.11/lib/openldap-2.4.11/include \
-I/opt/apache-2.2.11/lib/libxml2-2.6.32/include \
LDFLAGS=-R/opt/apache-2.2.11/lib/libgcc-3.4.2/lib \
-R/opt/apache-2.2.11/lib/oracle-10.2.0.4/lib \
-L/opt/apache-2.2.11/lib/libgcc-3.4.2/lib \
-L/opt/apache-2.2.11/lib/openssl-0.9.8j/lib \
-L/opt/apache-2.2.11/lib/openldap-2.4.11/lib \
-L/opt/apache-2.2.11/lib/libxml2-2.6.32/lib \
./configure \
--prefix=/opt/apache-2.2.11/php-5.2.8 \
--with-apxs2=/opt/apache-2.2.11/bin/apxs \
--with-config-file-path=/opt/apache-2.2.11/php-5.2.8 \
--with-libxml-dir=/opt/apache-2.2.11/lib/\
libxml2-2.6.32 \
--with-openssl=/opt/apache-2.2.11/lib/openssl-0.9.8j \
--with-pcre-regex \
--with-zlib=/opt/apache-2.2.11/lib/zlib-1.2.3 \
--with-bz2=shared,/opt/apache-2.2.11/lib/\
bzip2-1.0.5 \
--enable-calendar \
--enable-ctype \
--with-curl=shared,/opt/apache-2.2.11/lib/curl-7.19.3
--enable-dom \
--enable-filter \
--enable-ftp \
--with-gd \
--with-jpeg-dir=/opt/apache-2.2.11/lib/jpeg-6b \
--with-png-dir=/opt/apache-2.2.11/lib/libpng-1.2.34 \
--with-ttf=/usr \
--with-freetype-dir=/opt/apache-2.2.11/lib/\
freetype-2.3.8 \
--enable-gd-native-ttf \
--enable-hash \
--with-gettext=shared,/opt/apache-2.2.11/lib/\
gettext-0.17 \
--with-iconv-dir=/opt/apache-2.2.11/lib/libiconv-1.12 \
--enable-json \
--with-ldap=/opt/apache-2.2.11/lib/openldap-2.4.11 \
--enable-mbstring=shared \
--with-mcrypt=shared,/opt/apache-2.2.11/lib/\
libmcrypt-2.5.8 \
--with-mysql=shared,/opt/apache-2.2.11/lib/mysql-5.1.30 \
--with-mysqli=/opt/apache-2.2.11/lib/\
mysql-5.1.30/bin/mysql_config \
--with-oci8=shared,/opt/apache-2.2.11/lib/\
oracle-10.2.0.4 \
--enable-pdo \
--with-pdo-mysql=shared,/opt/apache-2.2.11/lib/mysql-5.1.30 \
--with-pdo-oci=shared,/opt/apache-2.2.11/lib/oracle-10.2.0.4 \
--without-pdo-sqlite \
--enable-posix \
--enable-reflection \
--enable-session \
--with-mm=/opt/apache-2.2.11/lib/mm-1.4.2 \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--enable-spl \
--without-sqlite \
--enable-tokenizer \
--enable-xml \
--enable-xmlreader \
--enable-xmlwriter \
--with-xsl=shared,/opt/apache-2.2.11/lib/\
libxslt-1.1.24 \
--enable-zip=shared \
--disable-static --enable-shared --with-pic


1) Configure error because PHP configure don't use -lrt option 

*snip*
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more
information.
make: Fatal error: No arguments to build


config.log:
configure:56417: checking for mhash support
configure:56901: checking whether to include mime_magic support
configure:57267: checking for MING support
configure:58507: checking for mSQL support
configure:59028: checking for MSSQL support via FreeTDS
configure:59689: checking for MySQL support
configure:59736: checking for specified location of the MySQL UNIX socket
configure:59794: checking for MySQL UNIX socket location
configure:59985: checking for mysql_close in -lmysqlclient
configure:60004: gcc -o conftest -I/usr/local/include -O3 -mcpu=ultrasparc
-mtune=ultrasparc -I/opt/apache-2.2.11/lib/openssl-0.9.8j/include/openssl
 -I/opt/apache-2.2.11/lib/openldap-2.4.11/include
-I/opt/apache-2.2.11/lib/libxml2-2.6.32/include
-I/opt/apache-2.2.11/lib/curl-
7.19.3/include -D_POSIX_PTHREAD_SEMANTICS
-R/opt/apache-2.2.11/lib/mysql-5.1.30/lib/mysql
-L/opt/apache-2.2.11/lib/mysql-5.1.30/lib/mysql
-liconv -L/usr/local/lib -R/opt/apache-2.2.11/lib/libgcc-3.4.6/lib
-R/opt/apache-2.2.11/lib/oracle