WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxc: Include path fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxc: Include path fix
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Tue, 24 Oct 2006 11:17:15 +0200
Delivery-date: Tue, 24 Oct 2006 02:17:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: AMD / OSRC
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.4
Hi!

There's a include path mistake when trying to build
tools/libxc  on OpenBSD:

gcc  -O2 -fomit-frame-pointer -m32 -march=i686 -DNDEBUG -std=gnu99 -Wall 
-Wstrict-prototypes -Wno-unused-value   -D__XEN_TOOLS__ -Werror 
-fno-strict-aliasing  -I. -Wp,-MD,.xc_core.o.d -c -o xc_core.o xc_core.c
In file included from xc_private.h:18,
                 from xg_private.h:16,
                 from xc_core.c:1:
xen/privcmd.h:36:23: asm/types.h: No such file or directory

gcc tries to use /usr/include/asm/types.h, which only exists on Linux (and 
therefore works on Linux).

The attached patch tells gcc to use $(XEN_ROOT)/xen/include/asm/types.h.
I think, this was originally intended, right?

ATTENTION: The patch uncovers several header issues:

gcc  -O2 -fomit-frame-pointer -m32 -march=i686 -DNDEBUG -std=gnu99 -Wall 
-Wstrict-prototypes -Wno-unused-value   -D__XEN_TOOLS__ -Werror 
-fno-strict-aliasing  -I. -I../../xen/include -Wp,-MD,.xc_core.o.d -c -o 
xc_core.o xc_core.c
In file included from ../../xen/include/xen/config.h:10,
                 from ../../xen/include/asm/types.h:6,
                 from xen/privcmd.h:36,
                 from xc_private.h:18,
                 from xg_private.h:16,
                 from xc_core.c:1:
../../xen/include/asm/config.h:278:1: "HYPERVISOR_VIRT_START" redefined
In file included from xen/xen.h:15,
                 from xenctrl.h:19,
                 from xg_private.h:14,
                 from xc_core.c:1:
xen/arch-x86_32.h:107:1: this is the location of the previous definition
In file included from ../../xen/include/xen/config.h:37,
                 from ../../xen/include/asm/types.h:6,
                 from xen/privcmd.h:36,
                 from xc_private.h:18,
                 from xg_private.h:16,
                 from xc_core.c:1:
../../xen/include/xen/compiler.h:35:1: "offsetof" redefined
In file included from xenctrl.h:17,
                 from xg_private.h:14,
                 from xc_core.c:1:
/usr/include/stddef.h:75:1: this is the location of the previous definition
In file included from xen/privcmd.h:36,
                 from xc_private.h:18,
                 from xg_private.h:16,
                 from xc_core.c:1:
../../xen/include/asm/types.h:43: error: conflicting types for `paddr_t'
/usr/include/sys/types.h:124: error: previous declaration of `paddr_t'
../../xen/include/asm/types.h:53: warning: redefinition of `size_t'
/usr/include/sys/types.h:178: warning: `size_t' previously declared here
gmake[1]: *** [xc_core.o] Error 1
gmake[1]: Leaving directory `/usr/src/xen-unstable-openbsd.hg/tools/libxc'
gmake: *** [build] Error 2

The patch should NOT go into -unstable, until the header issues have been
fixed. I post this patch just in case there's someone else having build 
troubles with libxc.

Attachment: tools_includepath.diff
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>