php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38762 build dir != src dir results in "Zend/zend_language_parser.c: No such file"
Submitted: 2006-09-09 19:30 UTC Modified: 2007-05-24 21:42 UTC
From: butterblume83 at gmx dot de Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.1.6 OS: Ubuntu Dapper Drake
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: butterblume83 at gmx dot de
New email:
PHP Version: OS:

 

 [2006-09-09 19:30 UTC] butterblume83 at gmx dot de
Description:
------------
When I build PHP and the build directory (from where I call configure) is different to the source directory, I always (configure with or without params) produces the error that zend_language_parser.c was not found. When building from inside the source directory (./configure) is all nice and dandy!

Reproduce code:
---------------
cd build
../src/php-5.1.6/configure
make

Expected result:
----------------
"Build successfully done."

Actual result:
--------------
-I/home/fa/dev/build-area/php5/build/php/  -D_REENTRANT  -I/usr/include -g -O2 -pthread -DZTS   -c Zend/zend_language_parser.c -o Zend/zend_language_parser.lo
gcc: Zend/zend_language_parser.c: No such file or directory
gcc: no input files
make: *** [Zend/zend_language_parser.lo] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-09 19:48 UTC] johannes@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-09-09 20:09 UTC] butterblume83 at gmx dot de
@Johannes: the exact same error with 5.2 snapshot. Btw, the problem does not occur in Slackware 10.2.
 [2006-09-09 20:13 UTC] tony2001@php.net
Make sure you have yacc/bison installed.
 [2006-09-09 20:31 UTC] butterblume83 at gmx dot de
@tony2001: does not help.
 [2006-09-09 20:35 UTC] butterblume83 at gmx dot de
Is the configure-line:

  checking for flex version... invalid

interesting?
 [2006-09-09 21:13 UTC] tony2001@php.net
Can't reproduce.
 [2006-09-09 21:27 UTC] butterblume83 at gmx dot de
It works after I downgraded flex (2.5.31-38) to flex-old (2.5.4a-7). Please edit php's configure script so that a fatal error is thrown if the flex version is invalid.
 [2006-09-09 21:38 UTC] tony2001@php.net
Stefan, your change broke the check for flex:
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.1&r2=1.332.2.14.2.2
 [2006-09-09 22:45 UTC] sesser@php.net
The flex check works. The behaviour introduced with PHP 5.2 was unwanted. The original reporter reported the issue with PHP 5.1.6 which is proof enough, that my change that is only in 5.2 is NOT responsible.


 [2006-09-10 08:35 UTC] tony2001@php.net
Hi have tested 5.2 snapshot:

>[9 Sep 8:09pm UTC] butterblume83 at gmx dot de
>the exact same error with 5.2 snapshot.
 [2007-05-24 19:38 UTC] sniper@php.net
The bad logic introduced in some point. (Stefan had nothing to do with it)

As flex is required to build PHP from sources, then configure must bailout if wrong version/none is available.

 [2007-05-24 19:56 UTC] sniper@php.net
Recheck: This was Stefan's fault in PHP 5.2.x. We bundle flex generated scanner files with source distribution. You don't need any flex installed for building PHP. (I remembered it was required, my bad)

And about the "build dir != src dir" builds: I do that always, no problems whatsoever. (using PHP 5.2 from CVS that is)

If you can't build php outside source directory, submit a new bug report. (when using snapshot / 5.2.3)
 [2007-05-24 21:42 UTC] sniper@php.net
I'm feeling a bit stupid: There was more to fix but now everything is okay, even when you don't have flex/bison installed at all.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 18 14:01:26 2025 UTC