php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62480 mbstring and mbregex won't compile
Submitted: 2012-07-04 13:21 UTC Modified: 2013-10-15 11:54 UTC
From: rs at bytecamp dot net Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.4.4 OS: FreeBSD 8.1-RELEASE-p12
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
18 + 38 = ?
Subscribe to this entry?

 
 [2012-07-04 13:21 UTC] rs at bytecamp dot net
Description:
------------
When enabling mbstring and mbregex, make will bail out with the following log:

/bin/sh /tmp/php-5.4/php-5.4.4/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/mbstring/ -I/tmp/php-5.4/php-5.4.4/ext/mbstring/ -DPHP_ATOM_INC -I/tmp/php-5.4/php-5.4.4/include -I/tmp/php-5.4/php-5.4.4/main -I/tmp/php-5.4/php-5.4.4 -I/tmp/php-5.4/php-5.4.4/ext/date/lib -I/tmp/php-5.4/php-5.4.4/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/tmp/php-5.4/php-5.4.4/ext/mbstring/oniguruma -I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl -I/tmp/php-5.4/php-5.4.4/ext/mbstring/libmbfl/mbfl -I/tmp/php-5.4/php-5.4.4/ext/sqlite3/libsqlite -I/tmp/php-5.4/php-5.4.4/TSRM -I/tmp/php-5.4/php-5.4.4/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden  -c /tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c -o ext/mbstring/mbstring.lo
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function '_php_mb_compile_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:987: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:988: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 2 of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:990: warning: passing argument 3 of 'onig_new' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: 'OnigUChar' undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: (Each undeclared identifier is reported only once
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: for each function it appears in.)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:991: error: expected ';' before 'err_str'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:992: error: 'err_str' undeclared (first use in this function)
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c: In function '_php_mb_match_regex':
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1003: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1004: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: error: expected ')' before 'OnigUChar'
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: cast from pointer to integer of different size
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 2 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 3 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 4 of 'onig_search' makes pointer from integer without a cast
/tmp/php-5.4/php-5.4.4/ext/mbstring/mbstring.c:1005: warning: passing argument 5 of 'onig_search' makes pointer from integer without a cast
*** Error code 1


Test script:
---------------
./configure --prefix=/usr/local/php-4.4-fail --enable-mbstring --enable-mbregex
make



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-04 13:35 UTC] rs at bytecamp dot net
One thing to add: oniguruma-2.5.8 is installed on this machine (for ruby). Could this be the cause, because /usr/local/include is also in the list of include directories?
 [2012-07-05 21:52 UTC] ab@php.net
I don't have any FreeBSD versions at hand, but bundled oniguruma version is 
5.9.2, so it could be incompatible ... you could easily check that just 
temporarily uninstalling 2.5.8 from the system and trying to recompile PHP again.
 [2012-07-06 10:56 UTC] rs at bytecamp dot net
I stripped off -I/usr/local/include from the libtool-call and executed it, this worked, no errors from make. Is there a way not to include /usr/local/include during build of this extension?
 [2013-02-08 10:19 UTC] rs at bytecamp dot net
I've found a way to circumvent the incompatiblity.

In the top level Makefile, the macro INCLUDES must be edited so that /usr/local/include is mentioned last (gets a lower priority). One may also completely remove /usr/local/include from INCLUDES, since it is also defined in CFLAGS_CLEAN.

Could this be applied to the build process?

with kind regards,
Robert Schulze
 [2013-06-29 05:04 UTC] yohgaki@php.net
-Status: Open +Status: Feedback
 [2013-06-29 05:04 UTC] yohgaki@php.net
My CFLAGS_CLEAN is 
Makefile:CFLAGS_CLEAN = -I/usr/include -g -fvisibility=hidden -O0 -Wall

Anyway, COMMON_FLAGS is

Makefile.global:COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) 
$(PHP_FRAMEWORKPATH)

Swapping $(INCLUDES) and $(EXTRA_INCLUDES), then "EXTRA_INCLUDES=/foo/bar 
./configure" works for you?
 [2013-07-01 08:11 UTC] rs at bytecamp dot net
Sorry, I cannot test your solution, because the problematic systems have been upgraded and now have an updated version of the oniguruma library which doesn't trigger that kind of building error any more.

with kind regards,
Robert Schulze
 [2013-10-15 11:54 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 01:01:28 2024 UTC