davidmalcolm / gcc-python-plugin

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

cannot load plugin python.so #117

Open wr18768458295 opened 6 years ago

wr18768458295 commented 6 years ago

Hello David, There‘s a problem when I use latest version: cannot load python.so (System Details: Ubuntu 14.04 LTS, gcc 4.8, python 2.7.6): First use "make" command,the output is: 310 successes; 4 failures; 0 skipped Failed tests: test/cpychecker/absinterp/comparisions/conditionals tests/plugin/compound-locations tests/plugin/rich-location tests/plugin/rtl make: *** [test-suite] Error 1

then use "gcc -fplugin=python.so -fplugin-arg-python-script=.py .c",the output is: cc1: error:cannot load plugin python.so (python.so have been moved to usr/lib/gcc/x86_64linux-gun/4.8/plugin folder)

fHachenberg commented 6 years ago

Does it work if you manually set LD_LIBRARY_PATH? Like so:

LD_LIBRARY_PATH=usr/lib/gcc/x86_64linux-gnu/4.8/plugin gcc -fplugin=python.so -fplugin-arg-python-script=**.py **.c