Starting a 32-bit-game with Minigalaxy (or Lutris)

Hi, I am trying to get started with gaming on Linux. Yesterday I installed minigalaxy to install Shadow Tactics: Blades of the Shogun from gog.

I’m failing to start the game.

According to gog, “this game comes with a 32-bit binary only” and “Requires libc6:i386 libasound2:i386 libasound2-data:i386 libasound2-plugins:i386 libstdc++6:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxcursor1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxinerama1:i386 libxrandr2:i386 libxrender1:i386 libglu1:i386 libudev1:i386” on Ubuntu.

So I tried to find out which packages to install on EOS. In an arch wiki article, these were mentioned:
lib32-libstdc++5 from AUR
lib32-libxcursor
lib32-libxrandr

I installed all three. When trying to start the game now (from minigalaxy or from the terminal), I am still having an error:

$ ./start.sh
Running Shadow Tactics: Blades of the Shogun
./Shadow Tactics: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

Do I need to install more libraries? If so, how to find out which ones are the right ones?

Do you have libglvnd installed?

pacman -Qi libglvnd

Hi @pebcak. Yes. libglvnd is installed. When searching with pacman -Ss libglvnd, there also is a 32-bit-version of it (not installed): multilib/lib32-libglvnd 1.4.0-1.

I guess you would need the 32-bit then.

1 Like

When trying to install it, following error occurs:

$ sudo pacman -S lib32-libglvnd
[sudo] Passwort für m...: 
Abhängigkeiten werden aufgelöst …
Nach in Konflikt stehenden Paketen wird gesucht …
Warnung: Abhängigkeits-Zyklus entdeckt:
Warnung: lib32-mesa wird vor seiner Abhängigkeit lib32-libglvnd installiert werden
Warnung: Abhängigkeits-Zyklus entdeckt:
Warnung: lib32-keyutils wird vor seiner Abhängigkeit lib32-krb5 installiert werden

Pakete (35) lib32-brotli-1.0.9-3  lib32-bzip2-1.0.8-2  lib32-curl-7.81.0-1  lib32-e2fsprogs-1.46.5-1
            lib32-expat-2.4.4-1  lib32-icu-70.1-1  lib32-keyutils-1.6.3-1  lib32-krb5-1.19.2-2
            lib32-libdrm-2.4.109-1  lib32-libelf-0.186-2  lib32-libffi-3.4.2-3  lib32-libidn2-2.3.2-1
            lib32-libldap-2.6.1-1  lib32-libpciaccess-0.16-1  lib32-libpsl-0.21.1-1  lib32-libssh2-1.10.0-1
            lib32-libunistring-0.9.10-1  lib32-libunwind-1.6.2-1  lib32-libxcrypt-4.4.27-1
            lib32-libxdamage-1.1.5-1  lib32-libxml2-2.9.12-2  lib32-libxshmfence-1.3-2
            lib32-libxxf86vm-1.1.4-2  lib32-llvm-libs-13.0.0-1  lib32-lm_sensors-1:3.6.0.r41.g31d1f125-1
            lib32-mesa-21.3.5-1  lib32-ncurses-6.3-1  lib32-openssl-1:1.1.1.m-1  lib32-readline-8.1.001-1
            lib32-vulkan-icd-loader-1.2.203-1  lib32-wayland-1.20.0-1  lib32-xz-5.2.5-2  lib32-zlib-1.2.11-3
            lib32-zstd-1.5.2-1  lib32-libglvnd-1.4.0-1

Gesamtgröße des Downloads:               0,98 MiB
Gesamtgröße der installierten Pakete:  249,12 MiB

