|
Boost : |
Subject: Re: [boost] Fwd: Boost.Python build error in 1.58 RC1, 2 and 3 (OK in Beta 1)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-05-06 07:03:01
On Thu, Apr 9, 2015 at 4:00 PM, Stefan Seefeld <stefan_at_[hidden]> wrote:
> On 09/04/15 02:58 AM, Mark Incley wrote:
>> It's Python 3.3.0. In the file c:\Python33\include\fileutils.h there's only
>> the following two fopen functions:
>
> [...]
>
> *Sigh*. It apears the new API was introduced here:
> https://hg.python.org/cpython/rev/ef889c3d5dc6
> That's the price to pay for using non-public APIs...
>
> I have just committed
> https://github.com/boostorg/python/commit/3e405b6fd5db5615bbef241763de070118222ca7,
> which should preserve the new functionality for Python 3.4, and use a
> little workaround for Python 3 < 3.4
This fix doesn't work on Ubuntu 15.04 (python 3.4.3).
libs/python/src/exec.cpp: In function âboost::python::api::object
boost::python::exec_file(boost::python::str,
boost::python::api::object, boost::python::api::object)â:
libs/python/src/exec.cpp:93:31: error: cannot convert âPyObject* {aka
_object*}â to âconst char*â for argument â1â to âFILE* _Py_fopen(const
char*, const char*)â
FILE *fs = _Py_fopen(fo, "r");
If I'm not mistaken, the version check is incorrect, it should be:
#if PY_VERSION_HEX >= 0x03040000
(note that 4 is shifted left for 16 bits, not 20).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk