Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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?
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.
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"
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
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!
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...
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?
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"
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).....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.