php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36780 configure fails libxml check
Submitted: 2006-03-18 12:04 UTC Modified: 2006-03-18 19:34 UTC
From: james at groovytrain dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.2 OS: Redhat Linux 7.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: james at groovytrain dot com
New email:
PHP Version: OS:

 

 [2006-03-18 12:04 UTC] james at groovytrain dot com
Description:
------------
Having compiled PHP without XML support on my system several times without problem, I decided to try and include XML support.

When I run the following command:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --without-pear --enable-libxml --with-gd --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr --enable-mbstring=all

It fails with:

checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.

The "config.log" shows:

configure:19959: checking whether libxml build works
configure:19986: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c 
          
         -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm 1>&5
configure: failed program was:
#line 19975 "configure"
#include "confdefs.h"

    
    char xmlInitParser();
    int main() {
      xmlInitParser();
      return 0;
    }

My system has libxml2 version 2.6.23, which was compiled and installed from source not using an RPM.

I have tried a various "--with-libxml-dir" parameters including "--with-libxml-dir=/usr/local/lib" (libxml2 v2.6.23 is in "/usr/local/lib" and v 2.4.10 in "/usr/lib").

Any help you can give will be gratefully received.

Expected result:
----------------
I expect ./configure to complete successfully.

Actual result:
--------------
./configure fails with:

checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-18 18:02 UTC] tony2001@php.net
1) "--with-libxml-dir=/usr/local/lib"
This is definitely wrong. The "/lib" part should be omitted, so it would look like "--with-libxml-dir=/usr/local".
This also applies to all the other options.

2) If you still can reproduce it, please put this code:
----------
    char xmlInitParser();
    int main() {
      xmlInitParser();
      return 0;
    }
----------
into conftest.c and try to compile it like this:
gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/lib
-L/usr/local/lib conftest.c -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm

and post here the error message you get.
 [2006-03-18 19:08 UTC] james at groovytrain dot com
I tried configuring with "--with-libxml-dir=/usr/local" (although I was fairly sure I'd tried this) and it still failed with the same error.

I then created "conftest.c", as you recommended, and compiled it. "conftest.c" compiled without error into the file "conftest".

The only difference I can see, between the "conftest.c" that the configuration script makes and the one I created, is the include line.
 [2006-03-18 19:20 UTC] tony2001@php.net
Did you try to execute the result binary?
 [2006-03-18 19:28 UTC] james at groovytrain dot com
Executing the binary gives me the following error:

./conftest: error while loading shared libraries: /usr/local/lib/libpthread.so.0: undefined symbol: _dl_cpuclock_offset
 [2006-03-18 19:34 UTC] tony2001@php.net
As you can see, it doesn't work indeed.
No PHP bug here, it's some mess in your system.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Dec 01 18:00:01 2025 UTC