[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiarch on kFreeBSD?



Hi,

On 02 September, 2013 09:03AM, Dmitrijs Ledkovs wrote:
> Given the excellent multiarch implementation on Debian and sophisticated Linux Emulation Layer on FreeBSD kernel, I was half expecting the following to work:
>     on kFreeBSD enable linux i386/amd64 repository
>     apt-get install hello:i386
>     $ hello
> 
> But unfortunately this confused kFreeBSD, since it didn't find ELF tags and linker didn't seem to load the right libraries any more =( Not sure if this issue has been raised before, but I think it would be awesome if FreeBSD Linux Emulation Layer worked transparently on Debian/kFreeBSD multiarch system.

Probably you are the first to try this.  I had slight success just now
with mksh-static built for linux-i386:

# brandelf util from package freebsd-buildutils
bash-4.2$ freebsd-brandelf -t Linux mksh-static

bash-4.2$ ./mksh-static
$ echo hello
hello
$ exit

Although, the shell seems buggy as it will hang after launching any
executables (anything other than built-in functions).

To run a dynamically-linked mksh, ld needs to be found at
/compat/linux/lib/ld-linux.so.2.  Maybe it is possible to create a full
set of (sym)links inside /compat/linux/ to suit the paths used by multiarch?

But the ld which ships with squeeze and wheezy fails with "FATAL: kernel
too old" (we are emulating 2.6.16 syscalls).  Probably a special one is
needed, perhaps from the FreeBSD linux_base port?

If someone can get this working, it should be quite impressive how many
things work, and with near-native performance (or better!) :
http://phoronix.com/scan.php?page=article&item=linux_games_bsd&num=2

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: