On Wed, 2011-10-12 at 10:40 -0600, Tom Tromey wrote:
Commit 215730cbec40a6fe482fabb7f1ecc3d747f1b5d2 made it so I
can't
build against the F15 GCC:
cc -I/usr/lib/gcc/x86_64-redhat-linux/4.6.0/plugin/include -fPIC -O2 -Wall -Werror -g
-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 -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker
-export-dynamic -c -o gcc-python-option.o gcc-python-option.c
gcc-python-option.c:23:53: fatal error: c-family/c-common.h: No such file or directory
Sorry about this.
This reflects this reorganization of GCC's plugin headers:
http://gcc.gnu.org/viewcvs?view=revision&revision=176741
For those using Fedora, this GCC change was tracked downstream in:
https://bugzilla.redhat.com/show_bug.cgi?id=728011
It seems to have made it into Fedora 15's GCC update stream. I'm using:
gcc-4.6.1-9.fc15.x86_64
and the HEAD version of the plugin builds for me. Looking at the rpm's
changelog it seems this is where it got cherrypicked:
* Thu Aug 04 2011 Jakub Jelinek <jakub(a)redhat.com> 4.6.1-7
...
- fix up c-family headers in gcc-plugin-devel (#728011, PRs
plugins/45348, plugins/46577, plugins/48425)
So this is a fiddly source of incompatibility between different versions
of gcc, alas.
The workaround for now is to grab the raw patch from the commit [1] and
apply it in reverse if need be.
Maybe some kind of configury could be used so that the plugin can
compile against both this version of GCC and against newer ones?
Perhaps. I'm not particularly comfortable with autoconf, but I wouldn't
be opposed to adding a simple such script, if someone on this list is
willing to write one.
Dave
[1]
http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=patch;h=215730...