php.net |  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
Votes:17
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
 [2017-12-05 11:38 UTC] php-bugs-2017 at ryandesign dot com
Description:
------------
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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-23 07:36 UTC] matteo dot scaramuccia at gmail dot com
Hello,
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. https://github.com/php/pecl-search_engine-solr/commit/744e32915d5989101267ed2c84a407c582dc6f31 .

TIA,
Matteo
 [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.

- https://github.com/Homebrew/homebrew-php/issues/4721
- https://brew.sh/2018/01/19/homebrew-1.5.0/
 [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: https://github.com/php/pecl-search_engine-solr/releases
 [2018-12-09 14:00 UTC] omars@php.net
2.5 will be out soon, doing some testing on different platforms, apologies for the delay
 [2019-03-29 09:38 UTC] omars@php.net
-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.

https://github.com/moodlehq/moodle-php-apache/pull/58

2) If we try with upstream commit https://github.com/php/pecl-search_engine-solr/commit/744e32915d5989101267ed2c84a407c582dc6f31 (Remi's patch), the extension builds but near all our tests fail like crazy.

3) If we use current master's HEAD https://github.com/php/pecl-search_engine-solr/commit/98a8bf540bcb4e9b2e1378cce2f3a9bf6cd772b8, 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 <omars@php.net>
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
Hi omars@php.net,
the candidate regression in https://github.com/php/pecl-search_engine-solr/commit/b1b44e0a22bcce8f625707248d0b4d3630935359 - 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:

-&qf=title%5E%20content%5E%20description1%5E%20description2%5E%20solr_filecontent%5E
+&qf=title%00%20content%00%20description1%00%20description2%00%20solr_filecontent%00

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.

HTH,
Matteo
 [2019-07-07 21:52 UTC] matteo dot scaramuccia at gmail dot com
Hi omars@php.net,
2.5.0 being released is still affected by the NULL char, I'm preparing a patch (WIP is https://github.com/scara/pecl-search_engine-solr/commit/c2c94b459ceab41df93cfa8a635f0578aef73a83).

Would you like a new bug for the NULL issue?

TIA,
Matteo
 [2019-07-15 21:37 UTC] omars@php.net
Hi Matteo, please open a new bug for the null char
 [2019-07-15 21:37 UTC] omars@php.net
-Status: Assigned +Status: Closed
 [2019-07-15 21:37 UTC] omars@php.net
released: 2.5.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC