Godot: Packaging a Godot binary and running it only displays a gray window. #21743

sunnystormy opened this Issue Jan 7, 2017 · 2 comments


None yet

3 participants

sunnystormy commented Jan 7, 2017 edited

Issue description

When running a Godot-based binary that's been packaged, a window will display, but with no content.

Steps to reproduce

Export a Godot project into a fat binary using the X11 export template (non-fat binaries won't even run). Build a package using the below "default.nix" configuration file. Replace the folder and binary names with your own. (It's interesting, because the build process never complains about anything GL-related...)

{stdenv, libX11, libXinerama, libXcursor, libXrandr, freetype, alsaLib, libpulseaudio}:

    stdenv.mkDerivation {
        name = "shader_mats";
        src = ./shadermats.tar;

        libPath = stdenv.lib.makeLibraryPath [

        phases = [ "unpackPhase" "installPhase" ];
        installPhase = ''
            mkdir -p "$out/shadermats"
            cp -r shader_mats "$out/shadermats"
            chmod +x "$out/shadermats/shader_mats"

            patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "$libPath" "$out/shadermats/shader_mats"

            mkdir "$out/bin"
            ln -s "$out/shadermats/shader_mats" "$out/bin/shader_mats"


Upon running from the command line, this error also gets displayed at the top:

ERROR: _load_settings_binary: Corrupted header in binary engine.cfb (not ECFG) At: core/globals.cpp:773.

Created a ticket in the Godot repo here: godotengine/godot#7472

Technical details

  • System: 16.09.1423.b0539b9 (Flounder)
  • Nix version: nix-env (Nix) 1.11.4
  • Nixpkgs version: 16.09.1423.b0539b9

I encounter the exact same thing on my machine that is running NixOS unstable.

However, If I install Godot 2.1.1 stable inside Steam and perform the same steps inside the Steam installed Godot, then the executable works:


Looking at the output of ldd they both use the same linked libraries:

Looking at steam, it seems like @abbradar has most commits in nixpkgs. Any hints on what could be different using a program inside steam?

abbradar commented Jan 10, 2017 edited

A program inside Steam is run in FHS user environments -- that is, something very resembling Ubuntu 12.04. You can try to run your stand-alone executable with steam-run and see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment