Godot export will not run (ldd ... x => not found)

Hello, I am still pretty new to NixOS. I just installed godot through my configuration.nix, I have git cloned my game and opened it in godot, all of that works fine, I can even play the game by clicking the play button.

My issue is that when I try to export the game it will create a binary, but when I try to run it, my shell will say “zsh: no such file or directory: ./Client.x86_64”. I have then tried to use ldd on the file and get the following output

        linux-vdso.so.1 (0x00007ffcf3edb000)
        libc.so.6 => /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6 (0x00007f6f52092000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib64/ld-linux-x86-64.so.2 (0x00007f6f52253000)
        libXcursor.so.1 => not found
        libXinerama.so.1 => not found
        libXrandr.so.2 => not found
        libXrender.so.1 => not found
        libX11.so.6 => not found
        libXi.so.6 => not found
        libasound.so.2 => not found
        libpulse.so.0 => not found
        libGL.so.1 => not found
        libpthread.so.0 => /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libpthread.so.0 (0x00007f6f5206f000)
        libdl.so.2 => /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libdl.so.2 (0x00007f6f5206a000)
        libm.so.6 => /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libm.so.6 (0x00007f6f51f27000)

I am really not sure what to do and what this means. Is it my system that can’t find these libraries? Is it because the game have not been compiled with them? If someone could help that would be much appreciated :slight_smile:

1 Like

You have a pre-compiled binary. You’ll most likely need to use something like patchelf to make binary find what you want.

Other alternative is to use the steam-run hack, which will launch the process in it’s own FHS environment

nix-shell -p steam-run --run stream-run ./game

This thread seems to cover a steam-run as well as a derivation- & patchelf-based approach, maybe that’s helpful.

Here is a packaged Godot game. steam-run works also.


1 Like

Thanks a lot for the comments :smiley: it works with steam-run