On Monday, July 02, 2012 04:07:49 Ken Moffat wrote: > On Mon, Jul 02, 2012 at 09:11:47AM +0800, Archie Arevalo wrote: > > On Monday, July 02, 2012 01:50:44 Ken Moffat wrote: snip > > > > What do 'file' and 'ldd' say about the 'as' program there ? > > > > Sorry, I don't know how to answer that. > > file /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as > ldd /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as
[email protected] ~ > sudo mount -v -t ext3 /dev/sdc1 /mnt/lfs /dev/sdc1 on /mnt/lfs type ext3 (rw) [email protected] ~ > su - lfs Password: lfs:~$ echo $LFS /mnt/lfs lfs:~$ echo $PATH /tools/bin:/bin:/usr/bin lfs:~$ file /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped lfs:~$ ldd /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as linux-gate.so.1 => (0xb77f0000) libz.so.1 => /lib/libz.so.1 (0xb779b000) libc.so.6 => /lib/i686/libc.so.6 (0xb7633000) /lib/ld-linux.so.2 (0xb77d6000) > > I expect it to be a 32-bit (i686) elf file, but since *something* > is wrong it is as well to check. You've barely started, so it > should be linking to your host's libraries without difficulty. > > > > Sorry, I'm scratching around for ideas and getting nowhere. > > > > You're the one helping me out. Thank you so much and sorry for giving you > > a > > headache. ;) > > > > > Can you run 'i686-lfs-linux-gnu-ld -V' ? It ought to say it's GNU > > > > > > ld and report a few lines of emulations. ( It's the same file as > > > i686-lfs-linux-gnu-bin/ld i.e. they are hardlinks, but the plain > > > 'ld' version is not on your PATH ) > > > > lfs:/mnt/lfs$ i686-lfs-linux-gnu-ld -V > > bash: i686-lfs-linux-gnu-ld: command not found > > Ah. > > Please try > ls -i /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld > and > ls -i /mnt/lfs/tools/bin/i686-lfs-linux-gnu-ld lfs:~$ ls -i /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld 311040 /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld lfs:~$ ls -i /mnt/lfs/tools/bin/i686-lfs-linux-gnu-ld 311040 /mnt/lfs/tools/bin/i686-lfs-linux-gnu-ld It's identical. > > They should have the same inode number, because they are hardlinks. > We know that the second version is on your PATH, but it doesn't > work. If you were in chroot I would suggest it was linked to host > libs. I've never seen this problem (in chapter 5) before. Maybe > the output from ldd will explain. > > > lfs:/mnt/lfs$ ld -V > > GNU ld (Linux/GNU Binutils) 2.21.52.0.2.20110610 > > > > Supported emulations: > > elf_i386 > > i386linux > > elf_x86_64 > > elf32_x86_64 > > elf_l1om > Thanks for clarifying this. I absentmindedly forgot that unless specifically using $LFS/tools/bin/ or on the bin/ folder itself, executable on my OS host would be used. Thanks for the schooling. :) > That is ld on your host. I'm surprised it can handle x86_64. > Fedora ? Out of interest, are you running a 64-bit kernel with > 32-bit userspace (and a 32-bit kernel personality), or is it all > 32-bit ? lfs:~$ uname -srvmpio Linux 3.2.18-pclos1.bfs #1 SMP PREEMPT Tue May 22 04:05:24 CEST 2012 i686 i686 i386 GNU/Linux lfs:~$ cat /etc/pclinuxos-release PCLinuxOS release 2012 (PCLinuxOS) for i586 PCLinuxOS. I have a 64-bit install on another partition. Repositories for the 2 architectures are separate (of course) ... this is the first time I've heard of "a 64-bit kernel with 32-bit userspace (and a 32-bit kernel personality)" so I am unfamiliar with it but I would guess it is all 32-bit. But I might be wrong. > > ĸen ^ this is cool. K-k-|< Peace and much respect, Archie -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
