touilleMan / godot-python

Python support for Godot 🐍🐍🐍
Other
1.89k stars 143 forks source link

Packaged python interpreter binary not executable. Non-standard ld-linux-x86-64.so.2? #311

Open l74d opened 3 years ago

l74d commented 3 years ago

Hi,

I am trying to get godot-Python to run under NixOS, and right now I can pin down the problem to that the Python binary packaged under Addons can not be executed when explicitly called (the godot engine seems to be actually trying to call my system Python interpreter while hard-wiring PYTHONHOME to within the addons path as well, but I think I need to get the packaged binary working first).

In NixOS many binaries are not where they would usually be in other Linux distributions. And with

file build/x11-64/platforms/x11-64/cpython_build/bin/python3.8 # The packaged interpreter

I got

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, with debug_info, not stripped

And the ld-linux-x86-64.so.2 in a NixOS installation is not under /lib64/ but rather places like /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/

I am yet to try patching the binary with tools from the NixOS side, but is it possible to alter the build script here to take into account for non-standard ld-linux-x86-64.so.2 since this doesn't seem to be a problem when I compile simple C projects from source?

touilleMan commented 3 years ago

Hi @l74d

I don't know anything about NixOS, but build/x11-64/platforms/x11-64/cpython_build/bin/python3.8 comes from the python-build-standalone project (this project is responsible for all the CPython compilation)