LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-24-2004, 09:45 PM   #1
webwolf70
Member
 
Registered: Feb 2004
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502

Rep: Reputation: 30
GCC compiling problem


I get to this point and I am stuck.

I am compiling gcc-3.3.3 in the directory /lfs/gcc-build/gcc-3.3.3. This works fine:

in the /lfs/gcc-build-gcc-3.3.3 directory......
./configure --prefix=/tools \
--with-local-prefix=/tools \
--disable-nls --enable-shared \
--enable-languages=c

It seems to be fine, here are the last several lines:

Links are now set up to build a native compiler for i686-pc-linux-gnu
updating cache ../config.cache
creating ./config.status
creating Makefile
creating intl/Makefile
creating fixinc/Makefile
creating gccbug
creating mklibgcc
creating mkheaders
creating auto-host.h

This is where I have my problems.

bash-2.05b$ make BOOT_LDFLAGS="-static" bootstrap


The last few lines are:

/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [gengenrtl] Error 1
make[2]: Leaving directory `/lfs/gcc-build/gcc-3.3.3/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/lfs/gcc-build/gcc-3.3.3/gcc'
make: *** [bootstrap] Error 2


I am stuck.

Also the instructions tell me to do this"../gcc-3.3.3/configure --prefix=/tools \"
What I do instead is cd into the directory and ./configure. Is this wrong?

Thanks

Webwolf LFS
 
Old 09-25-2004, 02:43 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
Quote:
Also the instructions tell me to do this"../gcc-3.3.3/configure --prefix=/tools \"
What I do instead is cd into the directory and ./configure. Is this wrong?
When you're doing something as complex as this, I would suggest following the instructions Some packages will build fine in their own directory, but one or two won't, and if the book says to run configure from a 'build' directory, I would pay attention (it's a good practice anyway - there's no chance of corrupting your original source directory this way). I would delete the directory you created and re-unpack the original tarball before trying again.
 
Old 09-25-2004, 11:20 AM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Read the FAQ ld: cannot find -lc
 
Old 09-25-2004, 08:51 PM   #4
webwolf70
Member
 
Registered: Feb 2004
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502

Original Poster
Rep: Reputation: 30
Thank you both. I had to delete the partition. Well, actually I didn't have to but I ran into a problem I was not familiar with, long story. But I have two partitions that I will be using for LFS. / and /home, when it is set up anyways.

What I did first is downlaod all the paackages and patches. before and after I was going through posts, etc, to see what problems I may run into. I missed the FAQ's Before I start again I am going to read the FAQ's. I laughed when I saw that it specifically said that if you are using MANDRAKE 9 or higher........., lol. I thought I had all things installed with Mandrake. But guess I missed a couple.


Webwolf
 
  


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
problem with gcc compiling courier-authlib? Please help! strimp099 Linux - Software 3 07-20-2005 07:03 PM
Problem compiling code in g++ works for gcc juan_de_margo Programming 3 02-24-2005 03:41 AM
gcc compiling problem chiahsin Linux - Software 2 12-02-2004 06:33 PM
GCC compiling problem C, SuSE 9.1 Bill Chandler Linux - Software 3 11-24-2004 01:30 AM
Problem compiling gcc gkiagia Programming 4 05-31-2004 03:18 AM

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

All times are GMT -5. The time now is 01:48 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