php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20756 configure fails detecting flex on Sun's version of lex
Submitted: 2002-12-02 00:07 UTC Modified: 2002-12-02 02:25 UTC
From: evan at unixpimps dot org Assigned: iliaa (profile)
Status: Closed Package: Compile Failure
PHP Version: 4.3.0RC2 OS: Solaris 2.8
Private report: No CVE-ID: None
 [2002-12-02 00:07 UTC] evan at unixpimps dot org
Configure command:
./configure --enable-trans-sid --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr

Configure output:
checking for working sed... sed
checking build system type... sparc-sun-solaris2.8
checking host system type... sparc-sun-solaris2.8
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: WARNING: You will need bison if you want to regenerate the PHP parsers.
checking for flex... no
checking for lex... lex
checking for yywrap in -lfl... no
checking for yywrap in -ll... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... no
checking for gcc option to accept ANSI C... none needed
checking for an ANSI C-conforming const... yes
checking flex version... lex: Software Generation Utilities (SGU) Solaris-ELF (4.0)


The script just hangs and waits indefinitley at this point.
Installing the GNU version of flex, obviously, solved the problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-02 01:03 UTC] iliaa@php.net
Please try using this CVS snapshot:

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


 [2002-12-02 01:34 UTC] evan at unixpimps dot org
Same thing.
-----

pwd && ./configure --enable-trans-sid --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr
/usr/home/evan/php4-200212020630
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for working sed... sed
checking host system type... sparc-sun-solaris2.8
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking if compiler supports -R... yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for gawk... gawk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parsers.
checking for flex... lex
checking for yywrap in -ll... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... no
checking for working const... yes
checking flex version... lex: Software Generation Utilities (SGU) Solaris-ELF (4.0)

And it justs hangs again. The solaris version of lex prints it's version on standard err and then enters processing mode, so like most solaris things you just need to cater to the way it works. Echoing nothing to $LEX -V, while dumping a lot of garbage on the screen, allows configure to continue and still works with GNU flex install as well.

Here's a unified diff.

--- configure.bak       Mon Dec  2 02:16:42 2002
+++ configure   Mon Dec  2 02:32:16 2002
@@ -2632,7 +2632,7 @@
 
 echo $ac_n "checking flex version""... $ac_c" 1>&6
 echo "configure:2635: checking flex version" >&5
-set `$LEX -V | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/^0-9 //g'`
+set `echo '' | $LEX -V | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/^0-9 //g'`
 if test "${1}" != "2" -o "${2}" != "5" -o "${3}" -lt "4"; then
         echo "configure: warning: You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers." 1>&2
 fi
 [2002-12-02 02:25 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

The fix just didn't make it into the snapshot yet, but the same thing was added as your patch is.

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