Bug #78102 [PATCH]: Can't compile on OSX

From: Date: Mon, 03 Jun 2019 22:35:51 +0000
Subject: Bug #78102 [PATCH]: Can't compile on OSX
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221104@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78102&edit=1

 ID:                 78102
 Patch added by:     petk@php.net
 Reported by:        dams@php.net
 Summary:            Can't compile on OSX
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   OSX
 PHP Version:        Next Major Version
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: 78102.patch
Revision:   1559601351
URL:        https://bugs.php.net/patch-display.php?bug=78102&patch=78102.patch&revision=1559601351


Previous Comments:
------------------------------------------------------------------------
[2019-06-03 20:32:29] petk@php.net

Hello. Thanks for the report. It's the macOS version of make most likely here...

What is the output of this on this machine?

  make -v

------------------------------------------------------------------------
[2019-06-03 20:10:09] dams@php.net

Description:
------------
I'm building PHP 7.4 from the git repository : fresh clone, and short compilation script (see
below). 

I've been bumping the following error message for 3 weeks now : 
/Users/php/bin/php-src/Zend/zend_language_parser.h:205:2: error: #endif without #if
#endif /* !YY_ZEND_USERS_php_BIN_PHP_SRC_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED  */

I tried to disable all extensions, buildconf --force, make clean, script/dev/genfiles without
success. I also tried to build right after a clone. 

PHP 7.3.6 builds (simple checkout), but 7.4 can't pass make. 

I'm using bison 3.4.1, OSX Mojave

Test script:
---------------
git checkout PHP-7.4; git pull
make clean
./buildconf --force
env YACC=brew --prefix bison/bin/bison ./configure \
    --disable-all
make -jsysctl -n hw.logicalcpu_max
make test


Expected result:
----------------
Compilation succeed :)

Actual result:
--------------
In file included from /Users/php/bin/php-src/Zend/zend_ast.c:23:
/Users/php/bin/php-src/Zend/zend_language_parser.h:53:18: warning: extra tokens at end of #include
directive [-Wextra-tokens]
#include "zend.h"#ifndef YYTOKENTYPE
                 ^
                 //
/Users/php/bin/php-src/Zend/zend_language_parser.h:205:2: error: #endif without #if
#endif /* !YY_ZEND_USERS_php_BIN_PHP_SRC_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED  */
 ^
1 warning and 1 error generated.
make: *** [Zend/zend_ast.lo] Error 1


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



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


Thread (7 messages)

« previous php.bugs (#221104) next »