php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37177 with-libxml option in ./configure ignored
Submitted: 2006-04-24 04:27 UTC Modified: 2009-10-03 17:41 UTC
Votes:18
Avg. Score:4.7 ± 0.7
Reproduced:14 of 16 (87.5%)
Same Version:12 (85.7%)
Same OS:9 (64.3%)
From: mhalligan at bitpusher dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.2 OS: SuSE Linux Enterprise 9 SP3
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: mhalligan at bitpusher dot com
New email:
PHP Version: OS:

 

 [2006-04-24 04:27 UTC] mhalligan at bitpusher dot com
Description:
------------
./configure --with-libxml-dir appears to not actually be utilized, and custom installations of libxml2 fail.

Reproduce code:
---------------
./configure 
        --with-openssl \
        --with-apxs=/bitpusher/services/apache/sbin/apxs \
        --with-pear=/bitpusher/services/apache \
        --enable-mbstring \
        --with-pdo-mysql=/bitpusher/services/mysql \
        --with-zlib \
        --with-gd \
        --with-curl \
        --with-libxml-dir=/bitpusher


Expected result:
----------------
./configure should find my custom installation of libxml. 

Actual result:
--------------
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
configure: error: libxml2 version 2.6.11 or greater required.
../php-build.sh: line 3: --with-openssl: command not found
--------

I've installed libxml2 with --prefix=/bitpusher and that installation is successful.  However, the ./configure script appears to still try to use default xml2 configuration scripts, like /usr/bin/xml2-config.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-24 09:18 UTC] tony2001@php.net
It won't be ignored if you actually pass it to the configure.
Currently because of missing "\" you are executing two commands:
1) ./configure
2) --with-openssl etc...
No bug here.
 [2006-04-24 09:33 UTC] mhalligan at bitpusher dot com
That was a typo in my posting. However, the real problem lies 
in the fact that ./configure looks for libxml2-config first in 
$PATH, then in the variable set with --with-libxml-dir .. This 
is incorrect behavior.
 [2006-04-24 09:36 UTC] tony2001@php.net
No, it's not a typo on the posting.
This:
../php-build.sh: line 3: --with-openssl: command not found
happens because of the reason I told before.
 [2006-04-24 09:48 UTC] mhalligan at bitpusher dot com
No, I am not executing two commands. Like I said "that was a typo". I made a typographical error. 

The actual script that I am running is : 


./configure \
        --with-openssl \
        --with-apxs=/bitpusher/services/apache/sbin/apxs \
        --with-pear=/bitpusher/services/apache \
        --enable-mbstring \
        --with-pdo-mysql=/bitpusher/services/mysql \
        --with-zlib \
        --with-gd \
        --with-curl \
        --with-libxml-dir=/bitpusher
 [2006-04-24 09:51 UTC] mhalligan at bitpusher dot com
Ignore the "../php-build.sh: line 3: --with-openssl: command not found"
section, that was me cutting and pasting from an older session. It has
absolutely nothing to do with the fact that php's ./configure script is
rather broken.
 [2006-04-24 10:03 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


What am I doing wrong?

# ./configure --disable-all --enable-xml --with-libxml-dir=/tmp/libxml --enable-libxml | grep xml
checking libxml2 install dir... /tmp/libxml
checking for xml2-config path... /tmp/libxml/bin/xml2-config
checking whether libxml build works... yes
checking for xml2-config path... (cached) /tmp/libxml/bin/xml2-config
checking whether libxml build works... (cached) yes


 [2006-04-24 10:11 UTC] mhalligan at bitpusher dot com
Do you already have libxml2 installed? I have the normal 
libxml2 isntallation on my servers that come with suse. I can 
compile fine if I remove them, however, if I don't, PHP's 
configure always finds /usr/sbin/xml-config first.
 [2006-04-24 10:28 UTC] tony2001@php.net
Did you try the snapshot?
Yes, I can successfully configure and compile it even without libxml2 installed in the system.
 [2006-05-02 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-10-03 17:41 UTC] philip@php.net
I believe this problem is bogus, although initially I did suffer its 
wrath. Today I added some documentation that may help:

http://svn.php.net/viewvc?view=revision&revision=289134

In short: If PHP cannot find bin/xml2-config in the directory specified 
by --with-libxml-dir, it'll continue on and check the default locations.  
So for those suffering from this issue, keep that in mind, and ensure 
xml2-config exists there. For those using packages/RPMs, ensure the -dev 
version is installed too.

See also: http://php.net/libxml.installation

Status change: NoFeedback->Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Sep 27 23:01:26 2024 UTC