#50695 [Opn->Csd]: PHP uses system XML2 when custom xml2 is given

From: Date: Sat, 09 Jan 2010 18:45:08 +0000
Subject: #50695 [Opn->Csd]: PHP uses system XML2 when custom xml2 is given
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146490@lists.php.net to get a copy of this message
ID: 50695 Updated by: jani@php.net Reported By: quanah at zimbra dot com -Status: Open +Status: Closed Bug Type: Compile Failure Operating System: Linux PHP Version: 5.2.12 New Comment: Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ It's already fixed for next release. Previous Comments: ------------------------------------------------------------------------ [2010-01-08 18:17:47] quanah at zimbra dot com As seen here: s%@EXTRA_LDFLAGS@% -avoid-version -module -L/usr/lib <....> ------------------------------------------------------------------------ [2010-01-08 18:13:38] quanah at zimbra dot com I'm only seeing this on 32-bit linux systems, and I see why. For some reason, a very bad decision was made to force linking against /usr/lib: configure:2846: gcc -o conftest -g -O2 conftest.c -R /usr/lib 1>&5 /usr/lib: file not recognized: Is a directory configure:2879: gcc -o conftest -g -O2 conftest.c -Wl,-rpath,/usr/lib 1>&5 configure:46629: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/opt/zimbra/libxml2-2.6.32.1/lib -L/opt/zimbra/libxml2-2.6.32.1/lib conftest.c -lrt -lresolv -lm -ldl -lnsl - lxml2 -lz -lm -lxml2 -lz -lm 1>&5 configure:46901: gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/opt/zimbra/libxml2-2.6.32.1/lib -L/opt/zimbra/libxml2-2.6.32.1/lib conftest.c -lrt -lresolv -lm -ldl -lnsl - lxml2 -lz -lm -lxml2 -lz -lm 1>&5 Which of course overrides custom locations. SEe how -L/usr/lib is used all over the place. The reason I don't see it as an issue on 64 bit RHEL systems is because the libs are in /usr/lib64. ------------------------------------------------------------------------ [2010-01-08 18:07:28] quanah at zimbra dot com Description: ------------ I build PHP against my own build of libxml2. However, starting with PHP 5.2.12, it now links against the system xml2 in addition to my xml2, causing symbol failures: # Libraries that this one depends upon. dependency_libs=' -lcrypt -lcrypt -lrt -lrt -lm -lz -lm -lz -lm -lz -lm -lcrypt -lz -lm -lz -lm -lz -lm -lcrypt -L/usr/lib -L/opt/zimbra/libxml2-2.6.32.1/lib -L/opt/zimbra/aspell-0.60.6/lib -lcrypt -lcrypt /opt/zimbra/aspell-0.60.6/lib/libpspell.la /opt/zimbra/aspell-0.60.6/lib/libaspell.la -lrt -lrt -lresolv -lm -ldl -lnsl -lz -lm -lz -lm -lz -lm -lcrypt -lz -lm -lz -lm /usr/lib/libxml2.la -lpthread -lz -lm -lz -lm -lcrypt' [build@build01 .libs]$ ldd libphp5.so <snip> libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00157000) </snip> Note my libxml2 is a static library. Reproduce code: --------------- Configure against a custom libxml2 build: ./configure --with-libxml-dir=/opt/zimbra/libxml2-2.6.32.1 Expected result: ---------------- Only my libxml2 is used Actual result: -------------- System xml2 is linked in ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50695&edit=1

« previous php.bugs (#146490) next »