Edit report at http://bugs.php.net/bug.php?id=49858&edit=1
ID: 49858
Comment by: marcus at lastcraft dot com
Reported by: me at madjack dot ru
Summary: Compile flag --with-libxml-dir don't work as
expected
Status: Bogus
Type: Bug
Package: Compile Failure
Operating System: Mac Os X 10.5.7
PHP Version: 5.3SVN-2009-10-13 (snap)
Block user comment: N
Private report: N
New Comment:
Hi...
I have this same problem with a vanilla MacOS 10.4 machine. It's nothing
to do with his libraries and everything to do with building with
Postgres support.
yours, Marcus
Previous Comments:
------------------------------------------------------------------------
[2009-10-19 11:15:36] [email protected]
If you have messed up your system with several different versions of
libraries, there's nothing we can do but wish you good luck..
------------------------------------------------------------------------
[2009-10-13 07:41:00] me at madjack dot ru
The only way to fix this bug for me:
Configure php with all needed options, Then remove libxml2 binaries from
/Library/PostgreSQL/8.4/lib compile and install php, restore libs to
PostgreSQL home.
------------------------------------------------------------------------
[2009-10-13 07:18:30] me at madjack dot ru
Description:
------------
I have 3 or more different libxml2 libraries in the system. Standard
MacOS X libxml2 located in /usr/lib and has version 9.0. When i compile
PHP of any version begin from 5.3.0 include last snap with flag --with-
pdo-pgsql it compiles fine, but PostgreSQL 8.4 has own libxml2 version
10.0.1 and can't compile with libxml2 9.0. So without postgresql php
compiles fine, but with postgresql it compiles fine but don't run. It
says error:
dyld: Library not loaded: libxml2.2.dylib
Referenced from: /Volumes/DevHD/Developer/Sources/php/php5.3-
200910120830/sapi/cli/php
Reason: Incompatible library version: php requires version 10.0.0 or
later, but libxml2.2.dylib provides version 9.0.0
Reproduce code:
---------------
Configure and make script
---- cut here ----
#!/bin/sh
./configure --disable-all \
--with-interbase \
--with-apxs2 \
--enable-libxml \
--with-pcre-regex=yes \
--with-regex=php \
--with-zend-vm=CALL \
--enable-zend-multibyte \
--disable-ipv6 \
--prefix=/usr/local \
--with-zlib \
--enable-soap \
--enable-dom \
--enable-session \
--enable-libxml \
--with-libxml-dir=/Library/PostgreSQL/8.4 \
--enable-simplexml \
--enable-xml \
--enable-tokenizer \
--enable-json \
--enable-pdo \
--with-pdo-firebird=/Library/Frameworks/Firebird.framework \
--with-pdo-pgsql=/Library/PostgreSQL/8.4 \
--with-pear \
--with-xsl
make
"EXTRA_INCLUDES=-I/Library/Frameworks/Firebird.framework/Versions/A/Headers/"
\
"EXTRA_LIBS=-lresolv -lexslt -lpq -lfbclient -lz -lm -lxml2 -licucore
-lxslt"
echo "--------------------------------"
echo "Test for compilance with libxml2"
echo "--------------------------------"
otool -L ./sapi/cli/php
echo "--------------------------------"
./sapi/cli/php -v
---- cut here ----
Expected result:
----------------
Php must use libxml2 not from /usr/lib. It must use libxml2 from
/Library/PostgreSQL/8.4/lib.
Actual result:
--------------
Build complete.
Don't forget to run 'make test'.
--------------------------------
Test for compilance with libxml2
--------------------------------
./sapi/cli/php:
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0,
current version 25.0.2)
/usr/lib/libexslt.0.dylib (compatibility version 9.0.0,
current version 9.10.0)
libpq.5.dylib (compatibility version 5.0.0, current version
5.2.0)
/Library/Frameworks/Firebird.framework/Versions/A/Firebird
(compatibility version 2.0.5, current version 2.0.5)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 111.1.4)
libxml2.2.dylib (compatibility version 10.0.0, current version
10.1.0)
/usr/lib/libicucore.A.dylib (compatibility version 1.0.0,
current version 36.0.0)
/usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current
version 3.12.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
--------------------------------
dyld: Library not loaded: libxml2.2.dylib
Referenced from: /Volumes/DevHD/Developer/Sources/php/php5.3-
200910120830/./sapi/cli/php
Reason: Incompatible library version: php requires version 10.0.0 or
later, but libxml2.2.dylib provides version 9.0.0
./rebuild.sh: line 37: 1892 Trace/BPT trap ./sapi/cli/php -v
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49858&edit=1