[MacPorts] #20239: php5 fails to build in 10.5.7 because of faulty detection of libxml
#20239: php5 fails to build in 10.5.7 because of faulty detection of libxml ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- $ sudo port -v install ph5p ... checking for atoll... yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... /opt/local checking for xml2-config path... /opt/local/bin/xml2-config checking whether libxml build works... no configure: error: build test failed. Please check the config.log for details. Warning: the following items did not execute (for php5): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. The libxml is happily installed, I checked with "sudo port install libxml", which ends up not installing it because the latest libxml already installed. If I look at the config.log (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php5/work/php-5.3.0/config.log), I see at the end: ... configure:20354: /usr/bin/gcc-4.0 -o conftest -O2 -gstabs -fvisibility=hidden -I/opt/local/include -no-cpp-precomp -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c -lm -lxml2 -lz -liconv -lm 1>&5 configure: failed program was: #line 20343 "configure" #include "confdefs.h" char xmlInitParser(); int main() { xmlInitParser(); return 0; } Which will not work since the compile command is missing -lxml. If I create conftest.c with the above content, and copy the confdefs.h from the directory of config.log, AND add the -lxml, the test compiles and links. If I leave out the -lxml, I get this error: Undefined symbols: "_xmlInitParser", referenced from: _main in ccGooSIo.o ld: symbol(s) not found collect2: ld returned 1 exit status So the configure test is missing -lxml? -- Ticket URL: <http://trac.macports.org/ticket/20239> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 fails to build in 10.5.7 because of faulty detection of libxml ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Changes (by blb@…): * cc: jwa@… (added) * owner: macports-tickets@… => ryandesign@… Old description:
$ sudo port -v install ph5p ... checking for atoll... yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... /opt/local checking for xml2-config path... /opt/local/bin/xml2-config checking whether libxml build works... no configure: error: build test failed. Please check the config.log for details.
Warning: the following items did not execute (for php5): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing.
The libxml is happily installed, I checked with "sudo port install libxml", which ends up not installing it because the latest libxml already installed. If I look at the config.log (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php5/work/php-5.3.0/config.log), I see at the end:
... configure:20354: /usr/bin/gcc-4.0 -o conftest -O2 -gstabs -fvisibility=hidden -I/opt/local/include -no-cpp-precomp -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c
-lm -lxml2 -lz -liconv -lm 1>&5 configure: failed program was: #line 20343 "configure" #include "confdefs.h"
char xmlInitParser(); int main() { xmlInitParser(); return 0; }
Which will not work since the compile command is missing -lxml. If I create conftest.c with the above content, and copy the confdefs.h from the directory of config.log, AND add the -lxml, the test compiles and links. If I leave out the -lxml, I get this error:
Undefined symbols: "_xmlInitParser", referenced from: _main in ccGooSIo.o ld: symbol(s) not found collect2: ld returned 1 exit status
So the configure test is missing -lxml?
New description: {{{ $ sudo port -v install ph5p ... checking for atoll... yes checking for strftime... (cached) yes checking which regex library to use... php checking whether to enable LIBXML support... yes checking libxml2 install dir... /opt/local checking for xml2-config path... /opt/local/bin/xml2-config checking whether libxml build works... no configure: error: build test failed. Please check the config.log for details. Warning: the following items did not execute (for php5): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install Error: Status 1 encountered during processing. }}} The libxml is happily installed, I checked with "sudo port install libxml", which ends up not installing it because the latest libxml already installed. If I look at the config.log (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_php5/work/php-5.3.0/config.log), I see at the end: {{{ ... configure:20354: /usr/bin/gcc-4.0 -o conftest -O2 -gstabs -fvisibility=hidden -I/opt/local/include -no-cpp-precomp -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c -lm -lxml2 -lz -liconv -lm 1>&5 configure: failed program was: #line 20343 "configure" #include "confdefs.h" char xmlInitParser(); int main() { xmlInitParser(); return 0; } }}} Which will not work since the compile command is missing -lxml. If I create conftest.c with the above content, and copy the confdefs.h from the directory of config.log, AND add the -lxml, the test compiles and links. If I leave out the -lxml, I get this error: {{{ Undefined symbols: "_xmlInitParser", referenced from: _main in ccGooSIo.o ld: symbol(s) not found collect2: ld returned 1 exit status }}} So the configure test is missing -lxml? -- Comment: Actually not using -lxml is correct, it should be using -lxml2 (and appears to be doing so). Odd that it isn't finding that symbol, what is the output from running the following? {{{ nm /opt/local/lib/libxml2.2.dylib |grep xmlInitParser }}} -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 fails to build in 10.5.7 because of faulty detection of libxml ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Comment(by jhi@…): $ nm /opt/local/lib/libxml2.2.dylib |grep xmlInitParser 0000c4f0 T _xmlInitParser 000081b0 T _xmlInitParserCtxt $ -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 fails to build in 10.5.7 because of faulty detection of libxml ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Comment(by jhi@…): Replying to [comment:1 blb@…]:
Actually not using -lxml is correct, it should be using -lxml2 (and appears to be doing so). Odd that it isn't finding that symbol, what is the output from running the following?
It is not using -lxml2, I think. As I said, from the config.log: configure:20354: /usr/bin/gcc-4.0 -o conftest -O2 -gstabs -fvisibility=hidden -I/opt/local/include -no-cpp-precomp -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c
{{{ nm /opt/local/lib/libxml2.2.dylib |grep xmlInitParser }}}
-- Ticket URL: <http://trac.macports.org/ticket/20239#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 can't seem to use libxml2 ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Comment(by ryandesign@…): Replying to [comment:3 jhi@…]:
It is not using -lxml2, I think. As I said, from the config.log:
configure:20354: /usr/bin/gcc-4.0 -o conftest -O2 -gstabs -fvisibility=hidden -I/opt/local/include -no-cpp-precomp -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib conftest.c
The command continues on the next line with "-lm -lxml2 -lz -liconv -lm". php5 builds fine for me on my Mac OS X 10.5.7 Intel system so something must be different about yours. Running blb's nm command on my system I get: {{{ U _xmlInitParser 000091cd T _xmlInitParserCtxt 00020379 T _xmlInitParser U _xmlInitParser U _xmlInitParser U _xmlInitParser U _xmlInitParser }}} Since that's different than what you got, could you please try rebuilding your libxml2, after you sync and update outdated ports to make sure you have the latest software? {{{ sudo port sync port outdated sudo port upgrade outdated }}} If that did not already upgrade libxml2, then force it like this: {{{ sudo port -nf upgrade libxml2 }}} -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 can't seem to use libxml2 ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Comment(by blb@…): FWIW, mine is similar to jhi@: {{{ 00022550 T _xmlInitParser 00009b30 T _xmlInitParserCtxt }}} Ryan, not sure why you're seeing the undefined references as well...though PHP5 5.3.0 works fine here too. One other thing, make sure there are no libxml2* files in /usr/local/lib. -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 can't seem to use libxml2 ------------------------+--------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: | Port: php5 ------------------------+--------------------------------------------------- Comment(by jhi@…): Now it worked, thanks! The libxml2 situation was: libxml2 2.6.31_0 < 2.7.3_0 The outdated updating didn't upgrade the libxml2, but the forced updating did. And after that php5 configured, built, and installed fine. No /usr/local/lib/libxml* files. -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20239: php5 can't seem to use libxml2 -------------------------+-------------------------------------------------- Reporter: jhi@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: invalid | Keywords: Port: php5 | -------------------------+-------------------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => invalid Comment: I'm glad you got it working by upgrading to the current libxml2, though I'm distressed that MacPorts did not upgrade you to the latest version without forcing. -- Ticket URL: <http://trac.macports.org/ticket/20239#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts