error: expected identifier or '(' in phpdbg.c #111

Closed
orieg opened this Issue Sep 14, 2014 · 3 comments

Projects

None yet

2 participants

@orieg
orieg commented Sep 14, 2014

When installing PHP 5.6 with phpdbg (via Homebrew) on Mac OS, a compile error happens:

/bin/sh /private/tmp/php56-SQBxFw/php-5.6.0/libtool --silent --preserve-dup-deps --mode=compile clang -D_GNU_SOURCE -Isapi/phpdbg/ -I/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/ -DPHP_ATOM_INC -I/private/tmp/php56-SQBxFw/php-5.6.0/include -I/private/tmp/php56-SQBxFw/php-5.6.0/main -I/private/tmp/php56-SQBxFw/php-5.6.0 -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/date/lib -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/ereg/regex -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/usr/local/opt/zlib/include -I/usr/local/opt/jpeg/include -I/usr/local/opt/libpng/include -I/usr/local/Cellar/freetype/2.5.3_1/include/freetype2 -I/usr/local/opt/gettext/include -I/usr/local/Cellar/icu4c/53.1/include -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/mbstring/oniguruma -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/mbstring/libmbfl -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/mbstring/libmbfl/mbfl -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/sqlite3/libsqlite -I/usr/include/libxml2 -I/private/tmp/php56-SQBxFw/php-5.6.0/ext/zip/lib -I/private/tmp/php56-SQBxFw/php-5.6.0/TSRM -I/private/tmp/php56-SQBxFw/php-5.6.0/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS  -c /private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg_help.c -o sapi/phpdbg/phpdbg_help.lo
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1498:2: error: expected identifier or '('
        if (cleaning || remote) {
        ^
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1508:2: error: expected identifier or '('
        if (address) {
        ^
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1513:2: error: expected identifier or '('
        if (sapi_name) {
        ^
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1520:9: error: a parameter list without types is only allowed in a function definition
        unlink(bp_tmp_file);
               ^
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1523:2: error: expected identifier or '('
        return 0;
        ^
/private/tmp/php56-SQBxFw/php-5.6.0/sapi/phpdbg/phpdbg.c:1524:1: error: extraneous closing brace ('}')
} /* }}} */
^
6 errors generated.
make: *** [sapi/phpdbg/phpdbg.lo] Error 1
make: *** Waiting for unfinished jobs....

I was able to workaround the issue by commenting the line 1496 of phpdbg.c. The compilation went thru with no issue after that. I'm not toally sure what should be the right patch, there is a lot of ifdef/ifndef and curly brackets.

I also describe the issue here.

@bwoebi
Collaborator
bwoebi commented Sep 14, 2014

Seems, that wasn't the right patch. Now I can't find any unmatched parenthesis.

@bwoebi bwoebi closed this Sep 14, 2014
@orieg
orieg commented Sep 14, 2014

Thank you! I confirm that I can't reproduce the issue with commit 05c7375.

@bwoebi
Collaborator
bwoebi commented Sep 15, 2014

By the way, I pushed it to 5.6 now; I just wanted to wait for your confirmation first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment