[C++-sig] Runtime errors after trying to use debug Python build with Boost.Python

Adam Preble adam.preble at gmail.com
Mon Feb 13 05:47:00 CET 2012


I am trying to use Python with debug symbols so I can peak into it when I
get runtime errors related to Boost.Python wrappers.  I can't seem to get
this to work.  I think this is more a building thing than anything else so
I figure I'd share what I've done:

1. Acquire the source for Stackless Python 2.6.5.  Mind you, this release
has been working for me standalone.
2. Build Stackless Python, or at least the "relevant parts." I don't have
all the dependencies and according to the instructions, I should find what
I need within in the python and pythoncore projects.  I'm building on
Windows, using the PcBuild project.
3. Copy over python.exe, python26.lib, and the python_d.dll to my Python26
directory.  The build generates everything as python_d.exe, python26_d.lib,
and all that.  I have them all named instead as just python.exe, and
python26.exe; I keep python_d.dll since it seems to look for that
specifically at runtime.
4. I rebuild Boost.Python.  I make sure to specifically overwrite:

boost_python_vc100-mt-gd-1_47.lib
boost_python_vc100-mt-gd-1_47.dll
libboost_python_vc100-mt-gd-1_47.lib

5. I rebuild my project, and launch it.

Along inside Py_Initialize I hit an assert:
Assertion failed: (op->_ob_prev == NULL) == (op->_ob_next == NULL), file
..\Objects\object.c, line 65

I figure the assert doesn't mean anything to anybody, so I hoped instead
you could see my procedure and point out where I botched something.  FWIW,
the debug python.exe otherwise seems to be working fine by itself.  I can
start it up and run some Python scripts through it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20120212/59147c76/attachment.html>


More information about the Cplusplus-sig mailing list