Bug #76113 [Opn->Ver]: mbstring does not build with Oniguruma 6.8.1

From: Date: Tue, 20 Mar 2018 15:19:28 +0000
Subject: Bug #76113 [Opn->Ver]: mbstring does not build with Oniguruma 6.8.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214421@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76113&edit=1 ID: 76113 Updated by: cmb@php.net Reported by: chris at chrullrich dot net Summary: mbstring does not build with Oniguruma 6.8.1 -Status: Open +Status: Verified Type: Bug Package: mbstring related PHP Version: 5.6.34 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks. Compatibility with Oniguruma 2.3.1 should be more than sufficient. Previous Comments: ------------------------------------------------------------------------ [2018-03-19 23:42:08] chris at chrullrich dot net The oldest release I could easily find is 2.3.1, released 2004-06-17, and it has them already. http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/distfiles/ruby/onigd2_3_1.tar.gz ------------------------------------------------------------------------ [2018-03-19 23:07:36] cmb@php.net Thanks for reporting this issue, the detailed analysis, and for providing a patch! The patch looks good, but I wonder which version of Oniguruma introduced these functions. It seems that we currently don't explicitly check for a minimum version – which appears to be fishy per se. ------------------------------------------------------------------------ [2018-03-19 09:23:36] chris at chrullrich dot net Description: ------------ Oniguruma 6.8.1 moved the implementation of the regex_t type out of its public header. ext/mbstring/php_mbregex.c:457:31: error: incomplete definition of type 'struct php_mb_re_pattern_buffer' if (found == FAILURE || (*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 ^ ext/mbstring/php_mbregex.c:457:60: error: incomplete definition of type 'struct php_mb_re_pattern_buffer' if (found == FAILURE || (*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 ^ ext/mbstring/php_mbregex.c:457:81: error: incomplete definition of type 'struct php_mb_re_pattern_buffer' if (found == FAILURE || (*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 ^ 3 errors generated. *** [php_mbregex.lo] Error code 1 make[1]: stopped in ext/mbstring 1 error The fix (see patch) is to use the appropriate API to access Oniguruma's internals. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76113&edit=1

« previous php.bugs (#214421) next »