From:             Bjorn dot Wiberg at its dot uu dot se
Operating system: IBM AIX 5.3 5300-08-01-0819
PHP version:      5.2.12
PHP Bug Type:     Compile Warning
Bug description:  --with-libxml-dir too late in EXTRA_LDFLAGS

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' \
"$@"


bwib...@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 bug report at http://bugs.php.net/?id=50517&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50517&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50517&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50517&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50517&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50517&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50517&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50517&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50517&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50517&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50517&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50517&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50517&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50517&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50517&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50517&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50517&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50517&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50517&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50517&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50517&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50517&r=mysqlcfg

Reply via email to