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-users

Re: [Xen-devel] Re: Xen 4.0.1 failed to compile on Ubuntu Natty 32 bits

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Xen 4.0.1 failed to compile on Ubuntu Natty 32 bits
From: Martinx - ジェームズ <thiagocmartinsc@xxxxxxxxx>
Date: Thu, 16 Dec 2010 15:27:08 -0200
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Xen List <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 16 Dec 2010 09:28:28 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=YeUyYneg8hOzCUG+cbf0Ko2OKLEIRXu+pj1E+ZfNGy4=; b=LeLSYQ0YJOteZKwSVBsgKRgGZCVIxGH5Oc8z5uvl3V5uubyIwri6LIEelJZ50vTF/M XTFzPvHcY+2pryYkU/WpjcEXPzAhadNhF2whTEl0aWLuAVuzLD2LNbdWN09UT9C4ebXk Domk5MOgRYOauymUgOrAkidWVCXKIYGGOMqQ8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=VQ4iMqcniknWCCuKC3y+Z/pqZrVWFT0LzqEiBLPvRjGujUkkHCb0W9PNXrafQ/O0OV /M6uw5NTVevFFR5sm0N92e5OcHhwLRYMGQAbw/TdudLHvHJSi3xEgpxUZ4X1G6AQuElb HMimDOqdwPjWSEl+mU9tiz5w4aPDqMNvwbvyA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1292492084.32368.6927.camel@xxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTimVEuNnj2ARQmK+8Uc2djmVzs7nMGeFnubs1A9K@xxxxxxxxxxxxxx> <AANLkTimbPnkWj=y8vSARk0LPv_wLSAgE+3TCcq0iCSV7@xxxxxxxxxxxxxx> <AANLkTimjQTE71F81Db09YiHhEDYkQFZCkfvfM3Lz0_u2@xxxxxxxxxxxxxx> <1292492084.32368.6927.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Ian,

 I chenge the files but, the error persist, check it out:

root@natty02:/usr/src/xen-4.0.1# head tools/blktap/drivers/blk_linux.c
#include <inttypes.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include "tapdisk.h"
#include "blk.h"

