On Wed, 2011-09-07 at 12:47 +0100, Vinay Sajip wrote:
Some additional data points:
I copied libpython2.7.so to the project directory (which is on my
LD_LIBRARY_PATH), but python.so still can't be loaded because of a
missing symbol _Py_ZeroStruct, which is defined in libpython2.7.so.
However, if I do LD_PRELOAD=libpython2.7.so make, then most things
work correctly: 105 test successes, 4 test failures. So: for some
reason, when running within gcc/cc1, the libpython2.7.so isn't being
loaded, despite being in the cwd and LD_LIBRARY_PATH (+ presumably
known to ld via ldconfig, as /usr/lib/python2.7/config also contains
libpython2.7.so).
I ran tests under strace and ltrace - failure is occurring on a
dlopen('python.so') call.
In addition to the notes in the previous mail, this sounds a little like
this bug report:
http://bugs.python.org/issue4434
though that didn't seem to have a "real" resolution.
BTW, what were the 4 test failures?
Note that the test suite actually runs in two parts, an initial phase
using "run-test-suite.py" which is file-based, followed by a second
phase using "testcpychecker.py", which is based on unittest. My guess
is that only the first phase is run, and it's bailing due to the
failures.
You might want to document that pygments is a requirement for
running
the tests - without it being installed, you get many more failures.
Oops, yes. It
uses it when rendering HTML reports showing code errors.
I've added a note about this to the docs in
ce341908079f1394843262ce4d3885107d000f40
and this should now be visible at:
http://readthedocs.org/docs/gcc-python-plugin/en/latest/basics.html#requi...
Thanks!
Dave