[Libguestfs] Issue with python pip install

Richard W.M. Jones rjones at redhat.com
Mon Sep 14 18:06:27 UTC 2015


On Mon, Sep 14, 2015 at 05:48:24PM +0000, John McDowall wrote:
> I am trying to build a Python application installer that is using libguestfs. I using the instructions to create the python package posted at
> 
> https://github.com/libguestfs/libguestfs/commit/fcbfc4775fa2a44020974073594a745ca420d614
> 
> I am getting errors in the compile when I do the "pip install”. I have attached the output from pip. I looked at the code and I do not see anything obvious)
> 
> When I do a yum install of python-libguestds.x86_64 the python interface works correctly.
> 
> Version/Platform Information
> 
> Platform: Centos-7
> 
> libguestfs version: 1.31..6
> 
> $ uname -a
>  Linux localhost.localdomain 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> 
> $ gcc --version
> gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
> Copyright (C) 2013 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> $ python --version
> Python 2.7.5
> 
> Any help or suggestions would be appreciated.

I think what is happening is that you've got an older version of
libguestfs installed than the one you're building the python bindings
for.

Because libguestfs (eg. git) contains its own python bindings, the
assumption has always been that the version of libguestfs will be
exactly the same (ie. all APIs will be present and identical).

If you build different versions, then that's no longer true, so you
see errors from "missing" APIs (ie. ones not present in your old
version of libguestfs).  eg:

build/temp.linux-x86_64-2.7/guestfs-py.o
    guestfs-py.c:310:26: warning: ‘struct guestfs_btrfsbalance’ declared inside
parameter list [enabled by default]
     put_btrfsbalance (struct guestfs_btrfsbalance *btrfsbalance)
                              ^  

This could be fixed, but needs patching in generator/python.ml
upstream.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list