Bug 226717

Summary: converters/php*-mbstring: Fails to build after devel/oniguruma 6.8.1 update
Product: Ports & Packages Reporter: Christian Ullrich <chris>
Component: Individual Port(s)Assignee: Torsten Zuehlsdorff <tz>
Status: Closed FIXED    
Severity: Affects Many People CC: ale, apevnev, fabian.freyer, freebsd-bt, freebsd-bugzilla, gmn, i.dani, jhujhiti, madpilot, pi, please, portmgr, tz, vvd, w.schwarzenfeld, yasu, yuri
Priority: Normal Keywords: needs-qa, regression
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://bugs.php.net/bug.php?id=76113
Attachments:
Description Flags
Patch
none
php 7.x patch madpilot: maintainer-approval? (tz)

Description Christian Ullrich 2018-03-19 10:01:30 UTC
Created attachment 191621 [details]
Patch

php56-mbstring blithely assumes that the implementation of Oniguruma's regex_t is public. Since release 6.8.1, it is not.

I have already submitted the same patch as PHP bug 76113; https://bugs.php.net/bug.php?id=76113 .
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-03-19 10:41:37 UTC
Thank you Christian
Comment 2 Walter Schwarzenfeld 2018-03-19 12:50:02 UTC
php71_mbstring fails also
/ram/usr/ports/converters/php71-mbstring/work/php-7.1.15/ext/mbstring/php_mbregex.c:455:15: error: incomplete definition of type 'struct php_mb_re_pattern_buffer'
        if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
                   ~~^
/usr/local/include/oniguruma.h:673:8: note: forward declaration of 'struct php_mb_re_pattern_buffer'
struct re_pattern_buffer;
       ^
./php_onig_compat.h:4:37: note: expanded from macro 're_pattern_buffer'
#define re_pattern_buffer           php_mb_re_pattern_buffer
                                    ^

the needed patch is different from the patch of php56-mbstring.
Comment 3 Sigi 2018-03-19 12:56:49 UTC
*** Bug 226728 has been marked as a duplicate of this bug. ***
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2018-03-19 13:40:22 UTC
Created attachment 191629 [details]
php 7.x patch

Congratulations for identifyiing the simple patch!

I'm using php72 and the same failure happens.

PHP 7.x has a slightly different logic in the failing point. I've added a patch for PHP 7.2(based on the yours), it should be the same for 7.0 nd 7.1.

It's working fine for me.
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2018-03-19 13:41:23 UTC
I've taken the freedom to correct the title, since the bug is affecting all PHP versions.
Comment 6 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2018-03-19 13:53:19 UTC
Thanks for the patches. I will have a look at them!
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-03-19 23:02:27 UTC
A commit references this bug:

Author: antoine
Date: Mon Mar 19 23:01:51 UTC 2018
New revision: 465040
URL: https://svnweb.freebsd.org/changeset/ports/465040

Log:
  Fix build with oniguruma 6.8.1

  PR:		226717
  Submitted by:	Christian Ullrich, madpilot
  With hat:	portmgr

Changes:
  head/converters/php56-mbstring/files/patch-php__mbregex.c
  head/converters/php70-mbstring/files/patch-php__mbregex.c
  head/converters/php71-mbstring/files/patch-php__mbregex.c
  head/converters/php72-mbstring/files/patch-php__mbregex.c