|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75631 Build failure
Submitted: 2017-12-05 11:38 UTC Modified: 2019-07-15 21:37 UTC
Avg. Score:4.9 ± 0.3
Reproduced:17 of 17 (100.0%)
Same Version:16 (94.1%)
Same OS:4 (23.5%)
From: php-bugs-2017 at ryandesign dot com Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: 7.2.0 OS: macOS 10.12.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
18 - 8 = ?
Subscribe to this entry?

 [2017-12-05 11:38 UTC] php-bugs-2017 at ryandesign dot com
Hi, I'm the maintainer of solr in MacPorts. solr 2.4.0 builds with php 7.1.12 and earlier but does not build with php 7.2.0. The error is:

error: use of undeclared identifier 'ZEND_ACC_CLONE'; did you mean 'ZEND_AST_CLONE'?

I've attached the full build log.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-23 07:36 UTC] matteo dot scaramuccia at gmail dot com
is there any ETA to publish a new version e.g. 2.5.0 to get access to the latest fixes done in the past months for compiling solr on 7.2?
Otherwise, 'pecl install solr' will always fail since 2.4.0 doesn't contains the required fixes e.g. .

 [2018-08-07 13:01 UTC] glen at pld-linux dot org
please 2.4.1 at least or something

this is super annoying under brew, as brew dropped pecl extensions as recipes, so these can't patched downstream easily.

 [2018-08-07 13:08 UTC] glen at pld-linux dot org
perhaps tag 2.4.1 from this commit:

* 744e329 - Fix for 7.2: - ZEND_ACC_CLONE have been removed, and was not used in previous versions - fix php_pcre_replace call (1 year, 1 month ago) <Remi Collet>

btw, 2.4.0 git tag is also missing from repository:
 [2018-12-09 14:00 UTC]
2.5 will be out soon, doing some testing on different platforms, apologies for the delay
 [2019-03-29 09:38 UTC]
-Assigned To: +Assigned To: omars
 [2019-05-21 22:13 UTC] stronk7 at moodle dot org
Really, something strange is going with the current status (master) of the extension.

1) If we get the 2.4.0 tarball and apply Ryan's patch (from MacPorts), we get the extension built perfectly and all our tests passing perfectly. Both with PHP 7.2 and 73. So, at very least we have a working alternative (thanks Ryan for all the work @ Macports, awesome!) and we have proceeded to build our docker images using it.

2) If we try with upstream commit (Remi's patch), the extension builds but near all our tests fail like crazy.

3) If we use current master's HEAD, the extension also builds but once again, all our tests fail.

We still have to bisect were, between 2.4.0 and Remi's patch things became broken for us. And also confirm if something has changed in the connection or similar causing all those failures (there isn't much info around) but, certainly 2.4.0 + patch seems to be the only working alternative (and it's not really ideal at all, if I can say it).

If we find more information about when exactly things stopped working, or detect that we were doing something wrong in our solr client leading to the failures... will share here. Just wanted to highlight that, for some reason, all the recent builds aren't working ok for us at all (but aging 2.4.0 + patch is). Mysteries... love them!

Ciao :-)
 [2019-05-21 22:56 UTC] stronk7 at moodle dot org
Hi again, just adding to the previous comment... I've performed here a bisect run between:

6e9e097c981e810d452657f23bf1945b7955f3cf (2.4.0 release). Good.
744e32915d5989101267ed2c84a407c582dc6f31 (Remi's patch). Bad.

On every step, applying the (macports) patch, building the extension and running Moodle's unit tests... and, at the end, git bisect is telling me that:

b1b44e0a22bcce8f625707248d0b4d3630935359 is the first bad commit
commit b1b44e0a22bcce8f625707248d0b4d3630935359
Author: Omar Shaban <>
Date:   Fri Nov 4 13:09:15 2016 +0100

    Fixes Bug #72740: addQueryField return wrong query

:100644 100644 dcedabc742c89cbaba0a2c31dcfc184c4d453666 6e69fdf5f0da89ac2a0149397dd549f5e3ea2352 M	NEWS
:040000 040000 312a3d0f9130c9db0c88f7cc02ef5431dd6c4d1f 3ced7a9ac7dc7161309a0b4212bdf65b676d00d3 M	src

Hope that can bring us some clue about what's happening since that commit. So it broke (our tests) 4-5 commits before Remi's patch. (2016, memories!). Just in case it also affects upstream in any way, for sure it caused an impact in our own tests.

Ciao :-)
 [2019-05-22 00:35 UTC] stronk7 at moodle dot org
Just to confirm that, with current master, and doing this:

git revert b1b44e0a22bcce8f625707248d0b4d3630935359

and, without applying any patch:

phpize; ./configure; make; make install

We get here the extension perfectly built and all our tests passing. So, somehow, that commit made all our tests to start failing.

Ciao :-)
 [2019-05-22 10:06 UTC] matteo dot scaramuccia at gmail dot com
the candidate regression in - Note: there is no test coverage for bug #72740 in that commit - changes the query fields parameter like the diff below, given the same PHP client code (not using 'addPhraseField', just 'addField') and the same data in solr server:


i.e. %5E%20 (PHP 7.1, 2.4.0) vs %00%20 (PHP 7.2+, post 2.4.0), which obviously changes the result of the query and its response:

-    <str name="qf">title^ content^ description1^ description2^ solr_filecontent^</str>
+    <str name="qf">title#0; content#0; description1#0; description2#0; solr_filecontent#0;</str>
-<result name="response" numFound="2" start="0">
+<result name="response" numFound="0" start="0">

i.e. Caret (boosting) vs NULL control character.

 [2019-07-07 21:52 UTC] matteo dot scaramuccia at gmail dot com
2.5.0 being released is still affected by the NULL char, I'm preparing a patch (WIP is

Would you like a new bug for the NULL issue?

 [2019-07-15 21:37 UTC]
Hi Matteo, please open a new bug for the null char
 [2019-07-15 21:37 UTC]
-Status: Assigned +Status: Closed
 [2019-07-15 21:37 UTC]
released: 2.5.0
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 10:01:29 2024 UTC