All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs-backend: fix compile problems
@ 2009-03-18 12:03 Stefano Stabellini
  2009-03-18 14:03 ` Boris Derzhavets
  0 siblings, 1 reply; 14+ messages in thread
From: Stefano Stabellini @ 2009-03-18 12:03 UTC (permalink / raw)
  To: xen-devel

Hi all,
this patch removes some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff -r 9fc957e63f8d tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-backend.c	Wed Mar 18 12:00:10 2009 +0000
@@ -9,6 +9,7 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <xen/io/ring.h>
+#include <xc_private.h>
 #include <err.h>
 #include "sys-queue.h"
 #include "fs-backend.h"
@@ -181,7 +182,6 @@
 {
     struct fs_mount *mount;
     struct fs_export *export;
-    int evt_port;
     struct fsif_sring *sring;
     uint32_t dom_ids[MAX_RING_SIZE];
     int i;
@@ -335,12 +335,8 @@
         }
         if (FD_ISSET(pipefds[0], &fds)) {
             struct fs_request *request;
-            int ret;
-            ret = read(pipefds[0], &request, sizeof(struct fs_request *));
-            if (ret != sizeof(struct fs_request *)) {
-                fprintf(stderr, "read request failed\n");
-                continue;
-            }
+            if (read_exact(pipefds[0], &request, sizeof(struct fs_request *)) < 0)
+                err(1, "read request failed\n");
             handle_aio_event(request); 
         }
         LIST_FOREACH(pointer, &mount_requests_head, entries) {
@@ -379,7 +375,8 @@
 {
     struct fs_request *request = (struct fs_request*) info->si_value.sival_ptr;
     int saved_errno = errno;
-    write(pipefds[1], &request, sizeof(struct fs_request *));
+    if (write_exact(pipefds[1], &request, sizeof(struct fs_request *)) < 0)
+        err(1, "write request filed\n");
     errno = saved_errno;
 }
 
diff -r 9fc957e63f8d tools/fs-back/fs-ops.c
--- a/tools/fs-back/fs-ops.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-ops.c	Wed Mar 18 12:00:10 2009 +0000
@@ -49,7 +49,6 @@
 {
     char *file_name, full_path[BUFFER_SIZE];
     int fd;
-    struct timeval tv1, tv2;
     RING_IDX rsp_idx;
     fsif_response_t *rsp;
     uint16_t req_id;
@@ -127,7 +126,7 @@
 static void dispatch_file_read(struct fs_mount *mount, struct fsif_request *req)
 {
     void *buf;
-    int fd, i, count;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -169,7 +168,6 @@
     priv_req->aiocb.aio_sigevent.sigev_value.sival_ptr = priv_req;
     assert(aio_read(&priv_req->aiocb) >= 0);
 
-out: 
     /* We can advance the request consumer index, from here on, the request
      * should not be used (it may be overrinden by a response) */
     mount->ring.req_cons++;
@@ -198,7 +196,7 @@
 static void dispatch_file_write(struct fs_mount *mount, struct fsif_request *req)
 {
     void *buf;
-    int fd, count, i;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -268,7 +266,6 @@
 
 static void dispatch_stat(struct fs_mount *mount, struct fsif_request *req)
 {
-    struct fsif_stat_response *buf;
     struct stat stat;
     int fd, ret;
     uint16_t req_id;

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 12:03 [PATCH] fs-backend: fix compile problems Stefano Stabellini
@ 2009-03-18 14:03 ` Boris Derzhavets
  2009-03-18 14:12   ` Stefano Stabellini
  2009-03-18 14:18   ` Boris Derzhavets
  0 siblings, 2 replies; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 14:03 UTC (permalink / raw)
  To: xen-devel, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 10464 bytes --]

Patch applied and brings to the next expected error :-

make[3]: Entering directory `/usr/src/xen-unstable.hg/tools/fs-back'
gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .fs-ops.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -Wno-unused -fno-strict-aliasing -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -I.. -I../lib -I. -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -c -o fs-ops.o fs-ops.c
gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .fs-backend.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -Wno-unused -fno-strict-aliasing -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -I.. -I../lib -I. -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -o fs-backend fs-xenbus.o fs-ops.o -L. -L.. -L../lib -L../../tools/libxc -lxenctrl -L../../tools/xenstore -lxenstore -lrt  fs-backend.c
../../tools/cross-install -m0755 -p fs-backend  /usr/src/xen-unstable.hg/dist/install/usr/sbin
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/fs-back'
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[2]: Entering directory `/usr/src/xen-unstable.hg/tools'
set -ex; \
    if test -d http://xenbits.xensource.com/git-http/qemu-xen-unstable.git; then \
        rm -f ioemu-dir; \
        ln -sf http://xenbits.xensource.com/git-http/qemu-xen-unstable.git ioemu-dir; \
    else \
        if [ ! -d ioemu-remote ]; then \
            rm -rf ioemu-remote ioemu-remote.tmp; \
            mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
            git clone http://xenbits.xensource.com/git-http/qemu-xen-unstable.git ioemu-remote.tmp; \
            if [ "" ]; then            \
                cd ioemu-remote.tmp;            \
                git branch -D dummy >/dev/null 2>&1 ||:; \
                git checkout -b dummy ;    \
                cd ..;                    \
            fi;                        \
            mv ioemu-remote.tmp ioemu-remote; \
        fi; \
        rm -f ioemu-dir; \
        ln -sf ioemu-remote ioemu-dir; \
    fi
