ATLauncher: executables 'not found'

These are the only GLX entries I get when running with LD_DEBUG=libs:

[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	find library=libGLX.so.**ACCESSTOKEN** [**ACCESSTOKEN**]; searching
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/6v6k2g45hrxazgbbw3zyv6pl8914**ACCESSTOKEN**v1y-libXxf86vm-1.1.5/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/lsp7hk1ppjv4**ACCESSTOKEN**3q8h191p929wycbk**ACCESSTOKEN**r3-systemd-minimal-libs-255.4/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/msi95r4426zlfbmzr1a9v45b2vgqaail-discord-rpc-3.4.**ACCESSTOKEN**/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/4ja9a94kxjqwm65c5bpnrnsa5rffb**ACCESSTOKEN**ij-glfw-3.4/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/qvacibysn**ACCESSTOKEN**z5478vsbjcs35kh2bpykyk-pipewire-1.**ACCESSTOKEN**.5-jack/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/apab5i73dqa**ACCESSTOKEN**9wx**ACCESSTOKEN**q27b6fbhd1r18ihl-glibc-2.39-31/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:48:44 PM]    1552**ACCESSTOKEN**19:	  trying file=/nix/store/nrwkk6ak3rgkrxbqhsscb**ACCESSTOKEN**1jpzmslf2r-xgcc-13.2.**ACCESSTOKEN**-libgcc/lib/libGLX.so.**ACCESSTOKEN**

Edit: I ran the launcher with:

$ steam-run atlauncher

and the game worked…

Interesting: this should be provided by libglvnd.

That is a reasonable solution; under the hood steam-run runs things in an FHS environment. It’s a bit heavy-handed but usually pretty effective.

1 Like

If this is working, that means there’s some lib missing in the Nix derivation for ATLauncher. I’ll find what’s causing that. Must’ve been something in 3.4.36.3 I guess? I’m guessing you’ve also tried 3.4.36.4?

When running with steam-run, there are more glx libraries, so I guess the ones from mesa get loaded in this case:

Summary
[15/05/2024 17:57:17 PM]    1553887:	find library=libxcb-glx.so.**ACCESSTOKEN** [**ACCESSTOKEN**]; searching
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/6v6k2g45hrxazgbbw3zyv6pl8914**ACCESSTOKEN**v1y-libXxf86vm-1.1.5/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/lsp7hk1ppjv4**ACCESSTOKEN**3q8h191p929wycbk**ACCESSTOKEN**r3-systemd-minimal-libs-255.4/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/msi95r4426zlfbmzr1a9v45b2vgqaail-discord-rpc-3.4.**ACCESSTOKEN**/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/4ja9a94kxjqwm65c5bpnrnsa5rffb**ACCESSTOKEN**ij-glfw-3.4/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/lib64/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libGLX.so.**ACCESSTOKEN** [**ACCESSTOKEN**]
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libGLX_mesa.so.**ACCESSTOKEN** [**ACCESSTOKEN**]
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libxcb-glx.so.**ACCESSTOKEN** [**ACCESSTOKEN**]
[15/05/2024 17:57:17 PM]    1553887:	find library=libGLX.so.**ACCESSTOKEN** [**ACCESSTOKEN**]; searching
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/6v6k2g45hrxazgbbw3zyv6pl8914**ACCESSTOKEN**v1y-libXxf86vm-1.1.5/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/lsp7hk1ppjv4**ACCESSTOKEN**3q8h191p929wycbk**ACCESSTOKEN**r3-systemd-minimal-libs-255.4/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/msi95r4426zlfbmzr1a9v45b2vgqaail-discord-rpc-3.4.**ACCESSTOKEN**/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/4ja9a94kxjqwm65c5bpnrnsa5rffb**ACCESSTOKEN**ij-glfw-3.4/lib/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/lib64/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	calling init: /lib64/libGLX.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	find library=libGLX_mesa.so.**ACCESSTOKEN** [**ACCESSTOKEN**]; searching
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/6v6k2g45hrxazgbbw3zyv6pl8914**ACCESSTOKEN**v1y-libXxf86vm-1.1.5/lib/libGLX_mesa.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/lsp7hk1ppjv4**ACCESSTOKEN**3q8h191p929wycbk**ACCESSTOKEN**r3-systemd-minimal-libs-255.4/lib/libGLX_mesa.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/msi95r4426zlfbmzr1a9v45b2vgqaail-discord-rpc-3.4.**ACCESSTOKEN**/lib/libGLX_mesa.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/4ja9a94kxjqwm65c5bpnrnsa5rffb**ACCESSTOKEN**ij-glfw-3.4/lib/libGLX_mesa.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/lib64/libGLX_mesa.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	find library=libxcb-glx.so.**ACCESSTOKEN** [**ACCESSTOKEN**]; searching
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/6v6k2g45hrxazgbbw3zyv6pl8914**ACCESSTOKEN**v1y-libXxf86vm-1.1.5/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/lsp7hk1ppjv4**ACCESSTOKEN**3q8h191p929wycbk**ACCESSTOKEN**r3-systemd-minimal-libs-255.4/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/msi95r4426zlfbmzr1a9v45b2vgqaail-discord-rpc-3.4.**ACCESSTOKEN**/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/nix/store/4ja9a94kxjqwm65c5bpnrnsa5rffb**ACCESSTOKEN**ij-glfw-3.4/lib/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:17 PM]    1553887:	  trying file=/lib64/libxcb-glx.so.**ACCESSTOKEN**
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libGLX.so.**ACCESSTOKEN** [**ACCESSTOKEN**]
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libGLX_mesa.so.**ACCESSTOKEN** [**ACCESSTOKEN**]
[15/05/2024 17:57:25 PM]    1553887:	calling fini: /lib64/libxcb-glx.so.**ACCESSTOKEN** [**ACCESSTOKEN**]

