Skip to contentSkip to conversation

xentrace build fails

DISCUSSION Christian Limpach 2 participants 2 messages Mar 10, 2004

lore
Share & tools
lore
#0 lore raw

Hello!

building tools (from xen-unstable 040309) fails in xentrance with:
gcc -Wall -O3 -I../../xen/include -I../../xenolinux-sparse/include -o xentrace xentrace.c -L../xc/lib -lxc
In file included from /usr/include/bits/sigcontext.h:28,

                 from /usr/include/signal.h:326,
                 from xentrace.c:22:

/usr/include/asm/sigcontext.h:79: error: syntax error before '*' token /usr/include/asm/sigcontext.h:82: error: syntax error before '}' token

The offending line is:

        struct _fpstate __user * fpstate;

__user is defined in /usr/include/linux/compiler.h but the compile uses Xen's linux/compiler.h (in ../../xen/include) which doesn't define __user.

Adding
#define __user
to xen/include/linux/compiler.h works for this case but the mixing of header files can lead to quite unexpected behaviour :-(
Not sure what the correct fix is, maybe add all header files to the xen include files tree so that we get a consistent set of header files for applications interfacing with Xen? (this would also be a step towards compiling Xen and its tools on !Linux which might be desirable maybe)

This is on Debian with kernel header files from the linux-kernel-headers-2.5.999-test7-bk-15 package.

christian

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#1 lore raw
Quoted 4 lines

Not sure what the correct fix is, maybe add all header files to the xen include files tree so that we get a consistent set of header files for applications interfacing with Xen? (this would also be a step towards compiling Xen and its tools on !Linux which might be desirable maybe)

Okay I've fixed this by ginally getting rid of the need for an 'include/linux' symlink in the Xen tree. Also, none of the tools now have -Ixen/include in their CFLAGS; they oonly have -Ixen/include/hypervisor-ifs.

-- Keir

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click