[MacPorts] #20239: php5 fails to build in 10.5.7 because of faulty detection of libxml

MacPorts noreply at macports.org
Wed Jul 8 19:03:57 PDT 2009


#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


More information about the macports-tickets mailing list