Hello hackers,

I'm trying to cross-compile an i386 FreeBSD system (kernel+world+ports) under
my amd64 host :
% uname -srm
FreeBSD 8.0-CURRENT amd64

I updated my CURRENT sources yesterday.

So far I've got a working FreeBSD (kernel+world) in a 512MB image I can dump
on a CompactFlash card :
# cd /usr/src
# make buildworld TARGET=i386
# make buildkernel TARGET=i386
# mount /dev/md0a /mnt
(md0 is a 512MB file backed image I bsdlabel'd and newfs'd before)
# make installworld TARGET=i386 DESTDIR=/mnt
# make distribution TARGET=i386 DESTDIR=/mnt
# make installkernel TARGET=i386 DESTDIR=/mnt

The problem is that I can't chroot in this 32-bit world.
Say I want to install the sysutils/screen port in /mnt :

# mkdir /mnt/usr/ports
# mount -t nullfs /usr/ports /mnt/usr/ports
# mount -t devfs devfs /mnt/dev
# chroot /mnt /bin/sh -c "cd /usr/ports/sysutils/screen && make BATCH=yes \
  install clean"
ELF interpreter /libexec/ld-elf.so.1 not found
Abort trap

Of course it's the same with the new (new since a year or so) ports DESTDIR
since it's based on chroot :
# cd /usr/ports/sysutils/screen
# make DESTDIR=/mnt install clean
===>  Creating some important subdirectories
===>  Starting chrooted make in /mnt...
ELF interpreter /libexec/ld-elf.so.1 not found
Abort trap
===>  Chrooted make in /mnt failed
===>  Cleaning up...

I can directly execute /mnt/bin/sh or any program in /mnt without problems.

As expected, file gives me :
/libexec/ld-elf.so.1:     ELF 64-bit LSB shared object, x86-64, version 1 
(FreeBSD), stripped
/mnt/libexec/ld-elf.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 
(FreeBSD), dynamically linked, stripped

Host kernel with COMPAT_IA32 and world without WITHOUT_LIB32 didn't help.
I tried temporarily replacing /mnt/libexec/ld-elf.so.1 with the 64-bit one,
but the same problem occurs.

Using ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-current/ is not an
option because I don't use default OPTIONS.
Is there a way or another to chroot in this i386 world from my amd64 host ?

Olivier

-- 
Olivier Smedts                                              _
                          ASCII ribbon campaign            ( )
e-mail: [EMAIL PROTECTED] - against HTML email & vCards      X
www: http://www.gid0.org - against proprietary attachments / \

 "Il y a seulement 10 sortes de gens dans le monde :
 ceux qui comprennent le binaire,
 et ceux qui ne le comprennent pas."
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to