Skip to content

steam: game dev tycoon doesn't work #33218

Closed

Description

@sorokin

Issue description

Game Dev Tycoon fails to start. This is the error message:

./gamedevtycoon64-bin: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

Steps to reproduce

Install steam, start Game Dev Tycoon.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.9.71, NixOS, 17.09.git.cae4047 (Hummingbird)

Activity

  1. added
    6.topic: steam
    on Dec 30, 2017
  2. lukateras commented on Dec 30, 2017

    @lukateras
    Member

    Incidentally, I do have Game Dev Tycoon. I'll check why it might not run.

  3. self-assigned this
    on Dec 30, 2017
  4. sorokin commented on Dec 30, 2017

    @sorokin
    ContributorAuthor

    Thank you. I tried that:

    $ git diff -U10
    diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix
    index 73c3ccf6375..4a8e88e939f 100644
    --- a/pkgs/games/steam/runtime-wrapped.nix
    +++ b/pkgs/games/steam/runtime-wrapped.nix
    @@ -8,20 +8,21 @@ assert !(nativeOnly && runtimeOnly);
     let
       runtimePkgs = with pkgs; [
         # Required
         glib
         gtk2
         bzip2
         zlib
         gdk_pixbuf
     
         # Without these it silently fails
    +    xlibs.libX11
         xlibs.libXinerama
         xlibs.libXdamage
         xlibs.libXcursor
         xlibs.libXrender
         xlibs.libXScrnSaver
         xlibs.libXxf86vm
         xlibs.libXi
         xlibs.libSM
         xlibs.libICE
         gnome2.GConf
    

    But it didn't help.

  5. sorokin commented on Jan 2, 2018

    @sorokin
    ContributorAuthor

    Ok. I managed to start it. The problem was that, the startup script start.sh contained the following lines:

      LD_LIBRARY_PATH=./steamIntegration/64
      export LD_LIBRARY_PATH
      paths=(
        "/lib/x86_64-linux-gnu/libudev.so.0" # Ubuntu, Xubuntu, Mint
        "/usr/lib64/libudev.so.0" # SUSE, Fedora
      )
      for i in "${paths[@]}"
      do
        if [ -f $i ]
        then
          ln -sf "$i" ./steamIntegration/64/libudev.so.1
          break
        fi
      done
      exec ./gamedevtycoon64-bin $@
    

    First of all it resets LD_LIBRARY_PATH, and libX11 is found using LD_LIBRARY_PATH. Secondly it does some strange things symlinking libudev.so.0 to libudev.so.1. I don't know why.

    I changed the script so it prepends instead of replace LD_LIBRARY_PATH. And doesn't do any magic with libudev. Even after that libudev failed to load. Therefore I changed runtime-wrapped.nix:

    diff --git a/pkgs/games/steam/runtime-wrapped.nix b/pkgs/games/steam/runtime-wrapped.nix
    index 73c3ccf6375..0a86f5c4c4d 100644
    --- a/pkgs/games/steam/runtime-wrapped.nix
    +++ b/pkgs/games/steam/runtime-wrapped.nix
    @@ -35,21 +36,21 @@ let
         expat
         dbus
         cups
         libcap
         SDL2
         libusb1
         dbus_glib
         libav
         atk
         # Only libraries are needed from those two
    -    libudev0-shim
    +    libudev
         networkmanager098
     
         # Verified games requirements
         xlibs.libXmu
         xlibs.libxcb
         mesa_glu
         libuuid
         libogg
         libvorbis
         SDL
    @@ -82,20 +83,21 @@ let
       overridePkgs = with pkgs; [
         libgpgerror
         libpulseaudio
         alsaLib
         openalSoft
         libva
         vulkan-loader
         gcc.cc
         nss
         nspr
    +    libudev
       ];
     
       ourRuntime = if runtimeOnly then []
                    else if nativeOnly then runtimePkgs ++ overridePkgs
                    else overridePkgs;
       steamRuntime = lib.optional (!nativeOnly) steam-runtime;
     
       allPkgs = ourRuntime ++ steamRuntime;
     
     in stdenv.mkDerivation rec {
    

    I don't know what is the difference between libudev and libudev0-shim. And what the lines I changes really mean. But now Game Dev Tycoon works.

  6. lukateras commented on Jan 2, 2018

    @lukateras
    Member

    The problem was that, the startup script start.sh contained the following lines [...]

    Oh, I see. This will be fixed when #31263 gets in: there are quite a few games that override LD_LIBRARY_PATH. For now, it requires manual patching :-(

  7. sorokin commented on Jan 3, 2018

    @sorokin
    ContributorAuthor

    @yegortimoshenko Are you sure that adding another environment variable is the right way of fixing steam?

    Can't we stop relying on environment (LD_LIBRARY_PATH or whatever) for finding libraries altogether? Can we build regular /usr/lib as other distribution do and have glibc look there?

  8. lukateras commented on Jan 3, 2018

    @lukateras
    Member

    No, unfortunately there is really no way around it. See #31263 (comment).

  9. sorokin commented on Jan 3, 2018

    @sorokin
    ContributorAuthor

    @yegortimoshenko Yes. I know that NixOS disables lookup in /usr/lib for libraries. Can we reenable it? Or can steam environment have a special version of glibc that does lookup in /usr/lib?

    My reasoning is that the more different our chroot environment is from ubuntu's the more problems we have. Having regular /usr/lib and having glibc searching there is a important step for compatibility. (You see what gamedev tycoon does with libudev. Who the hell knows what other games do.)

  10. lukateras commented on Feb 2, 2018

    @lukateras
    Member

    Recent nixpkgs got libva library updated from version 1.7.3 to version 2.0.0 [...]

    This doesn't seem to be some systematic issue with the way we package Steam.

    I think major version bumps that point to the same attribute should be made very carefully, but unfortunately, almost every time something breaks.

    I don't think that libva is included in Steam runtime, but it's rather common for games to rely on packages outside of Steam runtime.

  11. added
    6.topic: steam
    and removed
    6.topic: steam
    on Oct 18, 2018
  12. removed their assignment
    on Dec 16, 2019
  13. stale commented on Jun 13, 2020

    @stale

    Thank you for your contributions.

    This has been automatically marked as stale because it has had no activity for 180 days.

    If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

    Here are suggestions that might help resolve this more quickly:

    1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
    2. Ask on the NixOS Discourse.
    3. Ask on the #nixos channel on irc.freenode.net.
  14. added
    2.status: stale
    on Jun 13, 2020
  15. jonringer commented on Apr 19, 2022

    @jonringer
    Contributor

    Not sure when this was fixed precisely, but I'm able to launch this fine with an nvidia card

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stale6.topic: steam

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions