Re: [PATCH] virsh: change wexitstatus order to allow compilation on mac osx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/16/2010 01:59 AM, Eric Blake wrote:
On 09/15/2010 09:22 AM, Justin Clift wrote:
This is the simple fix Daniel Veillard suggested last year:

http://www.redhat.com/archives/libvir-list/2009-May/msg00459.html
---

tools/virsh.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 57ea618..c148f7b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -8646,7 +8646,7 @@ editFile (vshControl *ctl, const char *filename)
VIR_FREE(command);
return -1;
}
- if (command_ret != WEXITSTATUS (0)) {
+ if (WEXITSTATUS(command_ret) != 0) {

ACK. By the way, what was the compilation failure?

Thanks, pushed.  The compilation failure was:

  virsh.c:8605: error: lvalue required as unary '&' operand

Which seems weird, but this patch really did fix it. :)

This is some of the other compilation mess before it, you have insight about:

*************************************************************************

ranlib: file: .libs/libvirt.a(libvirt_driver_la-driver.o) has no symbols
ranlib: file: .libs/libvirt.a(close-hook.o) has no symbols
  CC     libvirt_qemu_la-libvirt-qemu.lo
  CCLD   libvirt-qemu.la
ld: warning: in ./libvirt_qemu.syms, file was built for unsupported file format which is not the architecture being
linked (x86_64)
  CCLD   libvirt_test.la
/usr/bin/ranlib: file: .libs/libvirt_test.a(libvirt_util_la-bridge.o) has no symbols /usr/bin/ranlib: file: .libs/libvirt_test.a(libvirt_util_la-macvtap.o) has no symbols /usr/bin/ranlib: file: .libs/libvirt_test.a(libvirt_util_la-stats_linux.o) has no symbols /usr/bin/ranlib: file: .libs/libvirt_test.a(libvirt_driver_la-driver.o) has no symbols
/usr/bin/ranlib: file: .libs/libvirt_test.a(close-hook.o) has no symbols
ranlib: file: .libs/libvirt_test.a(libvirt_util_la-bridge.o) has no symbols
ranlib: file: .libs/libvirt_test.a(libvirt_util_la-macvtap.o) has no symbols
ranlib: file: .libs/libvirt_test.a(libvirt_util_la-stats_linux.o) has no symbols ranlib: file: .libs/libvirt_test.a(libvirt_driver_la-driver.o) has no symbols
ranlib: file: .libs/libvirt_test.a(close-hook.o) has no symbols
Making all in daemon
make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in tools
make  all-am
  CC     virsh-console.o
  CC     virsh-virsh.o
virsh.c: In function 'editFile':
virsh.c:8605: error: lvalue required as unary '&' operand
virsh.c: In function 'vshReadlineInit':
virsh.c:10781: warning: assignment discards qualifiers from pointer target type
make[3]: *** [virsh-virsh.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
$

*************************************************************************

Unsure what the ranlib errors are about, but guessing it might be something to do with the "MACOSX_DEPLOYMENT_TARGET=10.4" bit referred to in the OSX email thread last year:

  http://www.redhat.com/archives/libvir-list/2009-May/msg00510.html

Just about to go and try that, and see what happens. :)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]