This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Undefined symbol warning_at when loading gcc-python-plugin


On Thu, Sep 13, 2012 at 6:35 PM, David Narvaez
<david.narvaez@computer.org> wrote:
>
> I'm trying to package gcc-python-plugin[0] for Gentoo on amd64, but
> after compiling the python.so library, I cannot load it into gcc as a
> plugin because of the following error:
>
> cc1: error: cannot load plugin
> /var/tmp/portage/dev-util/gcc-python-plugin-0.10/work/gcc-python-plugin-0.10-3.2/python.so
> /var/tmp/portage/dev-util/gcc-python-plugin-0.10/work/gcc-python-plugin-0.10-3.2/python.so:
> undefined symbol: warning_at
>
>
> # nm -C python.so | grep -C 5 warning_at
>                  U warning_at

Not a C++ symbol.

> # nm -C /usr/lib/debug/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.1/cc1.debug
> | grep -C 5 warning_at
> 0000000000c18b50 T warning_at(unsigned int, int, char const*, ...)

A C++ symbol.

Your plugin is expecting a GCC built with C, but you have a GCC built
with C++.  GCC 4.8 will require C++.  In GCC 4.7 it is the default but
is optional.  Quick workaround to build GCC 4.7 with C: configure GCC
4.7 with --diable-build-poststage1-with-cxx.  Otherwise you will need
to build your plugin with C++.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]