LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-12-2002, 02:45 PM   #1
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Rep: Reputation: 15
Problem with CVS gcc-3.2 install...


Alright, I got a completely unexpected Error when trying to install GCC....first I had some problems installing the patch.....and I thought i got it right, then when intalling gcc it give me this error...

Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /usr/src/lfstars/gcc-build using "mh-frag" and "mt-frag"
../gcc-3.2/configure: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


Anyone have any advice??? I'm fairly new to linux, I know enough to make my way around and thought this would be a good way to get my self MORE familiar with it, but I am just lost on this one. I understand the error, but not how to fix it. SO help would be greatly appreciated...
 
Old 11-12-2002, 02:57 PM   #2
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
so you are in the middle of ch.6? You should have made a link from gcc to $LFS/static/bin/cc when you installed in ch.5.

go to /static/bin and do a "ls -l | grep cc" and see if it is there, and if so, where it is pointing.

if it's not, do "ln -s gcc /static/bin/cc

Or /static/bin might not be in your $PATH do "echo $PATH" to check

good luck

-Adam
 
Old 11-12-2002, 03:03 PM   #3
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Well, I went and checked /static/bin and there was no link there for gcc but /static/bin was in my PATH.......so I added the link....and tried again...and it did the same thing. Could it possibly be something with the patches?
 
Old 11-12-2002, 03:10 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
try this:

CC="gcc"

from the command line, then try compiling again.

and don't forget to start from new sources every time
 
Old 11-12-2002, 03:11 PM   #5
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
What do you mean by start from new sources every time?

Edit: Setting CC to "gcc" didn't work either.....same error. Maybe I did something wrong in Ch. 5??

Last edited by jambeck; 11-12-2002 at 03:15 PM.
 
Old 11-12-2002, 03:16 PM   #6
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
It's really best to delete the sources you have been working from and unpack clean ones if you ever run into problems.

The book says to do this before going into ch.6. You really only need to compile and install the certain package, and then delete the sources you were just working in.

That means you gotta re-apply the patch too
 
Old 11-12-2002, 03:37 PM   #7
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Still not working, I don't know what to do....should I go back and re-do the part about gcc? /static/bin/cc doesn't exists and that is where gcc is linked to in ch. 5 "installing gcc"

Last edited by jambeck; 11-12-2002 at 03:41 PM.
 
Old 11-12-2002, 03:46 PM   #8
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
I don't know buddy. Do you have a /static/bin/gcc binary? I would have thought that the previous linking that you did would have told you if it wasn't.

try this again:

cd /static/bin/
ln -s gcc cc

That's all I can think of. I hope you don't gotta go back through ch.5
 
Old 11-12-2002, 04:49 PM   #9
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
well, thanks for the help...I'm still trying to work it out. It's no big sweat if I have to go back through ch. 5....my purpose in doing this is to learn linux more indepth anyways, so this is definitely helping. Thanks for all your help!
 
Old 11-12-2002, 05:05 PM   #10
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Well, something must be wrong with something I did in Ch. 5...it still says

*** The command 'gcc -s -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

I don't know why it's not set to a working compiler and I can't find the compiler to see if maybe my CC link is just set up to the wrong place....Does anyone else have any advice/help? By the way thanks for all the previous help...
 
Old 11-13-2002, 05:40 AM   #11
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Well, I went back and started at ch. 5 over again....and when I got to the chapter six part....well, I got the same error. I don't know what is wrong. I think that I may have gotten some form of error when doing the gcc part in ch. 5......but I wasn't paying close attention.....Anyways....I get the same error that is in the orginal post...Anyone have ANY ideas?
 
Old 11-13-2002, 02:43 PM   #12
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Anyone out there? I discovered why gcc isn't working right ... when I install in ch. 5 it gives me an error at the end. Here's what I get:
make[4]: *** [locale.lo] Error 1
make[4]: Leaving directory `/home/lfs/unzip/gcc-build/i686-pc-linux-gnu/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/lfs/unzip/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/home/lfs/unzip/gcc-build/i686-pc-linux-gnu/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/lfs/unzip/gcc-build'
make: *** [bootstrap] Error 2

...when I check out the contents of config.status afterwards....this is what it says:
./gcc-3.2/configure --with-gcc-version-trigger=/home/lfs/unzip/gcc-3.2/gcc/version.c --host=i686-pc-linux-gnu --prefix=/static --disable-nls --disable-shared --norecursion
# using "mt-frag"
 
Old 11-13-2002, 09:18 PM   #13
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
what base distro are you compiling from?

Maybe you should use the 4.0 book... it's pretty recent... came out a few weeks ago
 
Old 11-13-2002, 09:38 PM   #14
mdh
Member
 
Registered: Nov 2002
Location: Melbourne, Australia
Distribution: (C)LFS (x86_64, ix86, sparcv9, ppc)
Posts: 122

Rep: Reputation: 16
You aren't coming from a system with glibc > 2.3 are you? (RH8 ?)

If so you'll need an additional patch
http://www.haible.de/bruno/gcc-3.2-g....3-compat.diff

c++ breaks when building under glibc-2.3 or greater, at about the point it seems yours is...
 
Old 11-14-2002, 06:31 AM   #15
jambeck
Member
 
Registered: Oct 2002
Distribution: VectorLinux for now...
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks for the replies, I was indeed using Redhat 8.0, I downloaded the patch. I run that the same way as other patches? After I save it do I need to safe it as .patch or is it fine as .diff (I know that extensions don't neccesarily mean anything in linux).....
 
  


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
gcc 3.2.2 install problem bhuvanagoud Linux - Newbie 1 10-21-2005 11:26 AM
Suse 9.3 Pro gcc install problem Detriamus SUSE / openSUSE 2 10-09-2005 06:11 PM
gcc install problem gear Linux - Newbie 7 09-15-2005 03:44 AM
yum install gcc problem malibuguy Linux - Newbie 1 01-15-2005 05:11 PM
gcc compiler install problem mla Linux - Software 4 10-11-2003 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:11 AM.

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