Subject: Re: progress on COMPAT_LINUX: java and hello world
To: Emmanuel Dreyfus <>
From: Nicolas Joly <>
List: port-amd64
Date: 11/07/2005 15:14:08
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sat, Nov 05, 2005 at 08:24:54AM +0000, Emmanuel Dreyfus wrote:
> Hi
> I made some progress on COMPAT_LINUX: java and javac from Linux are able
> to build a hello world and run it. The JVM hang after operation, though.
> It's probably because of bugs in Linux futex(2) emulation.
> Feel free to help debugging that.

I just noticed that Linux uname(2) result is not correct on amd64,
even with your latest changes. It seems that LINUX_UNAME_ARCH macro is
never defined while processing `common/linux_misc.c' because of
missing include `common/linux_machdep.h'.

With the attched patch, the result looks good:

njoly@lanfeust [~]> uname -a
NetBSD 3.99.11 NetBSD 3.99.11 (LANFEUST) #0: Mon Nov  7 14:43:50 CET 2005 amd64
njoly@lanfeust [~]> file /usr/pkg/emul/linux/bin/uname
/usr/pkg/emul/linux/bin/uname: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, not stripped
njoly@lanfeust [~]> /usr/pkg/emul/linux/bin/uname -m

Hope this helps,

Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="linuxmisc.diff"

Index: sys/compat/linux/common/linux_misc.c
RCS file: /cvsroot/src/sys/compat/linux/common/linux_misc.c,v
retrieving revision 1.142
diff -u -r1.142 linux_misc.c
--- sys/compat/linux/common/linux_misc.c	4 Nov 2005 16:58:14 -0000	1.142
+++ sys/compat/linux/common/linux_misc.c	7 Nov 2005 11:32:44 -0000
@@ -102,6 +102,7 @@
 #include <sys/sa.h>
 #include <sys/syscallargs.h>
+#include <compat/linux/common/linux_machdep.h>
 #include <compat/linux/common/linux_types.h>
 #include <compat/linux/common/linux_signal.h>