LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-18-2013, 06:25 PM   #1
Qichang
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
How to install lex in linux 2.6.10?


Hi,

I'm trying to build gcc-2.95.3.

I have installed flex-2.5.33 and bison-1.5. While running ./configure in gcc build directory, I got error message saying "checking lex output file root... ../../gcc-2.95.3/gcc/configure: line 2354: lex: command not found
configure: error: cannot find output from lex; giving up
"

I clearly has flex installed.
qichang@ubuntu504Linux2610:~/gcc-build$ which flex
/usr/local/bin/flex

Can it be that the flex version I installed is not compatible?

I have ubuntu 5.0.4 package which has linux 2.6.10.

Here is the command history.

Thanks,
Qing

203 patch -Np1 -i ../gcc-2.95.3-2.patch
204 mkdir ../gcc-build
205 cd ../gcc-build/
206 ../gcc-2.95.3/configure --prefix=/usr --enable-languages=c,c++ --disable-nls --disable-shared --enable-threads=posix

...
checking for flex... (cached) lex
checking for yywrap in -lfl... yes
checking lex output file root... ../../gcc-2.95.3/gcc/configure: line 2354: lex: command not found
configure: error: cannot find output from lex; giving up
Configure in /home/qichang/gcc-build/gcc failed, exiting.
 
Old 09-18-2013, 10:41 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
/usr/bin/lex : Is provided by the Ubuntu package 'flex'
http://packages.debian.org/search?su...sr%2Fbin%2Flex
( The online search isn't always working for Ubuntu )

→ → $ sudo apt-get install flex
( /usr/bin/lex is a sym-link to /usr/bin/flex ).


Offline search : $ sudo apt-get install apt-file
$ apt-file update && apt-file search /usr/bin/lex


.. Besides that you may not be able to build gcc-2.95.3
on any Ubuntu version.
** Please tell which software it is that require gcc-2.95 .
( Most older software will compile with gcc/g++ version 3.2.3 :
$ sudo apt-get install gcc-3.2 ).

** gcc-2.95.3 / g++-2.95.3 is available in Slackware 8.1 .
** gcc-2.95.4 / g++-2.95.4 : Debian 3 Woody / Debian 4 Etch.
http://www.linuxquestions.org/questi...04-a-879827/#2

-

Last edited by knudfl; 09-18-2013 at 10:56 PM.
 
Old 09-20-2013, 10:42 AM   #3
Qichang
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi knudfl,

Thanks for your reply.

I copied "flex" to "lex" in /usr/bin and the compiling went through, but there are other problem in the following steps.

Why do you say may not be able to build gcc-2.95.3 on any Ubuntu version?

I'm trying to build 2.6.10 kernel, which requires gcc-2.95.3.

Thanks,
Qing

Last edited by Qichang; 09-20-2013 at 11:12 AM.
 
Old 09-20-2013, 01:44 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
GCC version 2.95.3 can be compiled on old OS's "style 2002":
Slackware 8.1, Redhat 7.x, Debian 3, etc.
Later OS have a glibc not compatible with gcc-2.95.


Quote:
I'm trying to build 2.6.10 kernel, which requires gcc-2.95.3
I don't think so. Would be gcc version 3.3 / 3.4 or later.

* kernel-2.6.10 : Latest update = 24-Dec-2004
https://www.kernel.org/pub/linux/kernel/v2.6/
* kernel-2.6.10 : Can be used with 10 year old hardware.

-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lex & yacc Programming in linux. hemanexp Linux - Software 2 01-07-2004 11:09 AM
Nessus install on mdk 9.1 errors w/ Neither lex nor flex are installed Hobbs Linux - Software 1 11-19-2003 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration