LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   New 64-bit LFS build - cannot execute binary file (https://www.linuxquestions.org/questions/linux-from-scratch-13/new-64-bit-lfs-build-cannot-execute-binary-file-4175452011/)

f0rdracing 02-27-2013 11:26 PM

New 64-bit LFS build - cannot execute binary file
 
Host machine: Slackware 14.0 64-bit in VirtualBox

Building a new LFS system for myself, and stumbled across this problem. After having built the temporary system, I moved on to basic system software. Compiled/installed Coreutils, Iana-etc then went on to M4. When I ./configure, no output came of it, what so ever. I back tracked to Coreutils, and tried to ./configure there, nothing is coming of that now, either. I haven't logged out of the machine, nothing. Didn't leave the chroot environment, went straight from Coreutils, Iana-etc (iana-etc already has a prebuilt makefile), to M4 where the problems began.

root:/sources# ldd /bin/bash
linux-vdso.so.1 (0x00007fff0ee00000)
libncurses.so.5 => /tools/lib/libncurses.so.5 (0x00007f688c298000)
libdl.so.2 => /tools/lib/libdl.so.2 (0x00007f688c090000)
libgcc_s.so.1 => /tools/lib/libgcc_s.so.1 (0x00007f688be78000)
libc.so.6 => /tools/lib/libc.so.6 (0x00007f688bad0000)
/tools/lib64/ld-linux-x86-64.so.2 (0x00007f688c4e8000)

root:/sources# /bin/bash kill
/tools/bin/kill: /tools/bin/kill: cannot execute binary file

root:/sources# /tools/bin/bash kill
/tools/bin/kill: /tools/bin/kill: cannot execute binary file

root:/sources# echo 'main(){}' > dummy.c
root:/sources# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources# readelf -l a.out | grep ': /lib'
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

Sorry for the long post, wanted to get as much detail as I could. Thanks in advance.

Keith Hedger 02-28-2013 07:58 AM

The 'cannot execute binary file' error is a sure sign that you have mucked up the tool chain somehow if you do muck up the toolchain it is quite difficult to rectify and you should probably go back to just after saving the toolchain ( you did save it didn't you? ) and make sure you didn't skip any bits from the book.

f0rdracing 02-28-2013 08:47 AM

That's what I feared. I did save a snapshot on Virtualbox, but with my luck it corrupted. Starting from the beginning, being especially careful. Thanks.


All times are GMT -5. The time now is 03:57 PM.