php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39210 compilation fails because of vararg.h usage
Submitted: 2006-10-20 12:52 UTC Modified: 2006-10-20 14:05 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tiosancho at hotmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.1.6 OS: Mac OS 10.4.8 PowerPC
Private report: No CVE-ID: None
 [2006-10-20 12:52 UTC] tiosancho at hotmail dot com
Description:
------------
Compiling fails under Mac OS 10.4.8 with current development tools installed.  The failure message is ""GCC no longer implements <varargs.h>"".  It's used in regerror.c.

The code does contain a preprocessor directive that attempts to switch between varargs.h and stdargs.h, but the necessary value isn't defined and therefore the older syntax is used.

This bug is the same as 34977, which was closed.

I manually deleted the offending code, but that caused a slew of errors like

/Users/gavin/Desktop/PHP/php-5.1.6/ext/mbstring/oniguruma/regerror.c:186: error: conflicting types for 'onig_error_code_to_str'
/Users/gavin/Desktop/PHP/php-5.1.6/ext/mbstring/oniguruma/regerror.c:186: note: a parameter list with an ellipsis can't match an empty parameter name list declaration


Reproduce code:
---------------
Here were the config options I used:

./configure --prefix=/Library/PHP5 --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --with-zlib --with-xml --with-zlib-dir=/usr --with-openssl --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-sockets --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs=/usr/sbin/apxs

I tried defining the macro to trigger the use of stdarg.h, which is HAVE_STDARG_PROTOTYPES.  This caused the same result as mentioned above:

error: conflicting types for 'onig_error_code_to_str'
/Users/gavin/Desktop/PHP/php-5.1.6/ext/mbstring/oniguruma/regerror.c:186: note: a parameter list with an ellipsis can't match an empty parameter name list declaration

Expected result:
----------------
Successful compilation.

Actual result:
--------------
Broken project.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-20 13:13 UTC] tony2001@php.net
Duplicate of bug #38452.
 [2006-10-20 13:19 UTC] tiosancho at hotmail dot com
There are some conflicting definitions in onigurama files: onigurama.h and regint.h.  If you comment them out, PHP will build.  I don't know what the repercussions are, because the installation is now failing.

Also, I see where some people have dismissed this as an Xcode problem, but people are also reporting it on Linux.
 [2006-10-20 13:21 UTC] tiosancho at hotmail dot com
How are redundant definitions the fault of two OSs' development tools, on different platforms?
 [2006-10-20 14:05 UTC] tony2001@php.net
Please report it to XCode developers.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 24 23:00:02 2025 UTC