:: Installation fortsetzen? [J/n] J
:: Pakete werden empfangen …
 lib32-readline-8.1.001-1-x86_64.pkg.tar.zst konnte nicht heruntergeladen werden
 Gesamt ( 1/19)                      1000,9 KiB   261 KiB/s 00:04 [------------------------------------] 100%
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von phinau.de übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von ftp.halifax.rwth-aachen.de übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von mirror.pkgbuild.com übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von de.arch.mirror.kescher.at übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von mirror.chaoticum.net übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von europe.mirror.pkgbuild.com übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von archlinux.thaller.ws übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von mirror.pseudoform.org übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von mirror.f4st.host übertragen : The requested URL returned error: 404
Fehler: Konnte Datei 'lib32-readline-8.1.001-1-x86_64.pkg.tar.zst' nicht von pkg.fef.moe übertragen : The requested URL returned error: 404
Warnung: Konnte einige Dateien nicht übertragen
Fehler: Der Vorgang konnte nicht durchgeführt werden (Konnte manche Dateien nicht übertragen)
Fehler sind aufgetreten, keine Pakete wurden aktualisiert.

You can launch the Welcome app and update/refresh your mirrors.

Then run:

sudo pacman -Syyu

and after that try again:

sudo pacman -S lib32-libglvnd

PS- if you put LANG=C before the command in a terminal, it will give the output in English:
LANG=C sudo pacman -S XXXX

1 Like

All right. lib32-libglvnd is installed. Now the game starts, but closes immediately again.

Thank you a lot for the tip of using LANG=C! This will make my future troubleshootings much easier.

1 Like

Do you start it from a terminal? If so, does it give any error messages? If it does, please post them here so the forummates could have a look.

The output of $ LANG=C ./start.sh --verbose is quite long: https://pastebin.com/6fCP7Y7S

Edit:
Here is the content of start.sh

#!/bin/bash
# GOG.com (www.gog.com)
# Shadow Tactics: Blades of the Shogun

# Initialization
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${CURRENT_DIR}"
source support/gog_com.shlib

# Game info
GAME_NAME="$(get_gameinfo 1)"
VERSION="$(get_gameinfo 2)"
VERSION_DEV="$(get_gameinfo 3)"

# Actions
run_game() {
 echo "Running ${GAME_NAME}"
 cd game
 ./"Shadow Tactics"
}

default() {
  run_game
}

# Options
define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"

# Defaults
standard_options "$@"

I had a look at the pastebin link. Unfortunately I can make neither head nor tail of the message.

Hopefully some other forum member can. Good luck!

What does the player log show?
~/.config/unity3d/Daedalic Entertainment GmbH\Shadow Tactics Blades of the Shogun/Player.log

1 Like

The player log shows:

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Shadow Tactics: xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Stacktrace:


Native stacktrace:

	/run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game/Shadow Tactics_Data/Mono/x86/libmono.so(+0x89917) [0xf5c59917]
	linux-gate.so.1(__kernel_rt_sigreturn+0) [0xf7f8e570]
	linux-gate.so.1(__kernel_vsyscall+0x9) [0xf7f8e549]
	/usr/lib32/libc.so.6(gsignal+0xc8) [0xf786c6e8]
	/usr/lib32/libc.so.6(abort+0x122) [0xf7855407]
	/usr/lib32/libc.so.6(+0x1d2d9) [0xf78552d9]
	/usr/lib32/libc.so.6(+0x2c9bd) [0xf78649bd]
	/usr/lib32/libX11.so.6(+0x371e5) [0xf7d971e5]
	/usr/lib32/libX11.so.6(+0x372aa) [0xf7d972aa]
	/usr/lib32/libX11.so.6(_XEventsQueued+0x70) [0xf7d976c0]
	/usr/lib32/libX11.so.6(_XFlush+0x35) [0xf7d979d5]
	/usr/lib32/libX11.so.6(_XGetRequest+0x6a) [0xf7d9a73a]
	/usr/lib32/libX11.so.6(XNoOp+0x35) [0xf7d858d5]
	/usr/lib32/libGLX_mesa.so.0(+0x37397) [0xf4aaf397]
	/usr/lib32/libGLX.so.0(+0x2a38c) [0xf77a238c]
	./Shadow Tactics() [0x8b9e512]
	./Shadow Tactics() [0x8b9fc76]
	./Shadow Tactics() [0x808c219]
	/usr/lib32/libc.so.6(__libc_start_main+0xed) [0xf7856a0d]
	./Shadow Tactics() [0x80956f9]

Debug info from gdb:

I refuse to debug myself!
No threads.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================


check this out. It looks like the same issue?

1 Like

