Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lex: not found

Status
Not open for further replies.

bobbydale81

IS-IT--Management
Dec 9, 2005
33
US
I am attempting to install PHP 4.4.4.

When running the ./configure command, I get the following output:
----------------------------------------------------------
[ root ] ./configure
loading cache ./config.cache
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... powerpc-ibm-aix5.1.0.0
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... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... no
checking for re2c... exit 0;
checking whether ln -s works... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
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... no
checking lex output file root... ./configure[2540]: lex: not found
configure: error: cannot find output from lex; giving up
----------------------------------------------------------

I have Googled this problem relentlessly and I have not found a solution. Can anyone point me in the right direction?

Thanks,
Dale
 
Have you seen this:


?

That led to:


which, although not about AIX, does mention that you need flex, not lex.

Perhaps the solution is to install flex on your system. The main dev platform for PHP is probably an OS which uses flex and bison rather than lex and yacc. Although lex and YACC are the originals, flex and bison have eclipsed those older workhorses in their feature sets. It could be that PHP needs a feature of flex that lex simply does not provide.



Want the best answers? Ask the best questions! TANSTAAFL!
 
I was also thinking that I needed flex so I downloaded flex-2.5.4.

When installing flex, I can run ./configure just fine; however, when I run make I get the following output:
----------------------------------------------------------
[ root ] make
gcc -c -I. -I. -g -O ccl.c
gcc -c -I. -I. -g -O dfa.c
gcc -c -I. -I. -g -O ecs.c
gcc -c -I. -I. -g -O gen.c
gcc -c -I. -I. -g -O main.c
gcc -c -I. -I. -g -O misc.c
gcc -c -I. -I. -g -O nfa.c
yacc -d ./parse.y
yacc: not found

make: 1254-004 The error code from the last command is 1.


Stop.
----------------------------------------------------------

To me, this means that I need to install yacc, but I can't find it anywhere to download.
 
I tried to install bison-2.3 and I receive the following error when trying to run the make command:

----------------------------------------------
checking whether m4 supports frozen files... no
configure: error: GNU M4 1.4 is required
----------------------------------------------

So I downloaded m4-1.4.7 and installed it, but I still get the above error.
 
No, no.

I mean, yes, to the best of my knowledge you should be installing GNU bison. It's just that I checked one of GNU's mirrors for the revision number of the latest version of bison, and the highest number as 1.87. It turns out I checked a bad mirror that didn't have all the files.

I'm unfamiliar with that error, which I assume you when when trying to run [tt]configure[/tt] to compile bison. Unfortunately, it's been more than a decade since the last time I had to install bison from tarball, and that time I did not get the error you report. I can only suggest (it's for HPUX, but the answer might also apply to AIX) or the help-bison mailing list.



Want the best answers? Ask the best questions! TANSTAAFL!
 
The link explains that it could be the PATH variable not being set correctly, but mine is set correctly. :-(

How do I find this help-bison mailing list?
 

I wasn't able to figure out the problem, so I have switch and now I am trying to install php-5.1.6 instead.

When I run ./configure, I am getting the following error:
----------------------------------------------------------
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/local/bin/xml2-config
configure: error: libxml2 version 2.6.11 or greater required.
----------------------------------------------------------

This confuses me because I do have libxml2-2.6.8-2 installed (via an rpm package); however, I think that the rpm package did not update the /usr/local/bin/xml2-config file when it installed.

How can I get the configure script to find libxml2-2.6.8-2 in it's correct location?

Anyone...?

Thanks,
Dale
 
In your PHP source directory, try running:

[tt]./configure --help[/tt]

There will be information there for specifying directories, if possible.



Want the best answers? Ask the best questions! TANSTAAFL!
 
i may be coming to this thread late, but when php says it needs 2.6.11 or greater and you say that you have 2.6.8-2 then this seems consistent. you have not got a high enough version of libxml2.
 
Der... that is correct.

The newest version I could find was 2.6.27.

I kept looking at it and thinking in mathematical terms:

2.6.8 > 2.6.27

But this is incorrect when working with version numbers as:

27 > 8

Updating libXML2 to 2.6.27 solved the problem.

Thanks,
Dale
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top