Age of Wonders III

Age of Wonders III

Not enough ratings
LINUX - Can't get past the launcher
By Master
A simple fix to a problem, that makes the game crash after the launcher, caused by glibc v. 2.34 and higher.
   
Award
Favorite
Favorited
Unfavorite
Solution
Locate the game folder, usually under STEAM_FOLDER/steam/steamapps/common/AoW3/ or you can right click on the game in your Steam Library and select Manage -> Browse local files.
Create a pthread_yield.c file and edit so that it contains the following text:
//#include <sched.h> extern int sched_yield(); int pthread_yield() { return sched_yield(); }
Then compile it with this line, opening a terminal window in that folder:
gcc -m32 -shared -fPIC pthread_yield.c -o pthread_yield.so

Edit AoW3Launcher.sh so that it contains the following text:
#!/bin/bash rm libfmodevent.so ln -s libfmodevent-4.44.50.so libfmodevent.so rm libfmodeventnet.so ln -s libfmodeventnet-4.44.50.so libfmodeventnet.so rm libfmodex.so ln -s libfmodex-4.44.50.so libfmodex.so rm libicudata.so rm libicudata.so.52 ln -s libicudata.so.52.1 libicudata.so ln -s libicudata.so.52.1 libicudata.so.52 rm libicui18n.so rm libicui18n.so.52 ln -s libicui18n.so.52.1 libicui18n.so ln -s libicui18n.so.52.1 libicui18n.so.52 rm libicuuc.so rm libicuuc.so.52 ln -s libicuuc.so.52.1 libicuuc.so ln -s libicuuc.so.52.1 libicuuc.so.52 rm libQt5Core.so rm libQt5Core.so.5 rm libQt5Core.so.5.3 ln -s libQt5Core.so.5.3.2 libQt5Core.so ln -s libQt5Core.so.5.3.2 libQt5Core.so.5 ln -s libQt5Core.so.5.3.2 libQt5Core.so.5.3 rm libQt5DBus.so rm libQt5DBus.so.5 rm libQt5DBus.so.5.3 ln -s libQt5DBus.so.5.3.2 libQt5DBus.so ln -s libQt5DBus.so.5.3.2 libQt5DBus.so.5 ln -s libQt5DBus.so.5.3.2 libQt5DBus.so.5.3 rm libQt5Gui.so rm libQt5Gui.so.5 rm libQt5Gui.so.5.3 ln -s libQt5Gui.so.5.3.2 libQt5Gui.so ln -s libQt5Gui.so.5.3.2 libQt5Gui.so.5 ln -s libQt5Gui.so.5.3.2 libQt5Gui.so.5.3 rm libQt5Widgets.so rm libQt5Widgets.so.5 rm libQt5Widgets.so.5.3 ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so.5 ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so.5.3 rm libQt5Svg.so rm libQt5Svg.so.5 rm libQt5Svg.so.5.3 ln -s libQt5Svg.so.5.3.2 libQt5Svg.so ln -s libQt5Svg.so.5.3.2 libQt5Svg.so.5 ln -s libQt5Svg.so.5.3.2 libQt5Svg.so.5.3 rm libSDL2.so rm libSDL2-2.0.so.0 ln -s libSDL2-2.0.so.0.2.1 libSDL2.so ln -s libSDL2-2.0.so.0.2.1 libSDL2-2.0.so.0 export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" export LC_ALL="en_US.UTF-8" export USE_EXTERNAL_DXTN_LIB=1 export LD_PRELOAD="pthread_yield.so" exec ./AoW3Launcher
The only thing that changes in this file is the new line "export LD_PRELOAD="pthread_yield.so".


Alternatively
Download https://forumcontent.paradoxplaza.com/public/807815/pthread_yield.c.txt and https://forumcontent.paradoxplaza.com/public/807816/AoW3Launcher.sh.txt, delete ".txt" and copy them in the game folder replacing existing files.
Credits
I merely copied the steps from this post and put them in this guide, so that people who recently switched to Linux, and/or are just not much tech savvy, can find an easy fix to make the game work.
https://forum.paradoxplaza.com/forum/threads/linux-version-crashes-with-libiggy_linux-so-undefined-symbol-pthread_yield.1516350/
5 Comments
nahkamummo 3 Jul @ 11:45am 
Depending on GCC toolchain configuration you might need to use -nodefaultlibs and -nostartfiles in addition to -m32 on amd64 hosts to avoid attempting to link against amd64 objects (which is not necessary for shared library anyhow). Using specific toolchain to target 32 bit 386 e.g. i686-linux-gnu-gcc and friends might be an easy shortcut.

Now the real fun comes from obtaining libssl from rather legacy openssl version 1.0.0.
Master  [author] 12 Jan, 2023 @ 12:26pm 
Aha I see what you mean now! I'll do it, thank you for the suggestion.
sjukomat 12 Jan, 2023 @ 12:24pm 
Or just add the line. Many ways lead to Rome. Was only a recommendation. ;-)
Master  [author] 12 Jan, 2023 @ 12:20pm 
It's already in the code, whether one copies the code or downloads the file. :cta_emo2:
sjukomat 12 Jan, 2023 @ 11:46am 
Thanks, may be you could point out that export LD_PRELOAD="pthread_yield.so" need to be added to AoW3Launcher.sh.