LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problem with CVS gcc-3.2 install... (https://www.linuxquestions.org/questions/linux-from-scratch-13/problem-with-cvs-gcc-3-2-install-35287/)

jambeck 11-12-2002 02:45 PM

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...

adam_boz 11-12-2002 02:57 PM

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

jambeck 11-12-2002 03:03 PM

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?

adam_boz 11-12-2002 03:10 PM

try this:

CC="gcc"

from the command line, then try compiling again.

and don't forget to start from new sources every time

jambeck 11-12-2002 03:11 PM

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??

adam_boz 11-12-2002 03:16 PM

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

jambeck 11-12-2002 03:37 PM

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"

adam_boz 11-12-2002 03:46 PM

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

jambeck 11-12-2002 04:49 PM

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!

jambeck 11-12-2002 05:05 PM

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...

jambeck 11-13-2002 05:40 AM

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?

jambeck 11-13-2002 02:43 PM

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"

adam_boz 11-13-2002 09:18 PM

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

mdh 11-13-2002 09:38 PM

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...

jambeck 11-14-2002 06:31 AM

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).....


All times are GMT -5. The time now is 09:57 PM.