@KDen Yes, this seems to be exactly the issue.
It’s the first time for me to compile something. I have just looked online how to do that. Is this the right way: https://www.makeuseof.com/compile-install-software-from-source-linux?

Edit: There is no “configure” script, so I can not compile it as described in my link above.

The README.md says: “Compile 32/preload-xinitthreads.so from this repository”. But I do not find a “preload-xinitthreads.so” in the repository. How to compile it then?

all you have to do is download the preload-xinitthreads.c and the Makefile then just type make in the same directory you downloaded them into. It will create a folder callded “32” which will contain the compiled library file

Edit** or just do it all at once from the command line :stuck_out_tongue: curl -o preload-xinitthreads.c https://raw.githubusercontent.com/smcv/workaround-shadow-tactics/master/preload-xi nitthreads.c && curl -o Makefile https://raw.githubusercontent.com/smcv/workaround-shadow-tactics/master/Makefile && make

1 Like

Thanks a lot for your help so far. The game still closes one second after launching. Here is the output from trying to start the start.sh from terminal.
https://pastebin.com/im7jJG5K

And, of course, I have added the option env LD_PRELOAD="/path/to/preload-xinitthreads.so:$LD_PRELOAD" %command% as described in the workaround’s repository. I have added it to “Properties”->“Command flags” in MInigalaxy.

Well that’s a launch option for steam, so if you’re running without steam you’d have to modify it. set your environment variable first then run your start script. So it would be more like this:
LD_PRELOAD="/path/to/preload-xinitthreads.so" ./start.sh

I’m not sure what the :$LD_PRELOAD is for so maybe try with that too?
LD_PRELOAD="/path/to/preload-xinitthreads.so:$LD_PRELOAD" ./start.sh

Edit** Or better yet, you could probably just add that variable to your start script

Trying to run the start script still fails, unfortunately:

$ LANG=C env LD_PRELOAD="game/preload-xinitthreads.so:$LD_PRELOAD" ./start.sh
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Running Shadow Tactics: Blades of the Shogun
ERROR: ld.so: object 'game/preload-xinitthreads.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Set current directory to /run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game
Found path: /run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game/Shadow Tactics
Mono path[0] = '/run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game/Shadow Tactics_Data/Managed'
Mono path[1] = '/run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game/Shadow Tactics_Data/Mono'
Mono config path = '/run/media/markus/Dokumente/kxui/gog/Shadow Tactics Blades of the Shogun/game/Shadow Tactics_Data/Mono/etc'
displaymanager : xrandr version warning. 1.6
client has 10 screens
displaymanager screen (0)(eDP): 1366 x 768

...

./start.sh: line 16: 15842 Aborted                 (core dumped) ./"Shadow Tactics"

Because the output is long, I have shortened it in this post. The complete terminal output can be found here: https://pastebin.com/ufAYWjdD

Now, as @KDen suggested, I added the line env LD_PRELOAD="game/preload-xinitthreads.so:$LD_PRELOAD" to start.sh and saved it as start1.sh. The output of running start1.sh can also be found here: https://pastebin.com/ufAYWjdD (second half of the document).

Are you sure the path is correct?

If the directory game is under your home, then the path should be something like:

/home/username/game/

where username is your username.

Some more info: This is my start1.sh:

#!/bin/bash
# GOG.com (www.gog.com)
# Shadow Tactics: Blades of the Shogun

# Initialization
env LD_PRELOAD="game/preload-xinitthreads.so:$LD_PRELOAD"
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${CURRENT_DIR}"
source support/gog_com.shlib

# Game info
GAME_NAME="$(get_gameinfo 1)"
VERSION="$(get_gameinfo 2)"
VERSION_DEV="$(get_gameinfo 3)"

# Actions
run_game() {
 echo "Running ${GAME_NAME}"
 cd game
 ./"Shadow Tactics"
}

default() {
  run_game
}

# Options
define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"

# Defaults
standard_options "$@"

What I notice when running this script: The last line in the terminal output has changed
from ./start.sh: line 16: 15842 Aborted (core dumped) ./"Shadow Tactics"
to ./start1.sh: line 17: 16091 Aborted (core dumped) ./"Shadow Tactics"

Is there something wrong in this line of the shell script? : “run_game() {