Bug 752916 - hivex does not support Python 3
Summary: hivex does not support Python 3
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-10 19:07 UTC by Michael Terry
Modified: 2011-11-19 17:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-19 16:55:56 UTC
Embargoed:


Attachments (Terms of Use)

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


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