Building the plugin on OS X (was Re: The Include Macro)

Nicholas Pasternack nicholas.pasternack at verizon.net
Wed Apr 25 20:46:09 UTC 2012


I have a new problem:

#include <gcc-plugin.h>
  The stderr was:
    config-tests/00001-checking-for-gcc-plugin.h/feature-test.c:1:24: error: gcc-plugin.h: No such file or directory

I can fix this error for the building of the plugin by putting gcc-plugin.h in the same directory that the file I'm compiling is in.  This does not work for the  config-tests directory as it is generated every time I run the makefile.  Do you know of a way to bypass this config-tests phase, or better yet, just skip right to the building of the plugin?

Nick

On Apr 17, 2012, at 5:27 PM, David Malcolm wrote:

> On Mon, 2012-04-16 at 19:48 -0400, Nicholas Pasternack wrote:
>> Hello Dave,
> 
>> The new makefile does not work; I tried it on the current release of
>> the plugin and the version of the plugin I made last time.  I figured
>> out how to fix the arch command on the macports version of gcc.  
> 
>> The new makefile gives the following errors during the
>> test_module_with_type and test_simple_compilation phase: 
> These tests are within testcpybuilder.py, which is run very early during
> the build.  This is a selftest that verifies that the cpybuilder Python
> code generates sane C code.  It looks like the code that compiles the C
> code isn't working.  This uses its own code to compile C; see the
> compile_src method within testcpybuilder.py fwiw.
> 
> Given that this selftest isn't relevant unless you're hacking on
> cpybuilder.py you could hack around this by removing the
> "testcpybuilder" target from the "all" target within the Makefile and
> see how much further you get.
> 
>>>> Stderr:
>>    Undefined symbols for architecture i386:
>>      "_PyType_Ready", referenced from:
>>          _initmodule_with_type in ccGOhJyC.o
> 
> My notes from PyCon suggest that adding
>   -undefined dynamic_lookup
> to the linker flags may help fix linker errors like this.  You may need
> to do this by passing this:
>  -Wl,-undefined,dynamic_lookup
> to gcc (not sure).
> 
> [...snip similar linker errors...]
> 
> Hope this is helpful
> Dave
> 
> _______________________________________________
> gcc-python-plugin mailing list
> gcc-python-plugin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/gcc-python-plugin



More information about the gcc-python-plugin mailing list