Subject: Re: "exec format error" with COMPAT_LINUX32 on amd64
To: Alex <>
From: Nicolas Joly <>
List: current-users
Date: 06/28/2006 23:19:51
On Wed, Jun 28, 2006 at 12:10:16PM -0700, Alex wrote:
> I upgraded to NetBSD-current yesterday (2006-06-27) and compiled my 
> kernel with COMPAT_LINUX32 support:
> options         COMPAT_NETBSD32
> options         COMPAT_LINUX
> options         COMPAT_LINUX32  # req. COMPAT_LINUX and COMPAT_NETBSD32
> options         EXEC_ELF32
> I was able to install SuSE 10.0 compatibility from 
> /usr/pkgsrc/emulators/ by modifying the Makefiles to use i386 instead of 
> the normal x86_64. If I chroot into /emul/linux, then the executables 
> run fine. Otherwise, I receive "exec format errors".
> % /emul/linux/bin/ls
> zsh: exec format error: /emul/linux/bin/ls
> % sudo chroot /emul/linux /bin/sh
> sh-3.00# /bin/ls
> bin  dev  etc  lib  proc  root    sbin  usr  var
> Using chroot would be fine except for I need to access files outside of 
> /emul/linux. Are there any ways to solve this?

Linux 32bits files (for COMPAT_LINUX32) need to be installed in
`/emul/linux32'; `/emul/linux' subtree is for 64bits Linux compat

Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.