Hi Dave,
Thanks for your response. On my machine (32-bit build), I find that cfun is in
/usr/lib/gcc/i686-linux-gnu/4.6/cc1
How are you invoking the plugin?
Actually I was trying "import ctypes; lib =
ctypes.cdll.LoadLibrary('python.so')" when I got the cfun error. Now I
realise I can't do this, because some of the symbols are in the compiler itself. If I
run "make" (after "make plugin" completed without errors), I get a
load error because of failure to find a different symbol: _Py_ZeroStruct.
However, this symbol is in /usr/lib/python2.7/config/libpython2.7.so, so it's hard to
see what's going on. I checked that the 2.7 headers are included and the 2.7 library
is linked against in the "make plugin" step - all looks OK.
I've set LD_LIBRARY_PATH to
/usr/lib/python2.7/config:$HOME/projects/gcc-python-plugin, but that makes no difference
to what I'm seeing.
By the way, there's one more thing I had to change: c-common.h is not on the default
include path on Ubuntu, so I had to change #includes to "c-family/c-common.h" in
a couple of C files and the autogenerator Python script.
Hope this is helpful
Definitely.
Thanks,
Vinay Sajip