protonscr

Age of Wonders III fails to start: undefined symbol pthread_yield

steamopen 3rd party game
ValveSoftware/steam-for-linux#8459 · opened 2022-03-06 by osce0 · updated 2024-12-24 · 7 comments · github
Oosce0 2022-03-06 github

Your system information

  • Steam client version (build number or date): v020.1 64251672-20220116
  • Distribution (e.g. Ubuntu): Fedora 35 x86_64
  • Opted into Steam client beta?: [Yes/No] No
  • Have you checked for system updates?: [Yes/No] Yes

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist

Steps for reproducing this issue:

  1. click Age of Wonders III and press Play button
  2. Fails to launch, and Play button re-appears

The error message that seems relevant:

ERROR: ld.so: object '...Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
-profile: symbol lookup error: ./libiggy_linux.so: undefined symbol: pthread_yield
Game process removed: AppID 226840 "...Steam/ubuntu12_32/reaper SteamLaunch AppId=226840 -- '...Steam/steamapps/common/AoW3/AoW3Launcher.run' ./AoW3Launcher.sh", ProcID 17128

I'm guessing something to do with the game not compatible with newer glibc-2.34-25 that separates out pthread. I wonder if re-packaging with detecting newer glibc and doing workaround will fix this.

Kkisak-valve maintainer 2022-03-06 github

Hello @osce0, this issue should also be mentioned to the game's dev(s).

Oosce0 2022-03-06 github

Here is a request to game dev: https://support.paradoxplaza.com/hc/en-us/requests/247198
Thank you.

Cchdoc 2022-04-19 github

I can confirm the issue on Gentoo Linux x86_64 (after having recently upgraded to glibc-2.34). I can also confirm that the workaround described in this forum post works.

The idea is to create a shim pthread_yield with contents:

extern int sched_yield(void);

int pthread_yield()
{
	return sched_yield();
}

compile it with gcc -m32 -shared -fPIC pthread_yield.c -o pthread_yield.so, copy this into the AoW3 folder (next to AoW3Launcher.sh) and modify the latter by adding the following right before the exec line

# preload shim for >=glibc-2.34
export LD_PRELOAD="pthread_yield.so"

After this, the game starts up normally, although I haven't tried playing yet, as figuring this out took over my playing time...

Sschumischumi 2023-03-19 github

@chdoc I followed your instructions but I get an "wrong ELF class: ELFCLASS32)" error when I compile it with gcc -m32 -shared -fPIC pthread_yield.c -o pthread_yield.so:

ERROR: ld.so: object 'pthread_yield.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
free(): double free detected in tcache 2
Game process removed: AppID 226840 "/home/user/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=226840 -- /home/user/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/user/.local/share/Steam/steamapps/common/AoW3/AoW3Launcher.run' ./AoW3Launcher.sh", ProcID 49653 

If I compile it with gcc -m64 -shared -fPIC pthread_yield.c -o pthread_yield.so I get a similar error but now with the undefined symbol like when I provide no pthread_yield.so at all:

ERROR: ld.so: object 'pthread_yield.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
-profile: symbol lookup error: ./libiggy_linux.so: undefined symbol: pthread_yield
Game process removed: AppID 226840 "/home/user/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=226840 -- /home/user/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/user/.local/share/Steam/steamapps/common/AoW3/AoW3Launcher.run' ./AoW3Launcher.sh", ProcID 49819 

I use fedora 37 with glibc 2.36-9.fc37.
do you have any hints for me?

Bbadpenguin 2023-04-30 github

@chdoc I followed your instructions but I get an "wrong ELF class: ELFCLASS32)" error when I compile it with gcc -m32 -shared -fPIC pthread_yield.c -o pthread_yield.so:

Crosscompiling is not easy, probably you need the libgcc-dev for i386 and probably gcc-multilib installed.
On latest linux mint i had installed today: gcc-multilib libgcc-11-dev:i386

VVyacheslav-S 2023-05-03 github

I can confirm the issue on Gentoo Linux x86_64 (after having recently upgraded to glibc-2.34). I can also confirm that the workaround described in this forum post works.

I can also confirm the issue on Arch Linux x86_64.
I can also confirm that the workaround described in this forum post works.

Aals-creator 2024-12-24 github

you can just run it through a proton, then everything works

image

Nothing extracted yet.