+ test -d http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
+ [ ! -d ioemu-remote ]
+ rm -f ioemu-dir
+ ln -sf ioemu-remote ioemu-dir
set -e; \
            case "../" in /*) XEN_ROOT=../ ;; *)  xen_root_lhs=`pwd`; xen_root_rhs=..//; while [ "x${xen_root_rhs#../}" != "x$xen_root_rhs" ]; do xen_root_rhs="${xen_root_rhs#../}"; xen_root_rhs="${xen_root_rhs#/}"; xen_root_rhs="${xen_root_rhs#/}"; xen_root_lhs="${xen_root_lhs%/*}"; done; XEN_ROOT="$xen_root_lhs/$xen_root_rhs" ;; esac; export XEN_ROOT; \
        cd ioemu-dir; \
        ./xen-setup 
Install prefix    /usr
BIOS directory    /usr/share/qemu
binary directory  /usr/bin
Manual directory  /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /usr/src/xen-unstable.hg/tools/ioemu-dir
C compiler        gcc
Host C compiler   gcc
ARCH_CFLAGS       -m64
make              make
install           install
host CPU          x86_64
host big endian   no
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user 
gprof enabled     no
sparse enabled    no
profiler          no
static build      no
-Werror enabled   no
SDL support       no
OpenGL support    
curses support    no
mingw32 support   no
Audio drivers     oss
Extra audio cards ac97 es1370 sb16
Mixer emulation   no
VNC TLS support   no
kqemu support     yes
brlapi support    no
Documentation     yes
NPTL support      yes
vde support       no
AIO support       yes
Install blobs     yes
KVM support       no - (#error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS)
fdt support       no
The error log from compiling the libSDL test is: 
/tmp/qemu-conf--9169-.c:1:17: error: SDL.h: No such file or directory
/tmp/qemu-conf--9169-.c: In function ‘main’:
/tmp/qemu-conf--9169-.c:3: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
/tmp/qemu-conf--9169-.c:3: error: (Each undeclared identifier is reported only once
/tmp/qemu-conf--9169-.c:3: error: for each function it appears in.)
qemu successfuly configured for Xen qemu-dm build
make -C ioemu-dir install
make[3]: Entering directory `/usr/src/xen-unstable.hg/tools/ioemu-remote'
xen-hooks.mak:56: === pciutils-dev package not found - missing /usr/include/pci
xen-hooks.mak:57: === PCI passthrough capability has been disabled
make[4]: Entering directory `/usr/src/xen-unstable.hg/tools/ioemu-remote/i386-dm'
../xen-hooks.mak:56: === pciutils-dev package not found - missing /usr/include/pci
../xen-hooks.mak:57: === PCI passthrough capability has been disabled
../xen-hooks.mak:56: === pciutils-dev package not found - missing /usr/include/pci
../xen-hooks.mak:57: === PCI passthrough capability has been disabled
  LINK  i386-dm/qemu-dm
vl.o: In function `main':
/usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference to `pci_emulation_add'
collect2: ld returned 1 exit status
make[4]: *** [qemu-dm] Error 1
make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/ioemu-remote/i386-dm'
make[3]: *** [subdir-i386-dm] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/ioemu-remote'
make[2]: *** [subdir-install-ioemu-dir] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2
root@ServerXen331:/usr/src/xen-unstable.hg# 

Boris

--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 8:03 AM

Hi all,
this patch removes some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff -r 9fc957e63f8d tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-backend.c	Wed Mar 18 12:00:10 2009 +0000
@@ -9,6 +9,7 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <xen/io/ring.h>
+#include <xc_private.h>
 #include <err.h>
 #include "sys-queue.h"
 #include "fs-backend.h"
@@ -181,7 +182,6 @@
 {
     struct fs_mount *mount;
     struct fs_export *export;
-    int evt_port;
     struct fsif_sring *sring;
     uint32_t dom_ids[MAX_RING_SIZE];
     int i;
@@ -335,12 +335,8 @@
         }
         if (FD_ISSET(pipefds[0], &fds)) {
             struct fs_request *request;
-            int ret;
-            ret = read(pipefds[0], &request, sizeof(struct fs_request *));
-            if (ret != sizeof(struct fs_request *)) {
-                fprintf(stderr, "read request failed\n");
-                continue;
-            }
+            if (read_exact(pipefds[0], &request, sizeof(struct fs_request
*)) < 0)
+                err(1, "read request failed\n");
             handle_aio_event(request); 
         }
         LIST_FOREACH(pointer, &mount_requests_head, entries) {
@@ -379,7 +375,8 @@
 {
     struct fs_request *request = (struct fs_request*)
info->si_value.sival_ptr;
     int saved_errno = errno;
-    write(pipefds[1], &request, sizeof(struct fs_request *));
+    if (write_exact(pipefds[1], &request, sizeof(struct fs_request *))
< 0)
+        err(1, "write request filed\n");
     errno = saved_errno;
 }
 
diff -r 9fc957e63f8d tools/fs-back/fs-ops.c
--- a/tools/fs-back/fs-ops.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-ops.c	Wed Mar 18 12:00:10 2009 +0000
@@ -49,7 +49,6 @@
 {
     char *file_name, full_path[BUFFER_SIZE];
     int fd;
-    struct timeval tv1, tv2;
     RING_IDX rsp_idx;
     fsif_response_t *rsp;
     uint16_t req_id;
@@ -127,7 +126,7 @@
 static void dispatch_file_read(struct fs_mount *mount, struct fsif_request
*req)
 {
     void *buf;
-    int fd, i, count;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -169,7 +168,6 @@
     priv_req->aiocb.aio_sigevent.sigev_value.sival_ptr = priv_req;
     assert(aio_read(&priv_req->aiocb) >= 0);
 
-out: 
     /* We can advance the request consumer index, from here on, the request
      * should not be used (it may be overrinden by a response) */
     mount->ring.req_cons++;