I’m actually using 3.4.28.1 since I don’t a Microsoft account and I needed to open the game offline. I thought newer versions of the launcher might have the same problem since it didn’t work for @noofel.rouge either. Could this be because I’m running an older version?

Edit: I’ve added libglvnd to the wrapper and now the game works even without steam-run

Okay, that’s good. Was the error occurring when launching the launcher itself or an instance?

It was happening when I launched an instance.

Weird, I’m unable to get an instance running even with 3.4.28.1. I can’t even figure out any more libraries that it needs since the actual Minecraft instances need these libs, and not the launcher. steam-run atlauncher works with all versions.

This is how I’m currently overriding the package:

environment.systemPackages = with pkgs; [
  (atlauncher.overrideAttrs rec {
    pname = "atlauncher";
    version = "3.4.28.1";
    src = fetchurl {
      url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${version}/ATLauncher-${version}.jar";
      hash = "sha256-IIwDMazxUMQ7nGQk/4VEZicgCmCR4oR8UYtO36pCEq4=";
    };
    installPhase = ''
      runHook preInstall
  
      mkdir -p $out/bin $out/share/java
      cp $src $out/share/java/ATLauncher.jar
  
      makeWrapper ${jre}/bin/java $out/bin/${pname} \
        --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm udev discord-rpc libglvnd ]}" \
        --add-flags "-jar $out/share/java/ATLauncher.jar" \
        --add-flags "--working-dir \"\''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher\"" \
        --add-flags "--no-launcher-update"
  
      mkdir -p $out/share/icons/hicolor/scalable/apps
      cp $ICON $out/share/icons/hicolor/scalable/apps/${pname}.svg
  
      runHook postInstall
    '';
  })
];

Without steam-run, the instance I’m running is the vanilla Minecraft 1.20.6 with the following instance settings:

  • General
    • Account Override → Default
    • Enable Discord Integration? → No
  • Java/Minecraft
    • Didn’t touch the Java parameters (openjdk-21+35)
    • Use Java Provided By Minecraft? → No
    • Disable Legacy Launching? → Default
    • Use System GLFW? → No
    • Use System OpenAL? → No
  • Commands → No

I should also note that I have no sound when not running with steam-run, but that’s another issue, I guess.

It looks like what you’ve overridden is the same as what I’ve done.

Some differences I can note at first glance are:

  • I’m not putting ATLauncher in my system, rather in my home.
  • I’m using a custom HM module for ATLauncher but it doesn’t exactly add anything too different.
  • Sound works for me.

Just to confirm, you’re on X11, right?

All right so I ditched my custom HM module and copy pasted what you sent, this time I’ve gotten logs which were not there before for whatever reason:

[16/05/2024 00:36:20 am] Could not start dynamically linked executable: **USERSDIR**/runtimes/minecraft/java-runtime-delta/linux/java-runtime-delta/bin/java
[16/05/2024 00:36:20 am] NixOS cannot run dynamically linked executables intended for generic
[16/05/2024 00:36:20 am] linux environments out of the box. For more information, see:
[16/05/2024 00:36:20 am] https://nix.dev/permalink/stub-ld
[16/05/2024 00:36:20 am] Oh no. Minecraft crashed. Please check the logs for any errors and provide these logs when asking for support.

Given that ATLauncher isn’t working even on older versions which were confirmed to be working on NixOS, I suspect that updates to its dependencies have caused it to fail.

Yup.

This means that ATlauncher is trying to load its java runtime, which won’t work. Just choose the jre from the nix store in your settings:

That worked for me. Though I’m worried that anyone using this package would run into this issue and may not always know the fix for it. But there’s no real way to solve this declaratively without using NixOS modules AFAIK.

Perhaps it’s possible to patch out the logic that downloads the jre in the first place, but what we can currently do is add this information to the Wiki, at least.

A patch might be quite difficult; though, I’ll ask the upstream dev of a possible patch. But yes, we should add this to the Wiki sometime soon.

A more trivial solution would be to set these version mapping manually in the package or a NixOS module according to what you’ve mentioned earlier:

1 Like

I fixed the sound issue by adding alsa-lib. I also tried with pulseaudio and it works. I’m using pipewire, by the way, but I think adding those two would be better for compatibility reasons.

It would be nice if a way to bypass all java declarations would be introduced in upstream.
Some thing like atlauncher --javapath.

Edit: It would actually be better if we could define multiple ones, like how prismlauncher does with it
PRISMLAUNCHER_JAVA_PATHS, so we could do something like this:

1 Like

prismlauncher works really well, i just use it now, works perfectly fine.

2 Likes

I’ve added a Wiki entry for this in wait of a fix upstream.

1 Like

A fix for one of the issues mentioned here has been merged to master; anyone is welcome to track its journey to nixos-unstable here.

1 Like