php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70750 Compilation fail
Submitted: 2015-10-20 08:55 UTC Modified: 2015-10-22 08:46 UTC
From: dams@php.net Assigned: nikic (profile)
Status: Not a bug Package: *General Issues
PHP Version: 7.0.0RC5 OS: OSX 10.10.5 (14F27)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dams@php.net
New email:
PHP Version: OS:

 

 [2015-10-20 08:55 UTC] dams@php.net
Description:
------------
starting at commit ddb6d7801e5dfc2f196b549b8ad51376cdc1bc90, PHP fails to compile on OSX. 



Test script:
---------------
make clean

./buildconf --force

# configure phpng
env YACC=`brew --prefix bison27`/bin/bison 
./configure \
    --prefix="/usr/local/opt/phpng" \
    --with-config-file-path="/usr/local/etc/phpng" \
    --with-config-file-scan-dir=/usr/local/etc/phpng/conf.d \
    --enable-mbstring \
    --enable-tokenizer \
    --with-curl \
    --with-sqlite3 \
    --enable-json \
    --disable-all
make -j`sysctl -n hw.logicalcpu_max`


Expected result:
----------------
PHP compiles fine
It does up to PHP up to commit f9e3461c02068c599ea9fbf6455860c8cc956bc6


Actual result:
--------------
Undefined symbols for architecture x86_64:
  "_zend_ast_append_doc_comment", referenced from:
      _zendparse in zend_language_parser.o
Undefined symbols for architecture x86_64:
  "_zend_ast_append_doc_comment", referenced from:
      _zendparse in zend_language_parser.o
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cgi/php-cgi] Error 1
make: *** Waiting for unfinished jobs....
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cli/php] Error 1
Undefined symbols for architecture x86_64:
  "_zend_ast_append_doc_comment", referenced from:
      _zendparse in zend_language_parser.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/phpdbg/phpdbg] Error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-21 02:39 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: nikic
 [2015-10-21 02:39 UTC] kalle@php.net
Have you tried to manually rebuild the language parsers? It seems like ddb6d7801e5dfc2f196b549b8ad51376cdc1bc90 only updated the grammar file, but didn't actually regenerate the parsers, but I could be mistaken.

Cc'ing Nikita for this one
 [2015-10-21 04:50 UTC] dams@php.net
Hi

I don't know how to 'rebuild the language parsers', so I checked out a clean php-src, and used the command below : it works.

I'm interested in the extra command to rebuild the language parser.
 [2015-10-21 04:50 UTC] dams@php.net
-Status: Assigned +Status: Not a bug
 [2015-10-21 04:50 UTC] dams@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2015-10-22 08:46 UTC] kalle@php.net
Hi

I'm not sure how it is done on non-Windows, but from our makefile on Windows, we do:

bison --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y

So I guess it would be sort of similar for Unix. You can maybe find something in one of the makefile files to help, our Windows definitions are found in win32/build/makefile.

Hope it helps!
 [2016-01-18 11:13 UTC] hywan@php.net
Actually, calling `./genfiles` fixes the issue for me.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 05 00:01:27 2024 UTC