php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79135 checking whether to build with LIBXML support... yes checking for libxml-2.0 >=
Submitted: 2020-01-17 04:14 UTC Modified: 2020-01-17 10:46 UTC
From: 823688826 at qq dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 7.4.1 OS: centos
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 823688826 at qq dot com
New email:
PHP Version: OS:

 

 [2020-01-17 04:14 UTC] 823688826 at qq dot com
Description:
------------
./configure   --prefix=/opt/php7.4/ --with-libxml2=/opt/libxml2 

Test script:
---------------
./configure   --prefix=/opt/php7.4/ --with-libxml2=/opt/libxml2 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-17 09:34 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2020-01-17 09:34 UTC] nikic@php.net
Can you please explain in more detail what the issue is? Note that the option is called --with-libxml, not --with-libxml2.
 [2020-01-17 10:02 UTC] 823688826 at qq dot com
-Status: Feedback +Status: Open
 [2020-01-17 10:02 UTC] 823688826 at qq dot com
Configuring extensions
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... no
configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met:

Package 'libxml-2.0', required by 'virtual:world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
[root@c9dd73ba9bad php-7.4.1]# ./configure   --prefix=/opt/php7.4/ --with-libxml-dir=/opt/libxml2
 [2020-01-17 10:04 UTC] 823688826 at qq dot com
-Status: Open +Status: 打开
 [2020-01-17 10:04 UTC] 823688826 at qq dot com
[root@c9dd73ba9bad php-7.4.1]# ./configure   --help | grep libxml                                 
  --without-libxml        Build without LIBXML support
  --with-expat            XML: use expat instead of libxml2
  --with-expat            XMLRPC-EPI: use expat instead of libxml2

No configuration found in config
 [2020-01-17 10:07 UTC] nikic@php.net
-Status: ?? +Status: Feedback
 [2020-01-17 10:07 UTC] nikic@php.net
As the error message indicates, you need to specify the libxml2 path using PKG_CONFIG_PATH. In your case, this is likely possible using:

    export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/libxml2/lib/pkgconfig"
 [2020-01-17 10:10 UTC] 823688826 at qq dot com
-Status: Feedback +Status: 打开
 [2020-01-17 10:10 UTC] 823688826 at qq dot com
But in 7.3, you can specify the directory

[root@c9dd73ba9bad php-7.3.6]# ./configure --help | grep libxml
  --disable-libxml        Disable LIBXML support
  --with-libxml-dir=DIR   LIBXML: libxml2 install prefix
  --with-libxml-dir=DIR   DOM: libxml2 install prefix
  --with-libxml-dir=DIR   SimpleXML: libxml2 install prefix
  --with-libxml-dir=DIR   SOAP: libxml2 install prefix
  --with-libxml-dir=DIR   WDDX: libxml2 install prefix
  --with-libxml-dir=DIR   XML: libxml2 install prefix
  --with-libxml-dir=DIR   XMLReader: libxml2 install prefix
  --with-libxml-dir=DIR   XMLRPC-EPI: libxml2 install prefix
  --with-libxml-dir=DIR   XMLWriter: libxml2 install prefix
 [2020-01-17 10:41 UTC] bugreports at gmail dot com
> But in 7.3, you can specify the directory

but 7.4 is not 7.3
7.4 relies on pkg-config
 [2020-01-17 10:46 UTC] 823688826 at qq dot com
-Status: ?? +Status: Closed
 [2020-01-17 10:46 UTC] 823688826 at qq dot com
ok Thank you
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 25 19:01:28 2024 UTC