php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79347 Compile error caused by libxml2 2.9.9
Submitted: 2020-03-05 07:17 UTC Modified: 2021-07-26 13:02 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: markus dot tobatz at gmail dot com Assigned: omars (profile)
Status: Assigned Package: solr (PECL)
PHP Version: 7.3.15 OS: Debian Stretch
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: markus dot tobatz at gmail dot com
New email:
PHP Version: OS:

 

 [2020-03-05 07:17 UTC] markus dot tobatz at gmail dot com
Description:
------------
# php -v
PHP 7.3.15-4+0~20200224.55+debian9~1.gbpbea824 (cli) (built: Feb 24 2020 18:39:46) ( NTS )

# uname -a
Linux vm4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux

# dpkg -l | grep libxml2
ii  libxml2:amd64                    2.9.9+dfsg-1+0~20200226.5+debian9~1.gbp3b6674                 amd64        GNOME XML library
ii  libxml2-dev:amd64                2.9.9+dfsg-1+0~20200226.5+debian9~1.gbp3b6674                 amd64        Development files for the GNOME XML library

# pecl install solr
downloading solr-2.5.0.tgz ...
Starting to download solr-2.5.0.tgz (721,839 bytes)
.................................................................................................................................................done: 721,839 bytes
66 source files, building
running: phpize
Configuring for:
PHP Api Version:         20180731
Zend Module Api No:      20180731
Zend Extension Api No:   320180731
Enable Solr Debugging (Compiles solr in debug mode) [no] :
libcURL install prefix [/usr] :
libxml2 install prefix [/usr] :
building in /tmp/pear/temp/pear-build-rootG48LX2/solr-2.5.0
running: /tmp/pear/temp/solr/configure --with-php-config=/usr/bin/php-config --enable-solr-debug=no --with-curl=/usr --with-libxml-dir=/usr
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20180731 -I/usr/include/php/20180731/main -I/usr/include/php/20180731/TSRM -I/usr/include/php/20180731/Zend -I/usr/include/php/20180731/ext -I/usr/include/php/20180731/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20180731
checking for PHP installed headers prefix... /usr/include/php/20180731
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for cURL support... yes, shared
curl headers found in /usr
checking for cURL 7.15.0 or greater... libcurl 7.52.1
checking whether to enable the Solr extension... yes, shared
checking whether to compile with solr in verbose mode... no
checking libxml2 install dir... /usr
checking whether to enable code coverage... no
/tmp/pear/temp/solr/configure: line 4516: syntax error near unexpected token `LIBXML,'
/tmp/pear/temp/solr/configure: line 4516: `  PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.7.6)'
ERROR: `/tmp/pear/temp/solr/configure --with-php-config=/usr/bin/php-config --enable-solr-debug=no --with-curl=/usr --with-libxml-dir=/usr' failed

Worked on libxml2 version "2.9.9+dfsg-1+0~20190914.4+debian9~1.gbp3b6674" but not with current available version "2.9.9+dfsg-1+0~20200226.5+debian9~1.gbp3b6674"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-05 07:53 UTC] cmb@php.net
From the error message, it seems that PHP 7.4 is somehow involved
in the build process.
 [2020-03-05 13:09 UTC] markus dot tobatz at gmail dot com
I've upgraded all PHP components to version 7.4 now. Solr package is installable via PECL now (no warning or something else while compiling), but class SolrDismaxQuery is now missing:

"Uncaught Error: Class 'SolrDisMaxQuery' not found"

But it's not an option to upgrade all machines to PHP 7.4. I want to compile it on PHP 7.3 which still was working some weeks before.
 [2020-03-05 15:15 UTC] markus dot tobatz at gmail dot com
I don't know what is going on and what's the reason, but I got it working the following way.

I've downgraded from PHP7.4 to PHP7.3.15 again. As install via "pecl install solr" fails again, I tried it manually, getting the master tree from github.
Documentation says you have to execute "phpize && configure && make" which fails with same error as with PECL.
After searching the internet I got a hint that there seems to be an issue with "pkg.m4". So I executed "aclocal && autoreconf -f" directly after "phpize" and then "configure" and "make" ran without any problems and compiled "solr.so".
 [2020-05-20 17:54 UTC] php dot net at tylercollier dot com
TLDR: I had to install pkg-config, and then follow markus's steps.

I had this issue too. Thanks to markus for the steps to fix. When he mentioned pkg.m4, I searched the internet and found that it should be at /usr/share/aclocal/pkg.m4, and I had no such file there. So I installed pkg-config. Then using his steps would work. I did aclocal and autoreconf (-f was not necessary). Then ./configure worked.
 [2020-06-28 07:48 UTC] omars@php.net
I will follow up, thank you
 [2020-06-28 07:56 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2021-07-26 13:02 UTC] cmb@php.net
-Package: Compile Failure +Package: solr
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 03 18:01:28 2024 UTC