@@ -198,7 +196,7 @@
 static void dispatch_file_write(struct fs_mount *mount, struct fsif_request
*req)
 {
     void *buf;
-    int fd, count, i;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -268,7 +266,6 @@
 
 static void dispatch_stat(struct fs_mount *mount, struct fsif_request *req)
 {
-    struct fsif_stat_response *buf;
     struct stat stat;
     int fd, ret;
     uint16_t req_id;



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



      

[-- Attachment #1.2: Type: text/html, Size: 12872 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:03 ` Boris Derzhavets
@ 2009-03-18 14:12   ` Stefano Stabellini
  2009-03-18 14:18   ` Boris Derzhavets
  1 sibling, 0 replies; 14+ messages in thread
From: Stefano Stabellini @ 2009-03-18 14:12 UTC (permalink / raw)
  To: bderzhavets@yahoo.com; +Cc: xen-devel

Boris Derzhavets wrote:

> Patch applied and brings to the next expected error :-


thanks for testing

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:03 ` Boris Derzhavets
  2009-03-18 14:12   ` Stefano Stabellini
@ 2009-03-18 14:18   ` Boris Derzhavets
  2009-03-18 14:19     ` Stefano Stabellini
  1 sibling, 1 reply; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 14:18 UTC (permalink / raw)
  To: xen-devel, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 11482 bytes --]

Removed unresolved reference in /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference to `pci_emulation_add'

/*    for (i = 0; i < nb_pci_emulation; i++) {
        if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
            fprintf(stderr, "Warning: could not add PCI device %s\n",
                    pci_emulation_config_text[i]);
        }
    }
*/

"make tools" completed OK.
Is it acceptable ?

Boris.

--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "xen-devel" <xen-devel@lists.xensource.com>, "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
Date: Wednesday, March 18, 2009, 10:03 AM

Patch applied and brings to the next expected error :-

make[3]: Entering directory `/usr/src/xen-unstable.hg/tools/fs-back'
gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .fs-ops.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -Wno-unused -fno-strict-aliasing -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -I.. -I../lib -I. -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -c -o fs-ops.o fs-ops.c
gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .fs-backend.d  -D_LARGEFILE_SOURCE
 -D_LARGEFILE64_SOURCE  -Werror -Wno-unused -fno-strict-aliasing -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -I.. -I../lib -I. -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -o fs-backend fs-xenbus.o fs-ops.o -L. -L.. -L../lib -L../../tools/libxc -lxenctrl -L../../tools/xenstore -lxenstore -lrt  fs-backend.c
../../tools/cross-install -m0755 -p fs-backend  /usr/src/xen-unstable.hg/dist/install/usr/sbin
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/fs-back'
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[2]: Entering directory `/usr/src/xen-unstable.hg/tools'
set -ex; \
    if test -d http://xenbits.xensource.com/git-http/qemu-xen-unstable.git; then \
        rm -f ioemu-dir; \
        ln -sf http://xenbits.xensource.com/git-http/qemu-xen-unstable.git ioemu-dir; \
   
 else \
        if [ ! -d ioemu-remote ]; then \
            rm -rf ioemu-remote ioemu-remote.tmp; \
            mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
            git clone http://xenbits.xensource.com/git-http/qemu-xen-unstable.git ioemu-remote.tmp; \
            if [ "" ]; then            \
                cd ioemu-remote.tmp;            \
                git branch -D dummy >/dev/null 2>&1 ||:; \
                git checkout -b dummy
 ;    \
                cd ..;                    \
            fi;                        \
            mv ioemu-remote.tmp ioemu-remote; \
        fi; \
        rm -f ioemu-dir; \
        ln -sf ioemu-remote ioemu-dir; \
    fi
+ test -d http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
+ [ ! -d ioemu-remote ]
+ rm -f ioemu-dir
+ ln -sf ioemu-remote ioemu-dir
set -e; \
            case "../" in /*) XEN_ROOT=../ ;; *) 
 xen_root_lhs=`pwd`; xen_root_rhs=..//; while [ "x${xen_root_rhs#../}" != "x$xen_root_rhs" ]; do xen_root_rhs="${xen_root_rhs#../}"; xen_root_rhs="${xen_root_rhs#/}"; xen_root_rhs="${xen_root_rhs#/}"; xen_root_lhs="${xen_root_lhs%/*}"; done; XEN_ROOT="$xen_root_lhs/$xen_root_rhs" ;; esac; export XEN_ROOT; \
        cd ioemu-dir; \
        ./xen-setup 
Install prefix    /usr
BIOS directory    /usr/share/qemu
binary directory  /usr/bin
Manual directory  /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /usr/src/xen-unstable.hg/tools/ioemu-dir
C compiler        gcc
Host C compiler   gcc
ARCH_CFLAGS       -m64
make             
 make
install           install
host CPU          x86_64
host big endian   no
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user 
gprof enabled     no
sparse enabled    no
profiler          no
static build      no
-Werror
 enabled   no
SDL support       no
OpenGL support    
curses support    no
mingw32 support   no
Audio drivers     oss
Extra audio cards ac97 es1370 sb16
Mixer emulation   no
VNC TLS support   no
kqemu support     yes
brlapi support    no
Documentation     yes
NPTL support      yes
vde support       no
AIO support       yes
Install blobs     yes
KVM support       no - (#error Missing KVM capability KVM_CAP_DESTROY_MEMORY_REGION_WORKS)
fdt support       no
The error log from compiling the libSDL test is: 
/tmp/qemu-conf--9169-.c:1:17: error: SDL.h: No such file or
 directory
/tmp/qemu-conf--9169-.c: In function ‘main’:
/tmp/qemu-conf--9169-.c:3: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
/tmp/qemu-conf--9169-.c:3: error: (Each undeclared identifier is reported only once
/tmp/qemu-conf--9169-.c:3: error: for each function it appears in.)
qemu successfuly configured for Xen qemu-dm build
make -C ioemu-dir install
make[3]: Entering directory `/usr/src/xen-unstable.hg/tools/ioemu-remote'
xen-hooks.mak:56: === pciutils-dev package not found - missing /usr/include/pci
xen-hooks.mak:57: === PCI passthrough capability has been disabled
make[4]: Entering directory `/usr/src/xen-unstable.hg/tools/ioemu-remote/i386-dm'
../xen-hooks.mak:56: === pciutils-dev package not found - missing /usr/include/pci
../xen-hooks.mak:57: === PCI passthrough capability has been disabled
../xen-hooks.mak:56: === pciutils-dev package not found - missing
 /usr/include/pci
../xen-hooks.mak:57: === PCI passthrough capability has been disabled
  LINK  i386-dm/qemu-dm
vl.o: In function `main':
/usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference to `pci_emulation_add'
collect2: ld returned 1 exit status
make[4]: *** [qemu-dm] Error 1
make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/ioemu-remote/i386-dm'
make[3]: *** [subdir-i386-dm] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/ioemu-remote'
make[2]: *** [subdir-install-ioemu-dir] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2
root@ServerXen331:/usr/src/xen-unstable.hg# 

Boris

--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com>
 wrote:
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 8:03 AM

Hi all,
this patch removes some unused variables and replaces read and write
to the pipe with read_exact and write_exact (these two functions are
implemented in libxc, that we have to link anyway).

This allows fs-backed to be compiled with -D_FORTIFY_SOURCE=2, hence
should fix the problems reported by Boris.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---

diff -r 9fc957e63f8d tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-backend.c	Wed Mar 18 12:00:10 2009
 +0000
@@ -9,6 +9,7 @@
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <xen/io/ring.h>
+#include <xc_private.h>
 #include <err.h>
 #include "sys-queue.h"
 #include "fs-backend.h"
@@ -181,7 +182,6 @@
 {
     struct fs_mount *mount;
     struct fs_export *export;
-    int evt_port;
     struct fsif_sring *sring;
     uint32_t dom_ids[MAX_RING_SIZE];
     int i;
@@ -335,12 +335,8 @@
         }
         if (FD_ISSET(pipefds[0], &fds)) {
             struct fs_request *request;
-            int ret;
-            ret = read(pipefds[0], &request, sizeof(struct fs_request *));
-            if (ret != sizeof(struct fs_request *)) {
-                fprintf(stderr, "read request failed\n");
-                continue;
-            }
+            if (read_exact(pipefds[0], &request, sizeof(struct fs_request
*)) < 0)
+       
         err(1, "read request failed\n");
             handle_aio_event(request); 
         }
         LIST_FOREACH(pointer, &mount_requests_head, entries) {
@@ -379,7 +375,8 @@
 {
     struct fs_request *request = (struct fs_request*)
info->si_value.sival_ptr;
     int saved_errno = errno;
-    write(pipefds[1], &request, sizeof(struct fs_request *));
+    if (write_exact(pipefds[1], &request, sizeof(struct fs_request *))
< 0)
+        err(1, "write request filed\n");
     errno = saved_errno;
 }
 
diff -r 9fc957e63f8d tools/fs-back/fs-ops.c
--- a/tools/fs-back/fs-ops.c	Tue Mar 17 15:40:25 2009 +0000
+++ b/tools/fs-back/fs-ops.c	Wed Mar 18 12:00:10 2009 +0000
@@ -49,7 +49,6 @@
 {
     char *file_name, full_path[BUFFER_SIZE];
     int fd;
-    struct timeval tv1, tv2;
     RING_IDX rsp_idx;
     fsif_response_t *rsp;
     uint16_t req_id;
@@ -127,7 +126,7
 @@
 static void dispatch_file_read(struct fs_mount *mount, struct fsif_request
*req)
 {
     void *buf;
-    int fd, i, count;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -169,7 +168,6 @@
     priv_req->aiocb.aio_sigevent.sigev_value.sival_ptr = priv_req;
     assert(aio_read(&priv_req->aiocb) >= 0);
 
-out: 
     /* We can advance the request consumer index, from here on, the request
      * should not be used (it may be overrinden by a response) */
     mount->ring.req_cons++;
@@ -198,7 +196,7 @@
 static void dispatch_file_write(struct fs_mount *mount, struct fsif_request
*req)
 {
     void *buf;
-    int fd, count, i;
+    int fd, count;
     uint16_t req_id;
     unsigned short priv_id;
     struct fs_request *priv_req;
@@ -268,7 +266,6 @@
 
 static void dispatch_stat(struct
 fs_mount *mount, struct fsif_request *req)
 {
-    struct fsif_stat_response *buf;
     struct stat stat;
     int fd, ret;
     uint16_t req_id;



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



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



      

[-- Attachment #1.2: Type: text/html, Size: 14645 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:18   ` Boris Derzhavets
@ 2009-03-18 14:19     ` Stefano Stabellini
  2009-03-18 14:48       ` Boris Derzhavets
  0 siblings, 1 reply; 14+ messages in thread
From: Stefano Stabellini @ 2009-03-18 14:19 UTC (permalink / raw)
  To: bderzhavets@yahoo.com; +Cc: xen-devel

Boris Derzhavets wrote:

> Removed unresolved reference in
> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
> to `pci_emulation_add'
> 
> /*    for (i = 0; i < nb_pci_emulation; i++) {
>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
>             fprintf(stderr, "Warning: could not add PCI device %s\n",
>                     pci_emulation_config_text[i]);
>         }
>     }
> */
> 
> "make tools" completed OK.
> Is it acceptable ?
> 



I think we are missing an ifdef CONFIG_PASSTHROUGH


diff --git a/vl.c b/vl.c
index 9b9f7d5..6c0ffb3 100644
--- a/vl.c
+++ b/vl.c
@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
+#ifdef CONFIG_PASSTHROUGH
     for (i = 0; i < nb_pci_emulation; i++) {
         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
             fprintf(stderr, "Warning: could not add PCI device %s\n",
                     pci_emulation_config_text[i]);
         }
     }
+#endif
 
     if (strlen(direct_pci_str) > 0)
         direct_pci = direct_pci_str;

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:19     ` Stefano Stabellini
@ 2009-03-18 14:48       ` Boris Derzhavets
  2009-03-18 14:53         ` Boris Derzhavets
  0 siblings, 1 reply; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 14:48 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1599 bytes --]

Thank you. It's done
Boris

--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 10:19 AM

Boris Derzhavets wrote:

> Removed unresolved reference in
> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
> to `pci_emulation_add'
> 
> /*    for (i = 0; i < nb_pci_emulation; i++) {
>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
>             fprintf(stderr, "Warning: could not add PCI device
%s\n",
>                     pci_emulation_config_text[i]);
>         }
>     }
> */
> 
> "make tools" completed OK.
> Is it acceptable ?
> 



I think we are missing an ifdef CONFIG_PASSTHROUGH


diff --git a/vl.c b/vl.c
index 9b9f7d5..6c0ffb3 100644
--- a/vl.c
+++ b/vl.c
@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
+#ifdef CONFIG_PASSTHROUGH
     for (i = 0; i < nb_pci_emulation; i++) {
         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
             fprintf(stderr, "Warning: could not add PCI device
%s\n",
                     pci_emulation_config_text[i]);
         }
     }
+#endif
 
     if (strlen(direct_pci_str) > 0)
         direct_pci = direct_pci_str;

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



      

[-- Attachment #1.2: Type: text/html, Size: 2118 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:48       ` Boris Derzhavets
@ 2009-03-18 14:53         ` Boris Derzhavets
  2009-03-18 15:00           ` Keir Fraser
  2009-03-18 15:01           ` Jiang, Yunhong
  0 siblings, 2 replies; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 14:53 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3847 bytes --]

Now "make install-xen" fails :-

make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/src/xen-unstable.hg/xen/include  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .mce_intel.o.d -c mce_intel.c -o mce_intel.o
mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static declaration
x86_mca.h:95: error: previous declaration of ‘firstbank’ was here
make[6]: *** [mce_intel.o] Error 1
make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
make[5]: *** [mcheck/built_in.o] Error 2
make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'
make[4]: *** [cpu/built_in.o] Error 2
make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'
make: *** [install-xen] Error 2


--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 10:48 AM

Thank you. It's done
Boris

--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 10:19 AM

Boris Derzhavets wrote:

> Removed unresolved reference in
> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
> to `pci_emulation_add'
> 
> /*    for (i = 0; i < nb_pci_emulation; i++) {
>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)
 {
>             fprintf(stderr, "Warning: could not add PCI device
%s\n",
>                     pci_emulation_config_text[i]);
>         }
>     }
> */
> 
> "make tools" completed OK.
> Is it acceptable ?
> 



I think we are missing an ifdef CONFIG_PASSTHROUGH


diff --git a/vl.c b/vl.c
index 9b9f7d5..6c0ffb3 100644
--- a/vl.c
+++ b/vl.c
@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
+#ifdef CONFIG_PASSTHROUGH
     for (i = 0; i < nb_pci_emulation; i++) {
         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
             fprintf(stderr, "Warning: could not add PCI device
%s\n",
                     pci_emulation_config_text[i]);
         }
     }
