php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38452 cvs build fails @ --enable-mbstring
Submitted: 2006-08-14 14:46 UTC Modified: 2006-09-17 07:28 UTC
Votes:15
Avg. Score:4.6 ± 0.7
Reproduced:14 of 14 (100.0%)
Same Version:2 (14.3%)
Same OS:3 (21.4%)
From: openmacnews at gmail dot com Assigned: hirokawa (profile)
Status: Not a bug Package: Compile Failure
PHP Version: 5CVS-2006-08-14 (CVS) OS: OSX 10.4.7
Private report: No CVE-ID: None
 [2006-08-14 14:46 UTC] openmacnews at gmail dot com
Description:
------------
build of php52 cvs / Aug 4 on OSX 10.4.7 with:

     --enable-mbstring --enable-mbregex \

is OK.

new co of php52 cvs / Aug 14, however fails @:


...
compile gcc  -DNOT_RUBY -DHAVE_CONFIG_H -Iext/mbstring/ -I/usr/ports/php-5.2cvs/ext/mbstring/ -DPHP_ATOM_INC -I/usr/ports/php-5.2cvs/include -I/usr/ports/php-5.2cvs/main -I/usr/ports/php-5.2cvs -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/ssl/include -I/usr/ports/php-5.2cvs/ext/date/lib -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/local/gd/include -I/usr/ports/php-5.2cvs/ext/mbstring/oniguruma -I/usr/ports/php-5.2cvs/ext/mbstring/libmbfl -I/usr/ports/php-5.2cvs/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include/mysql -I/usr/local/ncurses/include/ncurses -I/usr/local/net-snmp/include -I/usr/ports/php-5.2cvs/TSRM -I/usr/ports/php-5.2cvs/Zend  -I/usr/local/mysql/include/mysql -I/usr/local/berkeley-db/include -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ncurses/include -no-cpp-precomp  -I/usr/local/include -g -O2 -DZTS  -c /usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c -o ext/mbstring/oniguruma/regerror.lo 
In file included from /usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c:37:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/varargs.h:4:2: error: #error "GCC no longer implements <varargs.h>."
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/varargs.h:5:2: error: #error "Revise your code to use <stdarg.h>."
/usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c: In function 'onig_error_code_to_str':
/usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c:196: error: parse error before 'va_dcl'
/usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c:214: error: parse error before 'OnigErrorInfo'
/usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c: In function 'onig_snprintf_with_pattern':
/usr/ports/php-5.2cvs/ext/mbstring/oniguruma/regerror.c:271: error: parse error before 'va_dcl'
make: *** [ext/mbstring/oniguruma/regerror.lo] Error 1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-14 14:58 UTC] tony2001@php.net
Look into your config log for "length prototypes and stdarg.h" - does this check fail for you?
If yes, for which reason?
 [2006-08-14 15:28 UTC] openmacnews at gmail dot com
checking, seems *no* failure ...  from config.log:

...
configure:68143: checking for external libmbfl
configure:68161: result: no
configure:68181: checking for variable length prototypes and stdarg.h
configure:68220: gcc -o conftest -I/usr/local/include -g -O2 -I/usr/local/mysql/include/mysql -I/usr/local/berkeley-db/include -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ncurses/include -no-cpp-precomp -liconv -L/usr/local/lib -L/usr/local/berkeley-db/lib -bind_at_load -L/usr/local/mysql/lib/mysql -lmysqlclient_r -L/usr/local/berkeley-db/lib -ldb -L/usr/local/lib -lpcre -L/usr/local/ssl/lib -lssl -lcrypto -L/usr/local/ncurses/lib -lncurses  -L/usr/local/lib -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/ssl/lib -L/usr/local/berkeley-db/lib -L/usr/local/berkeley-db/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/gd/lib -L/usr/local/gd/lib conftest.c -liconv -lgmp -lintl -lgd -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lssl -lcrypto -lpcre -ldb-4.3 -ldb-4.3 -lcurl -lz -lpcre -lssl -lcrypto -lm  -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lidn -lssl -lcrypto -lz -lxml2 -lz -liconv -lm >&5
configure:68223: $? = 0
configure:68225: ./conftest
configure:68228: $? = 0
configure:68243: result: yes
configure:68256: checking for stdlib.h
configure:68261: result: yes
...
 [2006-08-14 20:17 UTC] tony2001@php.net
