php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61234 PHP 5.4.0 fails to build on OpenBSD 5.0; possibly related to --enable-mbstring
Submitted: 2012-03-02 01:28 UTC Modified: 2017-10-24 07:02 UTC
Votes:12
Avg. Score:4.7 ± 0.7
Reproduced:11 of 11 (100.0%)
Same Version:9 (81.8%)
Same OS:10 (90.9%)
From: stolen dot data dot net at gmail dot com Assigned:
Status: Open Package: Compile Failure
PHP Version: 5.4.0 OS: OpenBSD 5.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-03-02 01:28 UTC] stolen dot data dot net at gmail dot com
Description:
------------
When supplying "--enable-mbstring" to configure:

/bin/sh /usr/opt/php-5.4.0/libtool --silent --preserve-dup-deps --mode=compile 
cc  -DNOT_RUBY -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DHAVE_CONFIG_H 
-Iext/mbstring/ -I/usr/opt/php-5.4.0/ext/mbstring/ -DPHP_ATOM_INC -
I/usr/opt/php-5.4.0/include -I/usr/opt/php-5.4.0/main -I/usr/opt/php-5.4.0 -
I/lib" -I/usr/opt/php-5.4.0/ext/date/lib -I/usr/opt/php-5.4.0/ext/ereg/regex -
I/usr/local/include -I/usr/opt/php-5.4.0/ext/mbstring/oniguruma -I/oniguruma" -
I/usr/opt/php-5.4.0/ext/mbstring/libmbfl -I/libmbfl" -I/usr/opt/php-
5.4.0/ext/mbstring/libmbfl/mbfl -I/mbfl" -I/usr/opt/php-
5.4.0/ext/sqlite3/libsqlite -I/usr/opt/php-5.4.0/TSRM -I/usr/opt/php-5.4.0/Zend    
-I/usr/local/include -g -O2 -fvisibility=hidden  -c /usr/opt/php-
5.4.0/ext/mbstring/oniguruma/regparse.c -o ext/mbstring/oniguruma/regparse.lo
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/regparse.c: In function 
'onig_parse_make_tree':
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/regparse.c:5279: warning: passing 
argument 3 of 'parse_regexp' discards qualifiers from pointer target type

/bin/sh /usr/opt/php-5.4.0/libtool --silent --preserve-dup-deps --mode=compile 
cc  -DNOT_RUBY -DONIG_ESCAPE_UCHAR_COLLISION=1 -DUChar=OnigUChar -DHAVE_CONFIG_H 
-Iext/mbstring/ -I/usr/opt/php-5.4.0/ext/mbstring/ -DPHP_ATOM_INC -
I/usr/opt/php-5.4.0/include -I/usr/opt/php-5.4.0/main -I/usr/opt/php-5.4.0 -
I/lib" -I/usr/opt/php-5.4.0/ext/date/lib -I/usr/opt/php-5.4.0/ext/ereg/regex -
I/usr/local/include -I/usr/opt/php-5.4.0/ext/mbstring/oniguruma -I/oniguruma" -
I/usr/opt/php-5.4.0/ext/mbstring/libmbfl -I/libmbfl" -I/usr/opt/php-
5.4.0/ext/mbstring/libmbfl/mbfl -I/mbfl" -I/usr/opt/php-
5.4.0/ext/sqlite3/libsqlite -I/usr/opt/php-5.4.0/TSRM -I/usr/opt/php-5.4.0/Zend    
-I/usr/local/include -g -O2 -fvisibility=hidden  -c /usr/opt/php-
5.4.0/ext/mbstring/oniguruma/enc/unicode.c -o 
ext/mbstring/oniguruma/enc/unicode.lo
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:30:20: error: regenc.h: 
No such file or directory
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:68: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'CRAlnum'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:493: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRAlpha'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:900: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRBlank'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:920: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRCntrl'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:950: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRDigit'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:984: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRGraph'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:1400: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRLower'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:1835: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRPrint'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2251: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRPunct'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2348: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRSpace'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2370: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRUpper'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2802: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRXDigit'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2813: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRASCII'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:2822: error: expected 
'=', ',', ';', 'asm' or '__attribute__' before 'CRWord'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:3272: error: expected 
')' before 'code'
/usr/opt/php-5.4.0/ext/mbstring/oniguruma/enc/unicode.c:3343: error: expected 
';', ',' or ')' before '*' token
*** Error code 1

