Edit report at https://bugs.php.net/bug.php?id=62480&edit=1

 ID:                 62480
 Comment by:         rs at bytecamp dot net
 Reported by:        rs at bytecamp dot net
 Summary:            mbstring and mbregex won't compile
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   FreeBSD 8.1-RELEASE-p12
 PHP Version:        5.4.4
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2012-07-06 10:56:22] 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?

------------------------------------------------------------------------
[2012-07-05 21:52:44] a...@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-04 13:35:10] 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-04 13:21:06] 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




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62480&edit=1

Reply via email to