Bug 226717 - converters/php*-mbstring: Fails to build after devel/oniguruma 6.8.1 update
Summary: converters/php*-mbstring: Fails to build after devel/oniguruma 6.8.1 update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: Torsten Zuehlsdorff
URL: https://bugs.php.net/bug.php?id=76113
Keywords: needs-qa, regression
: 226728 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-19 10:01 UTC by Christian Ullrich
Modified: 2018-03-23 10:18 UTC (History)
17 users (show)

See Also:


Attachments
Patch (779 bytes, text/plain)
2018-03-19 10:01 UTC, Christian Ullrich
no flags Details
php 7.x patch (733 bytes, patch)
2018-03-19 13:40 UTC, Guido Falsi
madpilot: maintainer-approval? (tz)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_triage 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 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 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 2018-03-19 13:53:19 UTC
Thanks for the patches. I will have a look at them!
Comment 7 commit-hook freebsd_committer 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