Opened 11 years ago

Closed 11 years ago

#5643 closed Bugs (duplicate)

Python 3.2 compiling error ( PyUnicodeUCS2_AsWideChar )

Reported by: pelotoescogorciao@… Owned by: Stefan Seefeld
Milestone: To Be Determined Component: python USE GITHUB
Version: Severity: Problem
Keywords: Cc:

Description

ibs\python\src\converter\builtin_converters.cpp(436) : error C2664: 'PyUnicodeUCS2_AsWideChar' : cannot convert parameter 1 from 'PyUnicodeObject *' to 'PyObject *'

Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Solution: change libs\python\src\converter\builtin_converters.cpp(436)

int err = PyUnicode_AsWideChar(

/*(PyUnicodeObject *)*/intermediate change this line, comment out the C style cast!!!

Change History (6)

comment:1 by pelotoescogorciao@…, 11 years ago

Btw, that's in VS2010 SP1.

comment:2 by Steven Watanabe, 11 years ago

Component: NonePython
Owner: set to Ralf W. Grosse-Kunstleve

comment:3 by Ralf W. Grosse-Kunstleve, 11 years ago

Owner: changed from Ralf W. Grosse-Kunstleve to Stefan Seefeld

Stefan, are you set up to test against Python 3? If not, please re-assign to me and I'll see what I can do (I don't normally use Python 3).

comment:4 by anonymous, 11 years ago

Ralf,

I may be able to help, but right now I'm getting stuck in a bunch of errors, so I'm not sure how much effort it will take to get started. I just fixed a Python3 compatibility bug in bootstrap.sh, but there appears to be more. After bootstrapping with --with-python=/usr/bin/python3, I see compilation lines with '-I/usr/include/python3.2', resulting in errors like 'pyconfig.h: No such file or directory'. And indeed, on my system (Fedora 15) there is a '/usr/include/python3.2mu/pyconfig-64.h', which means that both the build system as well as the boost.python headers need to be adjusted. (Note that this is the first time I attempt to build boost.python with Python3.)

This looks like there is quite a bit more to fix than a single test failure, and I'm not sure I'll have enough time to address this.

comment:5 by Stefan Seefeld, 11 years ago

(sorry, that comment was from me. I hadn't realized I wasn't logged in.)

comment:6 by Ralf W. Grosse-Kunstleve, 11 years ago

Resolution: duplicate
Status: newclosed

Looks like this is a dup of #4994, fixed already in April 2011:

% svn log -v -c71050


r71050 | rwgk | 2011-04-06 14:32:59 -0700 (Wed, 06 Apr 2011) | 1 line Changed paths:

M /trunk/libs/python/src/converter/builtin_converters.cpp

libs/python/src/converter/builtin_converters.cpp: Python 3.2 compatibility, based on patch by Matthew Bradbury, fixes issue #4994


Note: See TracTickets for help on using tickets.