On Thu, Sep 13, 2012 at 6:35 PM, David Narvaez <david.narvaez@xxxxxxxxxxxx> 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