Could you plz check main/php_config.h and tell me what is the value of HAVE_STDARG_PROTOTYPES defined there?
 [2006-08-14 22:10 UTC] openmacnews at gmail dot com
hi tony,

/usr/ports/php-5.2cvs/main  > grep HAVE_STDARG_PROTOTYPES *
  php_config.h:/* #undef HAVE_STDARG_PROTOTYPES */
  php_config.h.in:#undef HAVE_STDARG_PROTOTYPES
 [2006-08-16 10:18 UTC] tony2001@php.net
Latest CVS works just fine here.
 [2006-08-16 10:35 UTC] marcus at synchromedia dot co dot uk
FWIW, I'm getting this on 5.1.4. I DO have an entry in my 
config.log though:

configure:52940: checking for variable length prototypes and 
stdarg.h
configure:52974: gcc -o conftest -I/usr/include -mtune=7450 
-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec -fno-strict-
aliasing -DBIND_8_COMPAT=1 -DEAPI -I/sw/include -Wno-
pointer-sign -I/sw/include -no-cpp-precomp -liconv -L/usr/
lib -L/sw/lib -L/opt/local/lib -L/opt/local/lib conftest.c -
liconv -lintl -lt1 -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 
-lz -lm  -lxml2 -lz -liconv -lm -lcurl -lssl -lcrypto -lz -
lxml2 -lz -liconv -lm 1>&5
configure: failed program was:
#line 52959 "configure"
#include "confdefs.h"

#include <stdarg.h>
int foo(int x, ...) {
        va_list va;
        va_start(va, x);
        va_arg(va, int);
        va_arg(va, char *);
        va_arg(va, double);
        return 0;
}
int main() { return foo(10, "", 3.14); }

Does that make any more sense?
 [2006-08-16 11:47 UTC] marcus at synchromedia dot co dot uk
This thread suggests that this is a problem that was 
introduced with XCode 2.2 and gcc 4.0.1, so if your XCode is 
older then you won't see this error:

http://www.mail-archive.com/fink-devel@lists.sourceforge.net/
msg12622.html
http://thread.gmane.org/gmane.os.apple.fink.general/19723
 [2006-08-16 12:42 UTC] tony2001@php.net
Assigned to the maintainer.
 [2006-08-16 13:15 UTC] openmacnews at gmail dot com
i've
  xcode 2.4
  gcc version 4.0.1 (Apple Computer, Inc. build 5363)

installed.

bldg with-mbstring _had_ worked w/ this combo ...

though i can't swear to the correlation, i think it was a php52cvs update when it started.

sounds like y'all have a better handle on it atm.

thx.
 [2006-08-16 14:24 UTC] tony2001@php.net
You can try to grab some old CVS code and see if it builds for you.
This command would do that for you:
cvs -d :pserver:cvsread@cvs.php.net/repository co -D "2006-<month>-<day> 00:00:00" -r PHP_5_2 php-src
 [2006-08-16 14:25 UTC] tony2001@php.net
And if the old code doesn't work for you too, it's likely to be Xcode issue, not PHP.
 [2006-08-16 15:22 UTC] marcus at synchromedia dot co dot uk
Well, given that I'm seeing this in 5.1.4, I doubt earlier 
versions of 5.2 will be any different, and I bet openmacnews 
upgraded XCode between Aug 4th and 14th...

I have however discovered something else: it works fine on 
Intel OS X with XCode 2.4 (MacBook). I'm seeing this problem 
on a Dual G4, also with XCode 2.4. Looking more like a gcc PPC 
issue to me.
 [2006-08-16 15:34 UTC] openmacnews at gmail dot com
