LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GCC compiling problem (https://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-compiling-problem-234954/)

webwolf70 09-24-2004 09:45 PM

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 :newbie:

CroMagnon 09-25-2004 02:43 AM

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.

Andrew Benton 09-25-2004 11:20 AM

Read the FAQ ld: cannot find -lc

webwolf70 09-25-2004 08:51 PM

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 :tisk: :rolleyes: 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


All times are GMT -5. The time now is 10:53 AM.