#50517 [Opn->Fbk]: --with-libxml-dir too late in EXTRA_LDFLAGS
ID: 50517
Updated by: jani@php.net
Reported By: Bjorn dot Wiberg at its dot uu dot se
-Status: Open
+Status: Feedback
Bug Type: Compile Warning
Operating System: IBM AIX 5.3 5300-08-01-0819
PHP Version: 5.2.12
New Comment:
Do you have LDFLAGS set to something there?
Previous Comments:
------------------------------------------------------------------------
[2009-12-18 16:25:44] Bjorn dot Wiberg at its dot uu dot se
Correction:
EXTRA_LDFLAGS="-L/usr/local/lib" ./configure ...
...should be used as a workaround.
------------------------------------------------------------------------
[2009-12-18 14:03:20] Bjorn dot Wiberg at its dot uu dot se
By the way, no such "anomalies" in PHP 5.3.1 (i.e. everything still
works with PHP 5.3.1).
------------------------------------------------------------------------
[2009-12-18 14:02:30] Bjorn dot Wiberg at its dot uu dot se
Description:
------------
As of PHP 5.2.12, the EXTRA_LDFLAGS line in the Makefile (after running
configure) contains the directory pointed to by
--with-libxml-dir=/usr/local too late, i.e. after -L/usr/lib, causing
the IBM bundled /usr/lib/libxml2.a(libxml2.shr.o) to also be included
during linking instead of only /usr/local/lib/libxml2.a(libxml2.so.2).
This despite no changes on the configure line since PHP 5.2.11.
I just wanted to alert you that this may cause problems (unnecessary
dependency problems and probably a version collision between the two XML
libraries) for those on IBM AIX.
A possible workaround is to specify EXTRA_LDFLAGS=/usr/local/lib
./configure ... so that configure will pick it up and specify it first
among the EXTRA_LDFLAGS.
Reproduce code:
---------------
#! /bin/sh
#
# Created by configure
'./configure' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-cli' \
'--enable-dba' \
'--enable-dbase' \
'--enable-debug' \
'--enable-exif' \
'--enable-embedded-mysqli' \
'--enable-flatfile' \
'--enable-ftp' \
'--enable-gd-jis-conv' \
'--enable-gd-native-ttf' \
'--enable-inifile' \
'--enable-mbstring' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sqlite-utf8' \
'--enable-sysvmsg' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-zip' \
'--enable-zend-multibyte' \
'--prefix=/apache/php' \
'--with-apxs2=/apache/bin/apxs' \
'--with-bz2' \
'--with-cdb' \
'--with-curl' \
'--with-freetype-dir' \
'--with-gd' \
'--with-gdbm' \
'--with-gettext' \
'--with-jpeg-dir' \
'--with-ldap' \
'--with-libxml-dir=/usr/local' \
'--with-mime-magic' \
'--with-mysql=/usr/local/mysql' \
'--with-openssl=/opt/freeware' \
'--with-png-dir' \
'--with-ttf' \
'--with-xmlrpc' \
'--with-xpm-dir' \
'--with-xsl' \
'--with-zlib' \
'--with-zlib-dir' \
"$@"
bwiberg@melody-lp04:~$ /usr/local/bin/xml2-config --libs
-L/usr/local/lib -lxml2 -lz -lpthread -liconv -lm
Expected result:
----------------
No change in EXTRA_LDFLAGS between the versions.
Actual result:
--------------
PHP 5.2.12:
EXTRA_LDFLAGS = -Wl,-brtl
-Wl,-bI:$(INSTALL_ROOT)/apache/modules/httpd.exp -avoid-version -module
-L/usr/lib -L/usr/local/lib -L/usr/local/lib -L/opt/freeware/lib
-L/opt/freeware/lib -L/usr/X11R6/lib -L/usr/X11R6
/lib -L/usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr/local/lib
-L/opt/freeware/lib -L/usr/X11R6/lib -L/usr/local/mysql/lib
(Notice -L/usr/lib popping up before -L/usr/local/lib. Also notice the
X11R6 and MySQL stuff popping up here.)
PHP 5.2.11:
EXTRA_LDFLAGS = -Wl,-brtl
-Wl,-bI:$(INSTALL_ROOT)/apache/modules/httpd.exp -avoid-version -module
-L/usr/local/lib -L/opt/freeware/lib -L/usr/X11R6/lib
-L/usr/local/mysql/lib
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50517&edit=1
Thread (8 messages)