On Fri, 2012-02-03 at 17:11 -0200, EmÃlio Wuerges wrote:
Hello, I starting to use the python plugin today.
Hi!
In order to build it, I had to 2 two things:
1) add -fPIC to testcpybuilder.py compile flags. (in the patch)
BTW, what was the
failure?
IIRC, someone emailed me off-list a while back about a similar-sounding
issue, but I can't find the details right now.
2) to use the plugin, I have to add a LD_PRELOAD=libpython2.7.so
I don't know if that was intended, but maybe it would be nice to add a
hint to the README.
That's odd, and unexpected. It's reminiscent of the
problems that
Vinay was reporting here:
https://fedorahosted.org/pipermail/gcc-python-plugin/2011-September/00006...
I'm using ubuntu oneiric ocelot 64bit.
What's the output of the following two commands on your system?
python-config --cflags
python-config --ldflags
python -c "from distutils import sysconfig as sc;
print(sc.get_config_var('CFLAGS'))"
(for reference, on my system:
$ python-config --cflags
-I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv
$ python-config --ldflags
-lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic
$ python -c "from distutils import sysconfig as sc;
print(sc.get_config_var('CFLAGS'))"
-fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv
Also I got some failures in some tests:
253 successes; 4 failures; 1 skipped
Failed tests:
tests/plugin/gc/_gc_selftest
tests/plugin/gimple-walk-tree/dump-all
tests/plugin/gimple-walk-tree/exceptions
tests/plugin/gimple-walk-tree/find-one
make: *** [test-suite] Error 1
Thanks: it looks I messed up some of the test code, and the problems
show up when compiling with -Wformat.
These should be fixed as of 6ef592d9e473eea205b1fad866bebcac40943006