int blk_getimagesize(int fd, uint64_t *size)
{
    int rc;

root@natty02:/usr/src/xen-4.0.1# make clean ; make tools
....
make[3]: Leaving directory `/usr/src/xen-4.0.1/tools/memshr'
make[2]: Leaving directory `/usr/src/xen-4.0.1/tools'
make[2]: Entering directory `/usr/src/xen-4.0.1/tools'
make -C blktap install
make[3]: Entering directory `/usr/src/xen-4.0.1/tools/blktap'
make[4]: Entering directory `/usr/src/xen-4.0.1/tools/blktap'
make -C lib install
make[5]: Entering directory `/usr/src/xen-4.0.1/tools/blktap/lib'
../../../tools/cross-install -d -m0755 -p /usr/src/xen-4.0.1/dist/install/usr/lib64
../../../tools/cross-install -d -m0755 -p /usr/src/xen-4.0.1/dist/install/usr/include
../../../tools/cross-install -m0644 -p libblktap.a libblktap.so.3.0.0 /usr/src/xen-4.0.1/dist/install/usr/lib64
ln -sf libblktap.so.3.0.0 /usr/src/xen-4.0.1/dist/install/usr/lib64/libblktap.so.3.0
ln -sf libblktap.so.3.0 /usr/src/xen-4.0.1/dist/install/usr/lib64/libblktap.so
../../../tools/cross-install -m0644 -p blktaplib.h /usr/src/xen-4.0.1/dist/install/usr/include
make[5]: Leaving directory `/usr/src/xen-4.0.1/tools/blktap/lib'
make[4]: Leaving directory `/usr/src/xen-4.0.1/tools/blktap'
make[4]: Entering directory `/usr/src/xen-4.0.1/tools/blktap'
make -C drivers install
make[5]: Entering directory `/usr/src/xen-4.0.1/tools/blktap/drivers'
Makefile:23: === libgcrypt not installed: falling back to libcrypto ===
gcc -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .blktapctrl.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -Wno-unused -I../lib -I../../../tools/libxc -I../../../tools/include -I../../../tools/xenstore -I../../../tools/include -I ../../libaio/src -I ../../memshr -D_GNU_SOURCE -DMEMSHR -o blktapctrl blktapctrl.o blktapctrl_linux.o    -L../../../tools/libxc -lxenctrl -L../../../tools/xenstore -lxenstore  ../../memshr/libmemshr.a -L../lib -lblktap -lrt -lm -lpthread
../../memshr/libmemshr.a(interface.o): In function `memshr_vbd_initialize':
/usr/src/xen-4.0.1/tools/memshr/interface.c:116: undefined reference to `xc_interface_open'
../../memshr/libmemshr.a(interface.o): In function `memshr_vbd_issue_ro_request':
/usr/src/xen-4.0.1/tools/memshr/interface.c:165: undefined reference to `xc_memshr_nominate_gref'
/usr/src/xen-4.0.1/tools/memshr/interface.c:179: undefined reference to `xc_memshr_share'
collect2: ld returned 1 exit status
make[5]: *** [blktapctrl] Error 1
make[5]: Leaving directory `/usr/src/xen-4.0.1/tools/blktap/drivers'
make[4]: *** [subdir-install-drivers] Error 2
make[4]: Leaving directory `/usr/src/xen-4.0.1/tools/blktap'
make[3]: *** [subdirs-install] Error 2
make[3]: Leaving directory `/usr/src/xen-4.0.1/tools/blktap'
make[2]: *** [subdir-install-blktap] Error 2
make[2]: Leaving directory `/usr/src/xen-4.0.1/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-4.0.1/tools'
make: *** [install-tools] Error 2

Thank you!
Thiago

2010/12/16 Ian Campbell <Ian.Campbell@xxxxxxxxxx>
On Wed, 2010-12-15 at 22:15 +0000, Martinx - ジェームズ wrote:
>
>         gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls
>         -m32 -march=i686 -g -fno-strict-aliasing -std=gnu99 -Wall
>         -Wstrict-prototypes -Wno-unused-value
>         -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD
>         -MF .blk_linux.o.d -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>         -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
>         -mno-tls-direct-seg-refs -Werror -Wno-unused -I../lib
>         -I../../../tools/libxc -I../../../tools/include
>         -I../../../tools/xenstore -I../../../tools/include
>         -I ../../libaio/src -I ../../memshr -D_GNU_SOURCE -DMEMSHR -c
>         -o blk_linux.o blk_linux.c
>         cc1: warnings being treated as errors
>         In file included from tapdisk.h:62:0,
>                          from blk_linux.c:4:
>         ../lib/blktaplib.h:199:0: error: "WRITE" redefined
>         /usr/include/linux/fs.h:160:0: note: this is the location of
>         the previous definition

The headers on natty appear to include a definition of WRITE which
conflicts with the use of that name in blktap.

This should avoid the issue.

Ian.

8<---------------------------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1292492034 0
# Node ID 0236d8adb081b93e509ec52654201ce88ad6570b
# Parent  d70d7c3311c495305ac1bde256122b09c58463e5
blktap[12]: include <sys/mount.h> instead of <linux/fs.h>

The former is a userspace sanitised header which contains the
definitions we need. In some distros linux/fs.h defines WRITE which
conflicts with blktaps own use of that name.

Also there is no reason to use <linux/errno.h> over the more normal
<errno.h>.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r d70d7c3311c4 -r 0236d8adb081 tools/blktap/drivers/blk_linux.c
--- a/tools/blktap/drivers/blk_linux.c  Tue Dec 14 17:10:49 2010 +0000
+++ b/tools/blktap/drivers/blk_linux.c  Thu Dec 16 09:33:54 2010 +0000
@@ -1,6 +1,6 @@
 #include <inttypes.h>
 #include <sys/ioctl.h>
-#include <linux/fs.h>
+#include <sys/mount.h>
 #include "tapdisk.h"
 #include "blk.h"

diff -r d70d7c3311c4 -r 0236d8adb081 tools/blktap2/drivers/blk_linux.c
--- a/tools/blktap2/drivers/blk_linux.c Tue Dec 14 17:10:49 2010 +0000
+++ b/tools/blktap2/drivers/blk_linux.c Thu Dec 16 09:33:54 2010 +0000
@@ -1,7 +1,7 @@
 #include <inttypes.h>
+#include <errno.h>
 #include <sys/ioctl.h>
-#include <linux/fs.h>
-#include <linux/errno.h>
+#include <sys/mount.h>
 #include "tapdisk.h"
 #include "blk.h"




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel