[Lguest] lguest doesn't compile on 2.6.31 kernel?

octane indice octane at alinto.com
Tue Sep 29 20:02:00 EST 2009


Hello

I just switch to the 2.6.31 kernel and lguest doesn't compile anymore:
octane at slack:/usr/src/linux/Documentation/lguest$ make
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3
-I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE    lguest.c   -o
lguest
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c: In function 'create_thread':
lguest.c:1021: warning: implicit declaration of function 'eventfd'
make: *** [lguest] Error 1
octane at slack:/usr/src/linux/Documentation/lguest$

It's a slackware 13.

I changed the line in lguest.c:
include <sys/eventfd.h> by
include <linux/eventfd.h>

But it won't compile:
octane at slack:/usr/src/linux/Documentation/lguest$ make
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3
-I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE    lguest.c   -o
lguest
In file included from ../../include/linux/eventfd.h:12,
                 from lguest.c:21:
../../include/linux/file.h:22: error: expected declaration specifiers or
'...' before 'fmode_t'
../../include/linux/file.h:25: error: expected declaration specifiers or
'...' before 'fmode_t'
../../include/linux/file.h: In function 'fput_light':
../../include/linux/file.h:29: warning: implicit declaration of function
'unlikely'
In file included from lguest.c:21:
../../include/linux/eventfd.h: In function 'eventfd_ctx_fdget':
../../include/linux/eventfd.h:45: warning: implicit declaration of function
'ERR_PTR'
../../include/linux/eventfd.h:45: error: 'ENOSYS' undeclared (first use in
this function)
../../include/linux/eventfd.h:45: error: (Each undeclared identifier is
reported only once
../../include/linux/eventfd.h:45: error: for each function it appears in.)
../../include/linux/eventfd.h:45: warning: return makes pointer from integer
without a cast
../../include/linux/eventfd.h: In function 'eventfd_signal':
../../include/linux/eventfd.h:50: error: 'ENOSYS' undeclared (first use in
this function)
In file included from /usr/include/fcntl.h:34,
                 from lguest.c:22:
/usr/include/bits/fcntl.h: At top level:
/usr/include/bits/fcntl.h:145: error: redefinition of 'struct flock'
/usr/include/bits/fcntl.h:160: error: redefinition of 'struct flock64'
lguest.c: In function 'create_thread':
lguest.c:1021: warning: implicit declaration of function 'eventfd'
make: *** [lguest] Error 1
octane at slack:/usr/src/linux/Documentation/lguest$


I then put in lguest.c :
#include <config/eventfd.h>
and lguest compiles almost with no errors:
octane at slack:/usr/src/linux/Documentation/lguest$ make
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3
-I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE    lguest.c   -o
lguest
lguest.c: In function 'create_thread':
lguest.c:1021: warning: implicit declaration of function 'eventfd'
octane at slack:/usr/src/linux/Documentation/lguest$

But it doesn't work:
root at slack:~# /usr/src/linux/Documentation/lguest/lguest 48 --block
/tmp/disk.img /boot/bzImage-2.6.31 ro root=/dev/vda1
lguest: unhandled trap 13 at 0x5fd7e0 (0x0)
root at slack:~#

Any help would be appreciated.
Thanks


Le plaisir de la dermato cosmétique naturelle http://www.terrahumana.fr






More information about the Lguest mailing list