Stop in /usr/opt/php-5.4.0 (line 652 of Makefile).




Without "--enable-mbstring":

/bin/sh /usr/opt/php-5.4.0/libtool --silent --preserve-dup-deps --mode=compile 
cc -Iext/date/lib -Iext/date/ -I/usr/opt/php-5.4.0/ext/date/ -DPHP_ATOM_INC -
I/usr/opt/php-5.4.0/include -I/usr/opt/php-5.4.0/main -I/usr/opt/php-5.4.0 -
I/lib" -I/usr/opt/php-5.4.0/ext/date/lib -I/usr/opt/php-5.4.0/ext/ereg/regex -
I/usr/local/include -I/usr/opt/php-5.4.0/ext/sqlite3/libsqlite -I/usr/opt/php-
5.4.0/TSRM -I/usr/opt/php-5.4.0/Zend    -I/usr/local/include -g -O2 -
fvisibility=hidden  -c /usr/opt/php-5.4.0/ext/date/php_date.c -o 
ext/date/php_date.lo
*** Error code 1

/bin/sh: no closing quote

Stop in /usr/opt/php-5.4.0 (line 471 of Makefile).


Expected result:
----------------
-

Actual result:
--------------
-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-02 02:12 UTC] stolen dot data dot net at gmail dot com
The problem with --enable-mbstring seems to be that a lot of files have been moved 
around in ext/mbstring/oniguruma/ and ext/mbstring/libmbfl/ breaking the paths for 
a number of includes. A stray quote appears to be the reason for the Makefile's 
failure when --enable-mbstring isn't supplied.
 [2012-03-02 21:46 UTC] stolen dot data dot net at gmail dot com
./configure[59443]: cd: /usr/opt/php-5.4.0/"ext/mbstring" - No such file or 
directory
./configure[59443]: cd: /usr/opt/php-5.4.0/"ext/mbstring" - No such file or 
directory
./configure[59443]: cd: /usr/opt/php-5.4.0/"ext/mbstring/libmbfl" - No such file 
or directory
 [2012-03-27 23:58 UTC] stolen dot data dot net at gmail dot com
Here's a temporary workaround to the problem in order to get 5.4.0 to compile 
with --enable-mbstring...

diff for configure:

--- configure.orig	Wed Mar 28 00:01:42 2012
+++ configure	Wed Mar 28 03:12:01 2012
@@ -21106,7 +21106,7 @@
 
     ep_dir="`echo $ext_builddir/lib|$SED 's%/*[^/][^/]*/*$%%'`"
 
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ep_realdir="`(cd $ep_dir && pwd)`"
     ai_p="$ep_realdir/`basename \"$ext_builddir/lib\"`"
   fi
 
@@ -59293,7 +59293,7 @@
 
     ep_dir="`echo $ext_builddir/$dir|$SED 's%/*[^/][^/]*/*$%%'`"
 
-    ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+    ep_realdir="`(cd $ep_dir && pwd)`"
     ai_p="$ep_realdir/`basename \"$ext_builddir/$dir\"`"
   fi



Then supply missing include paths when calling configure:

CFLAGS="-Iext/mbstring/oniguruma/ -Iext/mbstring/libmbfl/mbfl" CPPFLAGS="-
Iext/mbstring/oniguruma/ -Iext/mbstring/libmbfl/mbfl" ./configure --your-usual-
flags
 [2013-10-01 12:48 UTC] mike@php.net
-Assigned To: +Assigned To: hirokawa
 [2013-10-13 07:44 UTC] hirokawa@php.net
-Status: Assigned +Status: Analyzed
 [2013-10-13 07:44 UTC] hirokawa@php.net
It is caused by extra double-quotation in configure (like -I/lib").
This problem is probably not mbstring issue, because it is also
caused without --enable-mbstring.
It might be an autotool issue on OpenBSD.
Do you have the same issue on other environment like Linux ?
 [2017-10-24 05:22 UTC] kalle@php.net
-Status: Analyzed +Status: Assigned
 [2017-10-24 07:02 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: hirokawa +Assigned To:
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC