godot-python icon indicating copy to clipboard operation
godot-python copied to clipboard

Statically link libpython to pythonscript.so and embed the standard library + Godot package inside the shared library

Open Andrea-Miele opened this issue 3 years ago • 5 comments

Andrea-Miele avatar Aug 15 '21 18:08 Andrea-Miele

That would fix the problem with the loading of the dinamic libraries that cause export to fail

Andrea-Miele avatar Aug 17 '21 13:08 Andrea-Miele

@touilleMan what do you think?

Andrea-Miele avatar Sep 19 '21 13:09 Andrea-Miele

I don't have any strong opinion about this ;-)

Currently libpython.so and pythonscript.so are separated because they come from two different build steps and I fear it could lead to dyn load error with python if the two are not packaged properly. However pyoxydizer seems to be ablet to statically link everything (libpython and all binary extensions that rely on it) so it should be doable...

touilleMan avatar Sep 19 '21 14:09 touilleMan

@touilleMan I saw that python-build-standalone already have static python libraries ,maybe you can try to see if you can use them

Andrea-Miele avatar Sep 19 '21 14:09 Andrea-Miele

I'm pretty sure the export error is coming from this linking issue because I tested the executable with dependency walker and it resulted that the library couldn't load for missing dependencies

Andrea-Miele avatar Sep 19 '21 14:09 Andrea-Miele