LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   problem setting up c compiler in toolchain (https://www.linuxquestions.org/questions/linux-from-scratch-13/problem-setting-up-c-compiler-in-toolchain-544046/)

slade17 04-07-2007 10:36 AM

problem setting up c compiler in toolchain
 
I just tried testing the c compiler, via the instructions in the LFS book, and it didn't work:

Code:

lfs@debian:/mnt/lfs/sources/linux-libc-headers-2.6.12.0$ cc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status

does anyone know what went wrong? if anything, my guess would be that glibc didn't compile properly, but i don't know how to find out or fix it.

Zention 04-07-2007 05:15 PM

Yeah it cannot find the c library.

Redo the glibc install and ensure you have installed in the correct location.

slade17 04-07-2007 11:12 PM

thanks. i entered the command as given in the LFS book with --prefix=/tools (which links to /mnt/lfs/tools). do you know where i should install it or what i should change when i recompile glibc?

slade17 04-08-2007 08:45 AM

now when i try to compile glibc, i get the error:

Code:

checking for long double... yes
checking size of long double... configure: error: cannot compute sizeof (long double), 77

this didnt happen before.

Zention 04-09-2007 05:59 PM

You may need to back up a few steps here.

If you are building the initial toolchain then you should be doing that with your GCC on the system (or live disk). If you have gone ahead a few steps and are in the chroot then you will be doing it with the version in there.

So, you need to review where you are, and ensure you have not broken your system toolchain (if you are using a live disk though you can just reboot).


All times are GMT -5. The time now is 12:02 AM.