Bug 1217398 - [1.2.13] [Solved] Missing type converters during build
Summary: [1.2.13] [Solved] Missing type converters during build
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt-python
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-30 09:50 UTC by jean-christophe manciot
Modified: 2015-11-05 09:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-05 09:04:14 UTC
Embargoed:


Attachments (Terms of Use)

Description jean-christophe manciot 2015-04-30 09:50:21 UTC
I'm trying to compile the sources - 1.2.13 - on a fresh system: Ubuntu Server 15.04

I'm running into the following issue "Missing type converters":

python setup.py build
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt /usr/local/share/libvirt/api/libvirt-api.xml
Found 402 functions in /usr/local/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 332 wrapper functions
Missing type converters:
virDomainIOThreadInfoPtr **:1
virDomainIOThreadInfoPtr:1
virDomainInterfacePtr:1
virDomainInterfacePtr **:1
ERROR: failed virDomainGetIOThreadInfo
ERROR: failed virDomainIOThreadInfoFree
ERROR: failed virDomainInterfaceAddresses
ERROR: failed virDomainInterfaceFree
error: command '/usr/bin/python' failed with exit status 1

If you want to reproduce it, my suggestion is to completely uninstall python-libvirt.
Maybe some dependencies are not met on my system, but which ones?

Comment 1 jean-christophe manciot 2015-04-30 09:59:03 UTC
Is there some expectation about some libvirt configuration files?
I'm currently experiencing another issue with that topic: https://bugzilla.redhat.com/show_bug.cgi?id=1217194

Comment 2 jean-christophe manciot 2015-05-01 13:06:36 UTC
I've been able to install all libvirt configuration files, and tried again to build your package with the exact same result:

python setup.py build
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt /usr/local/share/libvirt/api/libvirt-api.xml
Found 402 functions in /usr/local/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 332 wrapper functions
Missing type converters: 
virDomainIOThreadInfoPtr **:1 
virDomainIOThreadInfoPtr:1 
virDomainInterfacePtr:1 
virDomainInterfacePtr **:1 
ERROR: failed virDomainGetIOThreadInfo
ERROR: failed virDomainIOThreadInfoFree
ERROR: failed virDomainInterfaceAddresses
ERROR: failed virDomainInterfaceFree
error: command '/usr/bin/python' failed with exit status 1

I'm going to try with a previous release.

Comment 3 jean-christophe manciot 2015-05-01 13:20:11 UTC
I've discovered that there's a new release 1.2.14 which can be built almost correctly:

python setup.py build
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt /usr/local/share/libvirt/api/libvirt-api.xml
Found 402 functions in /usr/local/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 334 wrapper functions
/usr/bin/python generator.py libvirt-qemu /usr/local/share/libvirt/api/libvirt-qemu-api.xml
Found 5 functions in /usr/local/share/libvirt/api/libvirt-qemu-api.xml
Found 0 functions in libvirt-qemu-override-api.xml
Generated 3 wrapper functions
/usr/bin/pkg-config --atleast-version=1.0.2 libvirt
/usr/bin/python generator.py libvirt-lxc /usr/local/share/libvirt/api/libvirt-lxc-api.xml
Found 3 functions in /usr/local/share/libvirt/api/libvirt-lxc-api.xml
Found 0 functions in libvirt-lxc-override-api.xml
Generated 1 wrapper functions
running build_py
creating build/lib.linux-x86_64-2.7
copying build/libvirt.py -> build/lib.linux-x86_64-2.7
copying build/libvirt_qemu.py -> build/lib.linux-x86_64-2.7
copying build/libvirt_lxc.py -> build/lib.linux-x86_64-2.7
running build_ext
building 'libvirtmod' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/build
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I. -I/usr/include/python2.7 -c libvirt-override.c -o build/temp.linux-x86_64-2.7/libvirt-override.o -I/usr/local/include
libvirt-override.c:20:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I have python3-dev installed, but not python-dev nor python2.7-dev. Why are you using an old python release?

Comment 4 jean-christophe manciot 2015-05-01 13:29:23 UTC
Now it can be built and installed correctly.
Thanks for the modifications.


Note You need to log in before you can comment on or make changes to this bug.