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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-18-2007, 04:22 PM
|
#1
|
Member
Registered: Jul 2007
Distribution: Ubuntu, LFS, Fedora
Posts: 30
Rep:
|
gcc doesn't seem to be working...
okay, I am trying to build an LFS-6.2 system and have run into many bumps on the road, but this one is the hardest.
also, the host is an Ubuntu Dapper (6.06), i586 AMD-K62 500 MHz, 384 MBs RAM
I am in chapter 6, in the re-ajusting the toolchain (6.10) section. I get to the part where you make sure the compiler is working, and I do this:
echo 'main(){}' > dummy.c
cc dummy.c -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
then I get an error that there is no a.out file. it seems that gcc is not generating the executable.
this was a test to make sure that the compiler was working properly. well, apparently it failed.
then, I tried the next test:
grep -o '/usr/lib.*/crt[1in].* .*' dummy.log
the book tells me that this is the correct results:
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded
I only got the first two. "/usr/lib/crtn.o" did not even show up.
thanks for any help you can provide.
EDIT: i got some more info:
i tried this:
cc dummy.c
and got this:
/tools/lib/gcc/i586-pc-linux-gnu/4.0.3/../../../../i586-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
it looks like it can't find a library file.
what do i need to do?
Last edited by lukeiamyourfather; 07-18-2007 at 05:05 PM.
|
|
|
07-19-2007, 01:28 PM
|
#2
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
You should find the named library (libgcc_s), and then make sure the compiler can also find it. You can do this either by adding an appropriate -L switch to the compiler commandline, or by moving or linking the library to a default library location that will be searched by the compiler/linker.
--- rod.
|
|
|
07-29-2007, 06:40 PM
|
#3
|
Member
Registered: Jul 2007
Distribution: Ubuntu, LFS, Fedora
Posts: 30
Original Poster
Rep:
|
okay, i think i know what you meant. i have little experience working with libraries and stuff, so what commands/actions would i use?
thanks,
chris
|
|
|
07-29-2007, 10:42 PM
|
#4
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
To find the library:
Code:
find / -name "*libgcc_s*"
To use the library:
Code:
gcc -L /directory/where/libgcc_s/was/found .....rest of gcc commandline.....
Just try to think like a compiler.
--- rod.
|
|
|
07-30-2007, 07:59 AM
|
#5
|
Member
Registered: Jul 2007
Distribution: Ubuntu, LFS, Fedora
Posts: 30
Original Poster
Rep:
|
alright, i wont get to try it right away, but thanks a million.
|
|
|
07-31-2007, 09:50 AM
|
#7
|
Member
Registered: Jul 2007
Distribution: Ubuntu, LFS, Fedora
Posts: 30
Original Poster
Rep:
|
well, i am starting again. i had to delete that partition.
anyway, when i get paid from my job, (video editing and server administration [yes, i am fourteen]) i am going to buy myself a new motherboard and processor and RAM, plus my boss is giving me a bigger hard drive.
so good bye to 4 hour compilations on my amd k6 @ 474 MHz 384 MBs RAM!!!!
thank god i have a job...
|
|
|
All times are GMT -5. The time now is 09:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|