+#endif
 
     if (strlen(direct_pci_str) > 0)
         direct_pci =
 direct_pci_str;

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



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



      

[-- Attachment #1.2: Type: text/html, Size: 4893 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:53         ` Boris Derzhavets
@ 2009-03-18 15:00           ` Keir Fraser
  2009-03-18 16:13             ` Boris Derzhavets
  2009-03-18 15:01           ` Jiang, Yunhong
  1 sibling, 1 reply; 14+ messages in thread
From: Keir Fraser @ 2009-03-18 15:00 UTC (permalink / raw)
  To: bderzhavets@yahoo.com, Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4345 bytes --]

Upgrade to latest xen-unstable. It¹s fixed there.

 -- Keir

On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:

> Now "make install-xen" fails :-
> 
> make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
> gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix
> include -Werror -Wno-pointer-arith -pipe
> -I/usr/src/xen-unstable.hg/xen/include
> -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic
> -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float
> -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks
> -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__
> -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF
> .mce_intel.o.d -c mce_intel.c -o mce_intel.o
> mce_intel.c:17: error: static declaration of Œfirstbank¹ follows non-static
> declaration
> x86_mca.h:95: error: previous declaration of Œfirstbank¹ was here
> make[6]: *** [mce_intel.o] Error 1
> make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
> make[5]: *** [mcheck/built_in.o] Error 2
> make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'
> make[4]: *** [cpu/built_in.o] Error 2
> make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
> make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2
> make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
> make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2
> make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'
> make: *** [install-xen] Error 2
> 
> 
> --- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
>> From: Boris Derzhavets <bderzhavets@yahoo.com>
>> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
>> To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
>> Cc: "xen-devel" <xen-devel@lists.xensource.com>
>> Date: Wednesday, March 18, 2009, 10:48 AM
>> 
>> Thank you. It's done
>> Boris
>> 
>> --- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>> wrote:
>>> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
>>> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
>>> Cc: "xen-devel" <xen-devel@lists.xensource.com>
>>> Date: Wednesday, March 18, 2009, 10:19 AM
>>> 
>>> Boris Derzhavets wrote:
>>> 
>>>> > Removed unresolved reference in
>>>> > /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
>>>> > to `pci_emulation_add'
>>>> > 
>>>> > /*    for (i = 0; i < nb_pci_emulation; i++) {
>>>> >         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)
>>>  {
>>>> >             fprintf(stderr, "Warning: could not add PCI device
>>> %s\n",
>>>> >                     pci_emulation_config_text[i]);
>>>> >         }
>>>> >     }
>>>> > */
>>>> > 
>>>> > "make tools" completed OK.
>>>> > Is it acceptable ?
>>>> > 
>>> 
>>> 
>>> 
>>> I think we are missing an ifdef
>>>  CONFIG_PASSTHROUGH
>>> 
>>> 
>>> diff --git a/vl.c b/vl.c
>>> index 9b9f7d5..6c0ffb3 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
>>>          }
>>>      }
>>>  
>>> +#ifdef CONFIG_PASSTHROUGH
>>>      for (i = 0; i < nb_pci_emulation; i++) {
>>>          if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
>>>              fprintf(stderr, "Warning: could not add PCI device
>>> %s\n",
>>>                      pci_emulation_config_text[i]);
>>>          }
>>>      }
>>> +#endif
>>>  
>>>      if (strlen(direct_pci_str) > 0)
>>>          direct_pci =
>>>  direct_pci_str;
>>> 
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>> 
>>  
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
>  


