On 6/19/2012 12:09 PM, Emerson Yesupatham wrote:
Hi,
I am trying to build LFS. I am following LFS-BOOK-7.0.pdf.
Problem:
I am facing the following error while compiling Binutils-2.21.1a - Pass 2, section 5.9. " *configure: error: cannot run C compiled programs.*" Complete error is attached in config.log file.
The command executed was:
CC="$LFS_TGT-gcc -B/tools/lib/" \
AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
../binutils-2.21.1/configure --prefix=/tools \
--disable-nls --with-lib-path=/tools/lib
Other information:
In my host system, the following important check under "Caution" mentioned in section 5.8 Adjusting tool chain, is working fine as shown below:
**
lfs:/mnt/lfs/sources$ echo 'main(){}' > dummy.c
lfs:/mnt/lfs/sources$ $LFS_TGT-gcc -B/tools/lib dummy.c
lfs:/mnt/lfs/sources$ readelf -l a.out | grep ': /tools'
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
*My host system violates one of the prerequisites mentioned in page XVi*
*Linux Kernel-2.6.25 *
(having been compiled with GCC-4.1.2 or greater)
The reason for the kernel version requirement is that we specify that version when building glibc in Chapter 6 at
the recommendation of the developers. It is also required by udev.
If the host kernel is either earlier than 2.6.25, or it was not compiled using a GCC-4.1.2 (or later) compiler, you
will need to replace the kernel with one adhering to the specifications.
Question: I tried to locate solution for this error in the lfs-support archive but could not find the identical one. Could any one help me out on this? I am blocked due to this error completely. I belive the above prerequisite violation should not create problem at this point i.e. binutils pass2.
Thanks,
Emerson


First, use an HTML copy so you can copy+paste easier. Second, run all the possible upgrades your distro offers. If your kernel is out-of-date, then you must not be updating anything. Or, if it's something similar to Slackware or Arch Linux, get the fresh packages and recompile them. Then try building from the beginning. You might have better luck then.

Elly

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to