Opened 15 years ago

Last modified 15 years ago

#20239 closed defect

php5 fails to build in 10.5.7 because of faulty detection of libxml — at Version 1

Reported by: jhi Owned by: ryandesign@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: jwa@…
Port: php5

Description (last modified by blb@…)

$ 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?

Change History (1)

comment:1 Changed 15 years ago by blb@…

Cc: jwa@… added
Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…

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
Note: See TracTickets for help on using tickets.