Bug 752916

Summary: hivex does not support Python 3
Product: [Community] Virtualization Tools Reporter: Michael Terry <mike>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-19 16:55:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Terry 2011-11-10 19:07:17 UTC
Description of problem:
When building on a 64-bit system against Python 3.x, hivex issues warnings like:
../../../python/hivex-py.c:810:3: warning: implicit declaration of
function 'Py_InitModule' [-Wimplicit-function-declaration]

This is almost certainly a bug.  The problem seems to be the use of PyString_* instead of PyBytes_*.  PyString_* is no longer available on Python 3.x.

How reproducible:
Always

Steps to Reproduce:
1. Build on amd64 with Python 3.x

Additional info:
See Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646383

Comment 1 Richard W.M. Jones 2011-11-10 19:50:54 UTC
We don't yet support python 3 in hivex, but ought to.

See similar changes made to libguestfs recently:
https://bugzilla.redhat.com/show_bug.cgi?id=750889
http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=2116f79cbcd4605b4997931285f14dde1f72a992

Comment 3 Richard W.M. Jones 2011-11-19 17:03:01 UTC
In case it's not clear, you can select which Python to use
by exporting the PYTHON environment variable before ./configure,
eg:

  PYTHON=python3 ./configure