php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21552 re2c: command not found
Submitted: 2003-01-09 12:27 UTC Modified: 2003-01-10 12:56 UTC
From: ed2019 at columbia dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.0 OS: Solaris 2.8
Private report: No CVE-ID: None
 [2003-01-09 12:27 UTC] ed2019 at columbia dot edu
After configuring a fresh download of PHP 4.3.0, I attempted to compile with the following configure line:

./configure --with-apxs=/opt/apache1327/bin/apxs --with-mysql

Configure complted successfully, and make halted partway through with the following message:

re2c -b php-4.3.0/ext/standard/var_unserializer.re > php-4.3.0/ext/standard/var_unserializer.c
/bin/sh: re2c: not found
make: *** [php-4.3.0/ext/standard/var_unserializer.c] Error 1

I expected that if configure completed successfully, my system had everything it needed to build.
Is re2c a required build tool?  If so why didn't configure complain?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-09 18:52 UTC] sniper@php.net
re2c is not required (just tested). You've just done
something wrong between unpacking the tar archive and 
'make' command.

 [2003-01-10 00:37 UTC] changeling at yahoo dot com
If he did something wrong, then I must have as well because 
I'm having the exact same problem on a clean copy of PHP 
4.3.0, too.  Solaris 8, Apache 1.3.x.

./configure --with-apxs=/usr/local/apache/bin/apxs --with-
flatfile
 [2003-01-10 05:17 UTC] alan at akbkhome dot com
Is solaris incorrectly untaring the data stamp on the var_unserializer.c ?

or is make file date check failing?

the work around would be to touch var_unserializer.c before building..
but try untaring 4.3.0 and look at the date stamp to see if the .c is later than the .re file...
 [2003-01-10 08:35 UTC] ed2019 at columbia dot edu
directory info from freshly un-tarred downloads from the official website, no other changes made or commands issued.
The dates on solaris and linux are the same.  The dates on the .c files are later than on the .re files.

On Solaris:
$ pwd
/tmp/erik_tmp/php-4.3.0/ext/standard
$ ls -l *.re
-rw----- ed2019 staff 12566 Sep 30 00:56 url_scanner_ex.re
-rw----- ed2019 staff  8276 Aug 19 15:45 var_unserializer.re
$ ls -l url_scanner.c; ls -l url_scanner_ex.c; ls -l var_unserializer.c
-rw----- ed2019 staff  8279 Aug 28 02:13 url_scanner.c
-rw----- ed2019 staff 26762 Dec 26 23:51 url_scanner_ex.c
-rw----- ed2019 staff 16718 Dec 26 23:51 var_unserializer.c

On Linux (debian):
erik@oslo:~/phptemp/php-4.3.0/ext/standard$
-rw-r--r-- erik erik 12566 Sep 30 00:56 url_scanner_ex.re
-rw-r--r-- erik erik  8276 Aug 19 15:45 var_unserializer.re

erik@oslo:~/phptemp/php-4.3.0/ext/standard$ ls -l url_scanner.c; ls -l url_scanner_ex.c; ls -l var_unserializer.c
-rw-r--r-- 1 erik erik  8279 Aug 28 02:13 url_scanner.c
-rw-r--r-- 1 erik erik 26762 Dec 26 23:51 url_scanner_ex.c
-rw-r--r-- 1 erik erik 16718 Dec 26 23:51 var_unserializer.c

using:
$ make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.8
 [2003-01-10 08:47 UTC] wez@php.net
tar tvf php-4.3.0.tar | grep url_scanner_ex
-rw-r--r-- andrei/andrei  26762 2002-12-27 04:51 php-4.3.0/ext/standard/url_scanner_ex.c
-rw-r--r-- andrei/andrei  12566 2002-09-30 05:56 php-4.3.0/ext/standard/url_scanner_ex.re

Are you using GNU tar or Solaris tar?
Because it sounds like your tar tool is at fault.

 [2003-01-10 08:48 UTC] wez@php.net
And for completeness:
-rw-r--r-- andrei/andrei  16718 2002-12-27 04:51 php-4.3.0/ext/standard/var_unserializer.c
-rw-r--r-- andrei/andrei   8276 2002-08-19 20:45 php-4.3.0/ext/standard/var_unserializer.re

 [2003-01-10 08:55 UTC] ed2019 at columbia dot edu
The problem was with a piece of software we use here to manage our source tree, called stem.  Stem takes as input a directory of source files (such as php-4.3.0) and copies them into our main source directory, then makes a nest of symlinks to support building with different object directories for different platforms.

The problem was that stem clobbers the file dates when it copies the files.  When the dates aren't perfect make tries to call re2c and dies.  Apoligies for causing a ruckus with this bug which is the fault of one of our scripts.

Installation / compiling would, however, be somewhat more robust if dates weren't critical to the success of make.  Perhaps by changing the makefile to never compile .re files in release distributions, or moving the .re files to an 'original source' directory that isn't operated on by make.  This problem could crop up not just with my script but potentially with anyone who moves the files around before compiling and manages to clobber the dates.

thanks to all who provided help / comments.
 [2003-01-10 09:02 UTC] ed2019 at columbia dot edu
Wez-

On the solaris box I am using:
$ tar --version
tar (GNU tar) 1.13

On the linux box:
erik@oslo:~$ tar --version
tar (GNU tar) 1.13.25

Interestingly enough, my dates matched each other perfectly even though they were different than yours. I wonder why they are different?

Also, the problem I found (with my stem script that clobbers the dates) doesn't necessarily explain the problem that changeling@yahoo.com was having, though it seems likely that it is date related.  Perhaps this should still be open.
 [2003-01-10 12:56 UTC] sniper@php.net
bugs in 3rd party tools are not bugs in PHP. Bogus.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 21:01:26 2024 UTC