Bug #49858 [Com]: Compile flag --with-libxml-dir don't work as expected

From: Date: Sun, 12 Dec 2010 17:37:17 +0000
Subject: Bug #49858 [Com]: Compile flag --with-libxml-dir don't work as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156923@lists.php.net to get a copy of this message
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... Should say that ./configure and make work fine. It's the make install that folds: Installing PHP SAPI module: apache [activating module `php5' in /private/etc/httpd/httpd.conf] cp libs/libphp5.so /usr/libexec/httpd/libphp5.so chmod 755 /usr/libexec/httpd/libphp5.so cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf rm /private/etc/httpd/httpd.conf.new Installing PHP CLI binary: /usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config Installing man pages: /usr/local/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/lib/php/ dyld: Library not loaded: libxml2.2.dylib Referenced from: /Users/aviva/downloads/php-5.2.3/sapi/cli/php Reason: Incompatible library version: php requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0 make[1]: *** [install-pear-installer] Trace/BPT trap make: *** [install-pear] Error 2 yours, Marcus Previous Comments: ------------------------------------------------------------------------ [2010-12-12 18:35:16] marcus at lastcraft dot com I've reproduced this back to PHP 5.2.3 without problem. Here is my configure: ./configure --with-apxs --with-cli --with-openssl --with-pgsql=/Library/PostgreSQL/8.3/ Note the older Postgres too. Everything is 2007 vintage here, which means this bug was probably present from the word go. yours, Marcus ------------------------------------------------------------------------ [2010-12-12 18:31:35] marcus at lastcraft dot com 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 ------------------------------------------------------------------------ [2009-10-19 11:15:36] jani@php.net 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

« previous php.bugs (#156923) next »