>I bet openmacnews upgraded XCode between Aug 4th and 14th...

yup.

> I have however discovered something else: it works fine on 
Intel OS X with XCode 2.4 (MacBook). I'm seeing this problem 
on a Dual G4, also with XCode 2.4. Looking more like a gcc PPC issue to me.

hmm ...

all my tests ARE on PPC -- no MacIntels.
 [2006-08-24 20:48 UTC] php-bug-38452 at ryandesign dot com
I successfully compiled PHP 5.1.4 on Mac OS X 10.4.6 PPC G4 with a certain set of configure options on June 21, 2006, and today I wanted to upgrade to 5.1.5 but got the aforementioned error. Went back and tried to compile the exact same 5.1.4 that worked before, and got same error. So nothing changed in PHP code, but something that changed in the system. According to my installer receipts, since June 21, I have installed Mac OS X 10.4.7, QuickTime 7.1.2, iTunes 6.0.5, Security Update 2006-004 and Xcode 2.4.

Interestingly before all this trouble I was able to install PHP 5.1.5 through MacPorts with no errors, and it also enables mbstring. I don't know why it works there and not when I compile manually (even using their exact same configure options).
 [2006-09-02 19:54 UTC] seth at pricepages dot org
I just got this error with the latest CVS of PHP 5.2.x. I'm 
running XCode 2.4. Is this going to be fixed soon?
 [2006-09-05 21:28 UTC] ralph at cs dot cf dot ac dot uk
This seems like a rerun of a bug I reported about a year 
ago, which has come back to rear its ugky head again....

In 5.2RC3, MacOS 10.4.7, Xcode 2.4, PPC Mac G4 I get:

In file included from /usr/local/src/php-5.2.0RC3/ext/
mbstring/oniguruma/regerror.c:37:
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/varargs.h:
4:2: error: #error "GCC no longer implements <varargs.h>."
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include/varargs.h:
5:2: error: #error "Revise your code to use <stdarg.h>."
/usr/local/src/php-5.2.0RC3/ext/mbstring/oniguruma/
regerror.c: In function 'onig_error_code_to_str':
/usr/local/src/php-5.2.0RC3/ext/mbstring/oniguruma/
regerror.c:196: error: parse error before 'va_dcl'
/usr/local/src/php-5.2.0RC3/ext/mbstring/oniguruma/
regerror.c:214: error: parse error before 'OnigErrorInfo'
/usr/local/src/php-5.2.0RC3/ext/mbstring/oniguruma/
regerror.c: In function 'onig_snprintf_with_pattern':
/usr/local/src/php-5.2.0RC3/ext/mbstring/oniguruma/
regerror.c:271: error: parse error before 'va_dcl'
make: *** [ext/mbstring/oniguruma/regerror.lo] Error 1
 [2006-09-06 20:13 UTC] ralph at cs dot cf dot ac dot uk
See Bug #34977.
 [2006-09-14 22:54 UTC] hirokawa@php.net
Since PHP 5.2, newer version of oniguruma (multibyte regex library for Ruby) is bundled.
This problem maybe caused by this change.
I ask for the original author of oniguruma about 
this problem.


 [2006-09-16 11:56 UTC] hirokawa@php.net
It seems to be caused by bugs of gcc 4.0.1 of XCode 2.4 
on Mac OSX PPC.

Can you try gcc-3.3 instead of gcc-4.0.1 ?

$ CC=/usr/bin/gcc-3.3
$ ./configure [options]
$ make

 [2006-09-17 07:28 UTC] hirokawa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This problem is not PHP 5.x issue, but it is caused by
a bug of gcc 4.0.1 in Xcode.

The possible workarounds are,
 1.try newer/better version of XCode.
 2.use gcc-3.3 instead of gcc-4.0.1.
 3.disable compile optimization switch (-O2) 
 4.rewrite  
       #undef HAVE_STDARG_PROTOTYPES
   to
       #define HAVE_STDARG_PROTOTYPES  1
   in main/php_config.h after configure executed.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 21:01:29 2024 UTC