[-- Attachment #1.2: Type: text/html, Size: 6765 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH] fs-backend: fix compile problems
  2009-03-18 14:53         ` Boris Derzhavets
  2009-03-18 15:00           ` Keir Fraser
@ 2009-03-18 15:01           ` Jiang, Yunhong
  1 sibling, 0 replies; 14+ messages in thread
From: Jiang, Yunhong @ 2009-03-18 15:01 UTC (permalink / raw)
  To: bderzhavets@yahoo.com, Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4166 bytes --]

It should have been fixed in 19373.

-- yhj

________________________________
From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Boris Derzhavets
Sent: 2009年3月18日 22:54
To: Stefano Stabellini
Cc: xen-devel
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

Now "make install-xen" fails :-

make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/src/xen-unstable.hg/xen/include  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .mce_intel.o.d -c mce_intel.c -o mce_intel.o
mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static declaration
x86_mca.h:95: error: previous declaration of ‘firstbank’ was here
make[6]: *** [mce_intel.o] Error 1
make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
make[5]: *** [mcheck/built_in.o] Error 2
make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'
make[4]: *** [cpu/built_in.o] Error 2
make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'
make: *** [install-xen] Error 2


--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 10:48 AM

Thank you. It's done
Boris

--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 10:19 AM


Boris Derzhavets wrote:

> Removed unresolved reference in
> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
> to `pci_emulation_add'
>
> /*    for (i = 0; i < nb_pci_emulation; i++) {
>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)
 {
>             fprintf(stderr, "Warning: could not add PCI device
%s\n",
>                     pci_emulation_config_text[i]);
>         }
>     }
> */
>
> "make tools" completed OK.
> Is it acceptable ?
>



I think we are missing an ifdef
 CONFIG_PASSTHROUGH


diff --git a/vl.c b/vl.c
index 9b9f7d5..6c0ffb3 100644
--- a/vl.c
+++ b/vl.c
@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
         }
     }

+#ifdef CONFIG_PASSTHROUGH
     for (i = 0; i < nb_pci_emulation; i++) {
         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
             fprintf(stderr, "Warning: could not add PCI device
%s\n",
                     pci_emulation_config_text[i]);
         }
     }
+#endif

     if (strlen(direct_pci_str) > 0)
         direct_pci =
 direct_pci_str;

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



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



[-- Attachment #1.2: Type: text/html, Size: 6605 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 15:00           ` Keir Fraser
@ 2009-03-18 16:13             ` Boris Derzhavets
  2009-03-18 17:26               ` Keir Fraser
  0 siblings, 1 reply; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 16:13 UTC (permalink / raw)
  To: Stefano Stabellini, Keir Fraser; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 6444 bytes --]

The most recent Xen Unstable installed:-
make xen OK
make install-xen OK
make tools 


gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_restore.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_restore.o xc_domain_restore.c
gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_save.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_save.o xc_domain_save.c
cc1: warnings being treated as errors
xc_domain_save.c: In function ‘lock_suspend_event’:
xc_domain_save.c:764: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[4]: *** [xc_domain_save.o] Error 1
make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[2]: *** [subdir-install-libxc] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

I belive requires same patch as fs-backend.c


Boris



--- On Wed, 3/18/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 11:00 AM



Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
Upgrade to latest xen-unstable. It’s fixed there.



 -- Keir



On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:



Now "make install-xen" fails :-



make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/src/xen-unstable.hg/xen/include  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .mce_intel.o.d -c mce_intel.c -o mce_intel.o

mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static declaration

x86_mca.h:95: error: previous declaration of ‘firstbank’ was here

make[6]: *** [mce_intel.o] Error 1

make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

make[5]: *** [mcheck/built_in.o] Error 2

make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'

make[4]: *** [cpu/built_in.o] Error 2

make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2

make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2

make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make[1]: *** [install] Error 2

make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make: *** [install-xen] Error 2





--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:

From: Boris Derzhavets <bderzhavets@yahoo.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:48 AM



Thank you. It's done

Boris



--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:19 AM



Boris Derzhavets wrote:



> Removed unresolved reference in

> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference

> to `pci_emulation_add'

> 

> /*    for (i = 0; i < nb_pci_emulation; i++) {

>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)

 {

>             fprintf(stderr, "Warning: could not add PCI device

%s\n",

>                     pci_emulation_config_text[i]);

>         }

>     }

> */

> 

> "make tools" completed OK.

> Is it acceptable ?

> 







I think we are missing an ifdef

 CONFIG_PASSTHROUGH





diff --git a/vl.c b/vl.c

index 9b9f7d5..6c0ffb3 100644

--- a/vl.c

+++ b/vl.c

@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)

         }

     }

 

+#ifdef CONFIG_PASSTHROUGH

     for (i = 0; i < nb_pci_emulation; i++) {

         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {

             fprintf(stderr, "Warning: could not add PCI device

%s\n",

                     pci_emulation_config_text[i]);

         }

     }

+#endif

 

     if (strlen(direct_pci_str) > 0)

         direct_pci =

 direct_pci_str;



_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 

_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 


 



      

[-- Attachment #1.2: Type: text/html, Size: 8895 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
@ 2009-03-18 16:24 Boris Derzhavets
  2009-03-18 16:41 ` Boris Derzhavets
  0 siblings, 1 reply; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 16:24 UTC (permalink / raw)
  To: Stefano Stabellini, Keir Fraser; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 6897 bytes --]

Most probably changeset 19382 brought it up

Boris

--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>, "Keir Fraser" <keir.fraser@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 12:13 PM

The most recent Xen Unstable installed:-
make xen OK
make install-xen OK
make tools 


gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_restore.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_restore.o xc_domain_restore.c
gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_save.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror
 -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_save.o xc_domain_save.c
cc1: warnings being treated as errors
xc_domain_save.c: In function ‘lock_suspend_event’:
xc_domain_save.c:764: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[4]: *** [xc_domain_save.o] Error 1
make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[2]: *** [subdir-install-libxc] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

I belive requires same patch as fs-backend.c


Boris



--- On Wed, 3/18/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 11:00 AM



Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
Upgrade to latest xen-unstable. It’s fixed there.



 -- Keir



On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:



Now "make install-xen" fails :-



make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/src/xen-unstable.hg/xen/include  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .mce_intel.o.d -c mce_intel.c -o mce_intel.o

mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static declaration

x86_mca.h:95: error: previous declaration of ‘firstbank’ was here

make[6]: *** [mce_intel.o] Error 1

make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

make[5]: *** [mcheck/built_in.o] Error 2

make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'

make[4]: *** [cpu/built_in.o] Error 2

make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2

make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2

make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make[1]: *** [install] Error 2

make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make: *** [install-xen] Error 2





--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:

From: Boris Derzhavets <bderzhavets@yahoo.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:48 AM



Thank you. It's done

Boris



--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:19 AM



Boris Derzhavets wrote:



> Removed unresolved reference in

> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference

> to `pci_emulation_add'

> 

> /*    for (i = 0; i < nb_pci_emulation; i++) {

>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)

 {

>             fprintf(stderr, "Warning: could not add PCI device

%s\n",

>                     pci_emulation_config_text[i]);

>         }

>     }

> */

> 

> "make tools" completed OK.

> Is it acceptable ?

> 







I think we are missing an ifdef

 CONFIG_PASSTHROUGH





diff --git a/vl.c b/vl.c

index 9b9f7d5..6c0ffb3 100644

--- a/vl.c

+++ b/vl.c

@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)

         }

     }

 

+#ifdef CONFIG_PASSTHROUGH

     for (i = 0; i < nb_pci_emulation; i++) {

         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {

             fprintf(stderr, "Warning: could not add PCI device

%s\n",

                     pci_emulation_config_text[i]);

         }

     }

+#endif

 

     if (strlen(direct_pci_str) > 0)

         direct_pci =

 direct_pci_str;



_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 

_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 


 



      


      

[-- Attachment #1.2: Type: text/html, Size: 9869 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 16:24 Boris Derzhavets
@ 2009-03-18 16:41 ` Boris Derzhavets
  0 siblings, 0 replies; 14+ messages in thread
