Subject: Re: AviFiles and DIvX On NetBSD 1.5
To: Samuel Lellouche <sam@omatis.com>
From: Alistair Crooks <agc@pkgsrc.org>
List: port-i386
Date: 02/15/2001 15:49:05
On Thu, Feb 15, 2001 at 04:13:46PM +0000, Samuel Lellouche wrote:
> 
> I'm tryong to plAy DivX films on NetBSD 1.5 (i386)...
> 
> It works fine on linux when i use Avifiles and i'm trying to use it in
> emulation on NetBSD...
> 
> I copied all the libs from the linux to my NetBSD's /emul/linux
> 
> And now i got the following message:
> 
> > aviplay
> FATAL: kernel too old
> 
> and when i ktrace it:
> kdump -f toto
>    460 ktrace   EMUL  "netbsd"
>    460 ktrace   RET   ktrace 0
>    460 ktrace   CALL  execve(0xbfbfd8d8,0xbfbfd834,0xbfbfd83c)
>    460 ktrace   NAMI  "/goinfre/avifile-0.53.5/player/.libs/aviplay"
>    460 ktrace   NAMI  "/emul/linux/lib/ld-linux.so.2"
>    460 ktrace   NAMI  "/emul/linux"
>    460 ktrace   NAMI  "/emul/linux/lib/ld-linux.so.2"
>    460 aviplay  EMUL  "linux"
>    460 aviplay  RET   oldolduname -1 errno -2 No such file or directory
>    460 aviplay  CALL  uname(0xbfbfd410)
>    460 aviplay  RET   uname 0
>    460 aviplay  CALL  write(0x2,0x48080269,0x16)
>    460 aviplay  GIO   fd 2 wrote 22 bytes
>        "FATAL: kernel too old
>        "
>    460 aviplay  RET   write 22/0x16
>    460 aviplay  CALL  exit(0x1)
> 
> Anyone got any udea how i could make this work ?

The problem, as I understand it, is that uname(2) is being called to
find out the kernel version, by the binary.  NetBSD is returning 1.5. 
The binary is expecting a Linux kernel version number, in the 2.*
range.  It therefore thinks that your kernel is too old.

In -current, the sources have been modified to return a hard-coded
Linux version number when in emulation, which more accurately reflects
the emulation of Linux syscalls.
 
You could start by having a look at that.

Regards,
Alistair