davidmalcolm / gcc-python-plugin

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

python.so: undefined symbol: gcc_location_get_start #178

Open CinLH opened 4 years ago

CinLH commented 4 years ago

I am trying to build the plugin on Ubuntu 18.04. After I install the plugin by runing "make plugin", I trying to run the example as follow:

./gcc-with-python examples/show-docs.py test.c

This output

cc1: error: cannot load plugin /home/cin/python/temp/gcc-python-plugin/python.so
   /home/cin/python/temp/gcc-python-plugin/python.so: undefined symbol: gcc_location_get_start

Environment Ubuntu: 18.04 GCC: 7.4 I install the dependencies by runing:

apt install gcc-7-plugin-dev python-dev python-six python-pygments graphviz
Blealtan commented 4 years ago

In my case, LD_LIBRARY_PATH=gcc-c-api ./gcc-with-python ... would load the plugin correctly.