From: Boris Derzhavets @ 2009-03-18 16:41 UTC (permalink / raw)
  To: Stefano Stabellini, Keir Fraser; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 7882 bytes --]

Also /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c still requires manual intervention per Stefano :-

+ #ifdef CONFIG_PASSTHROUGH

     for (i = 0; i < nb_pci_emulation; i++) {
         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
             fprintf(stderr, "Warning: could not add PCI device %s\n",
                     pci_emulation_config_text[i]);
         }
     }

+#endif

--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>, "Keir Fraser" <keir.fraser@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 12:24 PM

Most probably changeset 19382 brought it up

Boris

--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
From: Boris Derzhavets <bderzhavets@yahoo.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>, "Keir Fraser" <keir.fraser@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 12:13 PM

The most recent Xen Unstable installed:-
make xen OK
make install-xen OK
make tools 


gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_restore.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_restore.o xc_domain_restore.c
gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_save.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Werror
 -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_domain_save.o xc_domain_save.c
cc1: warnings being treated as errors
xc_domain_save.c: In function ‘lock_suspend_event’:
xc_domain_save.c:764: error: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[4]: *** [xc_domain_save.o] Error 1
make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
make[2]: *** [subdir-install-libxc] Error 2
make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

I belive requires same patch as fs-backend.c


Boris



--- On Wed, 3/18/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
From: Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
Cc: "xen-devel" <xen-devel@lists.xensource.com>
Date: Wednesday, March 18, 2009, 11:00 AM



Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
Upgrade to latest xen-unstable. It’s fixed there.



 -- Keir



On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:



Now "make install-xen" fails :-



make[6]: Entering directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/src/xen-unstable.hg/xen/include  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__ -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF .mce_intel.o.d -c mce_intel.c -o mce_intel.o

mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static declaration

x86_mca.h:95: error: previous declaration of ‘firstbank’ was here

make[6]: *** [mce_intel.o] Error 1

make[6]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'

make[5]: *** [mcheck/built_in.o] Error 2

make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'

make[4]: *** [cpu/built_in.o] Error 2

make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2

make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'

make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2

make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make[1]: *** [install] Error 2

make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'

make: *** [install-xen] Error 2





--- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:

From: Boris Derzhavets <bderzhavets@yahoo.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:48 AM



Thank you. It's done

Boris



--- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems

To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>

Cc: "xen-devel" <xen-devel@lists.xensource.com>

Date: Wednesday, March 18, 2009, 10:19 AM



Boris Derzhavets wrote:



> Removed unresolved reference in

> /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference

> to `pci_emulation_add'

> 

> /*    for (i = 0; i < nb_pci_emulation; i++) {

>         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)

 {

>             fprintf(stderr, "Warning: could not add PCI device

%s\n",

>                     pci_emulation_config_text[i]);

>         }

>     }

> */

> 

> "make tools" completed OK.

> Is it acceptable ?

> 







I think we are missing an ifdef

 CONFIG_PASSTHROUGH





diff --git a/vl.c b/vl.c

index 9b9f7d5..6c0ffb3 100644

--- a/vl.c

+++ b/vl.c

@@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)

         }

     }

 

+#ifdef CONFIG_PASSTHROUGH

     for (i = 0; i < nb_pci_emulation; i++) {

         if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {

             fprintf(stderr, "Warning: could not add PCI device

%s\n",

                     pci_emulation_config_text[i]);

         }

     }

+#endif

 

     if (strlen(direct_pci_str) > 0)

         direct_pci =

 direct_pci_str;



_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 

_______________________________________________

Xen-devel mailing list

Xen-devel@lists.xensource.com

http://lists.xensource.com/xen-devel



 


 



      


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



      

[-- Attachment #1.2: Type: text/html, Size: 11561 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 16:13             ` Boris Derzhavets
@ 2009-03-18 17:26               ` Keir Fraser
  2009-03-18 21:21                 ` Karthik G Balaji
  0 siblings, 1 reply; 14+ messages in thread
From: Keir Fraser @ 2009-03-18 17:26 UTC (permalink / raw)
  To: bderzhavets@yahoo.com, Stefano Stabellini; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 6914 bytes --]

Just fixed this one in cs 19388.

 -- Keir

On 18/03/2009 16:13, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:

> The most recent Xen Unstable installed:-
> make xen OK
> make install-xen OK
> make tools 
> 
> 
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_restore.o.d
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
> -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore
> -I../include -c -o xc_domain_restore.o xc_domain_restore.c
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_save.o.d
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
> -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore
> -I../include -c -o xc_domain_save.o xc_domain_save.c
> cc1: warnings being treated as errors
> xc_domain_save.c: In function Œlock_suspend_event¹:
> xc_domain_save.c:764: error: ignoring return value of Œwrite¹, declared with
> attribute warn_unused_result
> make[4]: *** [xc_domain_save.o] Error 1
> make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
> make[3]: *** [build] Error 2
> make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
> make[2]: *** [subdir-install-libxc] Error 2
> make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
> make[1]: *** [subdirs-install] Error 2
> make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
> make: *** [install-tools] Error 2
> 
> I belive requires same patch as fs-backend.c
> 
> 
> Boris
> 
> 
> 
> --- On Wed, 3/18/09, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
>> From: Keir Fraser <keir.fraser@eu.citrix.com>
>> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
>> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Stefano Stabellini"
>> <Stefano.Stabellini@eu.citrix.com>
>> Cc: "xen-devel" <xen-devel@lists.xensource.com>
>> Date: Wednesday, March 18, 2009, 11:00 AM
>> 
>> Re: [Xen-devel] [PATCH] fs-backend: fix compile problems Upgrade to latest
>> xen-unstable. It¹s fixed there.
>> 
>>  -- Keir
>> 
>> On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:
>> 
>>> Now "make install-xen" fails :-
>>> 
>>> make[6]: Entering directory
>>> `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
>>> gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
>>> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
>>> -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common
>>> -iwithprefix include -Werror -Wno-pointer-arith -pipe
>>> -I/usr/src/xen-unstable.hg/xen/include
>>> -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic
>>> -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float
>>> -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks
>>> -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__
>>> -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF
>>> .mce_intel.o.d -c mce_intel.c -o mce_intel.o
>>> mce_intel.c:17: error: static declaration of Œfirstbank¹ follows non-static
>>> declaration
>>> x86_mca.h:95: error: previous declaration of Œfirstbank¹ was here
>>> make[6]: *** [mce_intel.o] Error 1
>>> make[6]: Leaving directory
>>> `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
>>> make[5]: *** [mcheck/built_in.o] Error 2
>>> make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'
>>> make[4]: *** [cpu/built_in.o] Error 2
>>> make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
>>> make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2
>>> make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
>>> make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2
>>> make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'
>>> make[1]: *** [install] Error 2
>>> make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'
>>> make: *** [install-xen] Error 2
>>> 
>>> 
>>> --- On Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com> wrote:
>>>> From: Boris Derzhavets <bderzhavets@yahoo.com>
>>>> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
>>>> To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
>>>> Cc: "xen-devel" <xen-devel@lists.xensource.com>
>>>> Date: Wednesday, March 18, 2009, 10:48 AM
>>>> 
>>>> Thank you. It's done
>>>> Boris
>>>> 
>>>> --- On Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>> wrote:
>>>>> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>>> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
>>>>> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
>>>>> Cc: "xen-devel" <xen-devel@lists.xensource.com>
>>>>> Date: Wednesday, March 18, 2009, 10:19 AM
>>>>> 
>>>>> Boris Derzhavets wrote:
>>>>> 
>>>>>> > Removed unresolved reference in
>>>>>> > /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
>>>>>> > to `pci_emulation_add'
>>>>>> > 
>>>>>> > /*    for (i = 0; i < nb_pci_emulation; i++) {
>>>>>> >         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)
>>>>>  {
>>>>>> >             fprintf(stderr, "Warning: could not add PCI device
>>>>> %s\n",
>>>>>> >                     pci_emulation_config_text[i]);
>>>>>> >         }
>>>>>> >     }
>>>>>> > */
>>>>>> > 
>>>>>> > "make tools" completed OK.
>>>>>> > Is it acceptable ?
>>>>>> > 
>>>>> 
>>>>> 
>>>>> 
>>>>> I think we are missing an ifdef
>>>>>  CONFIG_PASSTHROUGH
>>>>> 
>>>>> 
>>>>> diff --git a/vl.c b/vl.c
>>>>> index 9b9f7d5..6c0ffb3 100644
>>>>> --- a/vl.c
>>>>> +++ b/vl.c
>>>>> @@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
>>>>>          }
>>>>>      }
>>>>>  
>>>>> +#ifdef CONFIG_PASSTHROUGH
>>>>>      for (i = 0; i < nb_pci_emulation; i++) {
>>>>>          if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
>>>>>              fprintf(stderr, "Warning: could not add PCI device
>>>>> %s\n",
>>>>>                      pci_emulation_config_text[i]);
>>>>>          }
>>>>>      }
>>>>> +#endif
>>>>>  
>>>>>      if (strlen(direct_pci_str) > 0)
>>>>>          direct_pci =
>>>>>  direct_pci_str;
>>>>> 
>>>>> _______________________________________________
>>>>> Xen-devel mailing list
>>>>> Xen-devel@lists.xensource.com
>>>>> http://lists.xensource.com/xen-devel
>>>> 
>>>>  
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@lists.xensource.com
>>>> http://lists.xensource.com/xen-devel
>>> 
>>>  
>>  
> 
>  


[-- Attachment #1.2: Type: text/html, Size: 9997 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] fs-backend: fix compile problems
  2009-03-18 17:26               ` Keir Fraser
