touilleMan / godot-python

Python support for Godot 🐍🐍🐍
Other
1.87k stars 142 forks source link

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

Open Andrea-Miele opened 3 years ago

Andrea-Miele commented 3 years ago

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

Andrea-Miele commented 3 years ago

@touilleMan what do you think?

touilleMan commented 3 years ago

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...

Andrea-Miele commented 3 years ago

@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 commented 3 years ago

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