davidmalcolm / gcc-python-plugin

GCC plugin that embeds CPython inside the compiler
GNU General Public License v3.0
197 stars 58 forks source link

does not build on fedora 21 #104

Closed davidmalcolm closed 7 years ago

davidmalcolm commented 7 years ago

I tried to build git master (33d88ce2549d4888cf617281d15777b94f5915af) on fedora 21. I got:

{{{ cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include -I/usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c In file included from gcc-callgraph.c:29:0: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘bool gimple_store_p(gimple)’: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2346:36: error: is_gimple_reg’ was not declared in this scope return lhs && !is_gimple_reg (lhs); ^ /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h: In function ‘tree_node* gimple_call_fndecl(const_gimple)’: /usr/lib/gcc/x86_64-redhat-linux/4.9.2/plugin/include/gimple.h:2559:54: error: gimple_call_addr_fndecl’ was not declared in this scope return gimple_call_addr_fndecl (gimple_call_fn (gs)); ^ }}}

From gcc-callback.c:

{{{

if (GCC_VERSION >= 5000)

include "gimple-expr.h"

endif

}}}

Unconditionally including gimple-expr.h made it build for me, but I don't know if that is a viable generic fix.

The resulting plugin did not completely pass its tests, though the differences seem minor.

davidmalcolm commented 7 years ago

Imported from trac issue 63. Created by tromey on 2015-05-20T10:59:59, last modified: 2015-11-21T22:32:00

davidmalcolm commented 7 years ago

Trac comment by tromey on 2015-11-21 22:32:00:

This is fixed on github.