@ 2009-03-18 21:21                 ` Karthik G Balaji
  0 siblings, 0 replies; 14+ messages in thread
From: Karthik G Balaji @ 2009-03-18 21:21 UTC (permalink / raw)
  To: Keir Fraser; +Cc: bderzhavets@yahoo.com, xen-devel, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 17015 bytes --]

After the above fixes I am getting the following error. Dont know if I am
missing something

building 'xc' extension
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/xen
creating build/temp.linux-i686-2.5/xen/lowlevel
creating build/temp.linux-i686-2.5/xen/lowlevel/xc
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
-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 .buildpy.d
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -mno-tls-direct-seg-refs -fPIC -I../../tools/libxc
-I../../tools/xenstore -I../../tools/include -Ixen/lowlevel/xc
-I/usr/include/python2.5 -c xen/lowlevel/xc/xc.c -o
build/temp.linux-i686-2.5/xen/lowlevel/xc/xc.o -fno-strict-aliasing -Werror
xen/lowlevel/xc/xc.c:7:20: error: Python.h: No such file or directory
In file included from ../../tools/libxc/xc_dom.h:1,
                 from xen/lowlevel/xc/xc.c:22:
../../tools/include/xen/libelf/libelf.h:102: error: expected
specifier-qualifier-list before ‘FILE’
../../tools/include/xen/libelf/libelf.h:186: error: expected declaration
specifiers or ‘...’ before ‘FILE’
In file included from xen/lowlevel/xc/xc.c:22:
../../tools/libxc/xc_dom.h:185: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:39: error: expected specifier-qualifier-list before
‘PyObject_HEAD’
xen/lowlevel/xc/xc.c:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:90: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:95: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:143: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:157: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:162: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:177: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:182: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:211: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:249: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:285: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:355: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:398: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:487: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:507: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
cc1: warnings being treated as errors
xen/lowlevel/xc/xc.c: In function ‘token_value’:
xen/lowlevel/xc/xc.c:529: error: implicit declaration of function ‘strchr’
xen/lowlevel/xc/xc.c:529: error: incompatible implicit declaration of
built-in function ‘strchr’
xen/lowlevel/xc/xc.c:530: error: implicit declaration of function ‘strtol’
xen/lowlevel/xc/xc.c: In function ‘next_bdf’:
xen/lowlevel/xc/xc.c:537: error: incompatible implicit declaration of
built-in function ‘strchr’
xen/lowlevel/xc/xc.c:542: error: incompatible implicit declaration of
built-in function ‘strchr’
xen/lowlevel/xc/xc.c: At top level:
xen/lowlevel/xc/xc.c:554: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:586: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:618: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:650: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:749: error: expected ‘)’ before ‘*’ token
xen/lowlevel/xc/xc.c:766: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:785: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:808: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:824: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:849: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:865: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:882: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:930: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:949: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:967: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:986: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1008: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1038: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1049: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1126: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1197: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1219: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1272: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1281: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1308: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1324: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1339: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1357: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1372: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1394: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1417: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1440: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1455: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1475: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1493: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1508: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘pyxc_methods’
xen/lowlevel/xc/xc.c:1971: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1976: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
xen/lowlevel/xc/xc.c:1989: error: expected declaration specifiers or ‘...’
before ‘PyObject’
xen/lowlevel/xc/xc.c:1989: error: expected declaration specifiers or ‘...’
before ‘PyObject’
xen/lowlevel/xc/xc.c: In function ‘PyXc_init’:
xen/lowlevel/xc/xc.c:1991: error: ‘XcObject’ has no member named ‘xc_handle’
xen/lowlevel/xc/xc.c:1992: error: implicit declaration of function
‘pyxc_error_to_exception’
xen/lowlevel/xc/xc.c: In function ‘PyXc_dealloc’:
xen/lowlevel/xc/xc.c:2001: error: ‘XcObject’ has no member named ‘xc_handle’
xen/lowlevel/xc/xc.c:2002: error: ‘XcObject’ has no member named ‘xc_handle’
xen/lowlevel/xc/xc.c:2003: error: ‘XcObject’ has no member named ‘xc_handle’
xen/lowlevel/xc/xc.c:2006: error: ‘XcObject’ has no member named ‘ob_type’
xen/lowlevel/xc/xc.c:2006: error: ‘PyObject’ undeclared (first use in this
function)
xen/lowlevel/xc/xc.c:2006: error: (Each undeclared identifier is reported
only once
xen/lowlevel/xc/xc.c:2006: error: for each function it appears in.)
xen/lowlevel/xc/xc.c:2006: error: expected expression before ‘)’ token
xen/lowlevel/xc/xc.c: At top level:
xen/lowlevel/xc/xc.c:2009: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘PyXcType’
xen/lowlevel/xc/xc.c:2051: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘xc_methods’
xen/lowlevel/xc/xc.c:2053: error: return type defaults to ‘int’
xen/lowlevel/xc/xc.c: In function ‘DL_EXPORT’:
xen/lowlevel/xc/xc.c:2053: error: expected declaration specifiers before
‘initxc’
xen/lowlevel/xc/xc.c:2082: error: expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1
make[3]: *** [buildpy] Error 1
make[3]: Leaving directory
`/home/karthik/xen-source/xen-unstable.hg/tools/python'
make[2]: *** [subdir-install-python] Error 2
make[2]: Leaving directory `/home/karthik/xen-source/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/home/karthik/xen-source/xen-unstable.hg/tools'
make: *** [install-tools] Error 2

- Karthik



2009/3/18 Keir Fraser <keir.fraser@eu.citrix.com>

>  Just fixed this one in cs 19388.
>
>  -- Keir
>
>
> On 18/03/2009 16:13, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:
>
> The most recent Xen Unstable installed:-
> make xen OK
> make install-xen OK
> make tools
>
>
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF
> .xc_domain_restore.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_GNU_SOURCE -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I.
> -I../xenstore -I../include -c -o xc_domain_restore.o xc_domain_restore.c
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_domain_save.o.d
>  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
> -I../../xen/common/libelf -Werror -Wmissing-prototypes  -I. -I../xenstore
> -I../include -c -o xc_domain_save.o xc_domain_save.c
> cc1: warnings being treated as errors
> xc_domain_save.c: In function ‘lock_suspend_event’:
> xc_domain_save.c:764: error: ignoring return value of ‘write’, declared
> with attribute warn_unused_result
> make[4]: *** [xc_domain_save.o] Error 1
> make[4]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
> make[3]: *** [build] Error 2
> make[3]: Leaving directory `/usr/src/xen-unstable.hg/tools/libxc'
> make[2]: *** [subdir-install-libxc] Error 2
> make[2]: Leaving directory `/usr/src/xen-unstable.hg/tools'
> make[1]: *** [subdirs-install] Error 2
> make[1]: Leaving directory `/usr/src/xen-unstable.hg/tools'
> make: *** [install-tools] Error 2
>
> I belive requires same patch as fs-backend.c
>
>
> Boris
>
>
>
> --- On *Wed, 3/18/09, Keir Fraser <keir.fraser@eu.citrix.com>* wrote:
>
> From: Keir Fraser <keir.fraser@eu.citrix.com>
> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>, "Stefano Stabellini"
> <Stefano.Stabellini@eu.citrix.com>
> Cc: "xen-devel" <xen-devel@lists.xensource.com>
> Date: Wednesday, March 18, 2009, 11:00 AM
>
> Re: [Xen-devel] [PATCH] fs-backend: fix compile problems Upgrade to latest
> xen-unstable. It’s fixed there.
>
>
>  -- Keir
>
> On 18/03/2009 14:53, "Boris Derzhavets" <bderzhavets@yahoo.com> wrote:
>
> Now "make install-xen" fails :-
>
> make[6]: Entering directory
> `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
> gcc -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -nostdinc -fno-builtin -fno-common
> -iwithprefix include -Werror -Wno-pointer-arith -pipe
> -I/usr/src/xen-unstable.hg/xen/include
>  -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-generic
> -I/usr/src/xen-unstable.hg/xen/include/asm-x86/mach-default -msoft-float
> -fno-stack-protector -mno-red-zone -fpic -fno-reorder-blocks
> -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -g -D__XEN__
> -DVERBOSE -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -MMD -MF
> .mce_intel.o.d -c mce_intel.c -o mce_intel.o
> mce_intel.c:17: error: static declaration of ‘firstbank’ follows non-static
> declaration
> x86_mca.h:95: error: previous declaration of ‘firstbank’ was here
> make[6]: *** [mce_intel.o] Error 1
> make[6]: Leaving directory
> `/usr/src/xen-unstable.hg/xen/arch/x86/cpu/mcheck'
> make[5]: *** [mcheck/built_in.o] Error 2
> make[5]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86/cpu'
> make[4]: *** [cpu/built_in.o] Error 2
> make[4]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
> make[3]: *** [/usr/src/xen-unstable.hg/xen/arch/x86/built_in.o] Error 2
> make[3]: Leaving directory `/usr/src/xen-unstable.hg/xen/arch/x86'
> make[2]: *** [/usr/src/xen-unstable.hg/xen/xen] Error 2
> make[2]: Leaving directory `/usr/src/xen-unstable.hg/xen'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/usr/src/xen-unstable.hg/xen'
> make: *** [install-xen] Error 2
>
>
> --- On *Wed, 3/18/09, Boris Derzhavets <bderzhavets@yahoo.com>* wrote:
>
> From: Boris Derzhavets <bderzhavets@yahoo.com>
> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
> To: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
> Cc: "xen-devel" <xen-devel@lists.xensource.com>
> Date: Wednesday, March 18, 2009, 10:48 AM
>
> Thank you. It's done
> Boris
>
> --- On *Wed, 3/18/09, Stefano Stabellini <stefano.stabellini@eu.citrix.com
> >* wrote:
>
> From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Subject: Re: [Xen-devel] [PATCH] fs-backend: fix compile problems
> To: "bderzhavets@yahoo.com" <bderzhavets@yahoo.com>
> Cc: "xen-devel" <xen-devel@lists.xensource.com>
> Date: Wednesday, March 18, 2009, 10:19 AM
>
> Boris Derzhavets wrote:
>
> > Removed unresolved reference in
> > /usr/src/xen-unstable.hg/tools/ioemu-dir/vl.c:5898: undefined reference
> > to `pci_emulation_add'
> >
> > /*    for (i = 0; i < nb_pci_emulation; i++) {
> >         if(pci_emulation_add(pci_emulation_config_text[i]) < 0)
>  {
> >             fprintf(stderr, "Warning: could not add PCI device
> %s\n",
> >                     pci_emulation_config_text[i]);
> >         }
> >     }
> > */
> >
> > "make tools" completed OK.
> > Is it acceptable ?
> >
>
>
>
> I think we are missing an ifdef
>  CONFIG_PASSTHROUGH
>
>
> diff --git a/vl.c b/vl.c
> index 9b9f7d5..6c0ffb3 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -5894,12 +5894,14 @@ int main(int argc, char **argv, char **envp)
>          }
>      }
>
> +#ifdef CONFIG_PASSTHROUGH
>      for (i = 0; i < nb_pci_emulation; i++) {
>          if(pci_emulation_add(pci_emulation_config_text[i]) < 0) {
>              fprintf(stderr, "Warning: could not add PCI device
> %s\n",
>                      pci_emulation_config_text[i]);
>          }
>      }
> +#endif
>
>      if (strlen(direct_pci_str) > 0)
>          direct_pci =
>  direct_pci_str;
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 20929 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-03-18 21:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 12:03 [PATCH] fs-backend: fix compile problems Stefano Stabellini
2009-03-18 14:03 ` Boris Derzhavets
2009-03-18 14:12   ` Stefano Stabellini
2009-03-18 14:18   ` Boris Derzhavets
2009-03-18 14:19     ` Stefano Stabellini
2009-03-18 14:48       ` Boris Derzhavets
2009-03-18 14:53         ` Boris Derzhavets
2009-03-18 15:00           ` Keir Fraser
2009-03-18 16:13             ` Boris Derzhavets
2009-03-18 17:26               ` Keir Fraser
2009-03-18 21:21                 ` Karthik G Balaji
2009-03-18 15:01           ` Jiang, Yunhong
  -- strict thread matches above, loose matches on Subject: below --
2009-03-18 16:24 Boris Derzhavets
2009-03-18 16:41 ` Boris Derzhavets

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.