protonscr

Errors with libfontconfig with Civilization VI on Arch and Flatpak

steamopen 3rd party game
ValveSoftware/steam-for-linux#6234 · opened 2019-04-21 by antonincms · updated 2022-07-13 · 10 comments · github
3 matching comments, n / p to jump
Aantonincms 2019-04-21 github

Your system information

  • Steam client version (build number or date): April 16, 2019
  • Distribution (e.g. Ubuntu): Arch updated today and Flatpak using Freedesktop runtime 18.08
  • 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:

When I try to play Civilisation VI, the game crashe instantly with this error :

  • Result of steam steam://rungameid/289070
Starting app 289070
>>> Adding process 10627 for game ID 289070
GameAction [AppID 289070, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/<username>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 289070, ActionID 1] : LaunchApp changed task to Completed with ""
ERROR: ld.so: object '/home/<username>/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
./GameGuide/Civ6: symbol lookup error: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
>>> Adding process 10629 for game ID 289070
Game removed: AppID 289070 "", ProcID 10627 
Exiting app 289070
No cached sticky mapping in ActivateActionSet.Installing breakpad exception handler for appid(steam)/version(1555457005)
crash_20190422013103_23.dmp[10626]: Finished uploading minidump (out-of-process): success = yes
crash_20190422013103_23.dmp[10626]: response: CrashID=bp-4b25724e-aba8-48ee-962c-6c7b72190421
crash_20190422013103_23.dmp[10626]: file ''/tmp/dumps/crash_20190422013103_23.dmp'', upload yes: ''CrashID=bp-4b25724e-aba8-48ee-962c-6c7b72190421''

I can upload the dump if it can help.
It looks like very much like this issue : https://github.com/flathub/com.valvesoftware.Steam/issues/95 or this one https://github.com/ValveSoftware/steam-for-linux/issues/5601

Steps for reproducing this issue:

  1. On Arch linux or on another distribution with flatpak, install Steam and Civ VI.
  2. Start steam (native or with runtime) and the game
  3. Enjoy the crash

Temporary circumvention of the error

As temporary fix, and only on steam installed with pacman (natively to archlinux, so), when I start steam with the command LD_PRELOAD=/usr/lib/libfreetype.so steam steam://rungameid/289070 instead of steam steam://rungameid/289070, it works perfectly.
You can also set LD_PRELOAD=/usr/lib/libfreetype.so %command% as custom lauch command.

Kkisak-valve maintainer 2019-04-22 github

Reads like #6194. This issue should also be mentioned to the game devs.

TTTimo 2020-04-24 github

We believe this is a problem with the way Civilization VI is packaged. Your workaround is generally correct though, and this does not reflect a problem with the Steam client.

Here is a longer explanation:

  • Civ 6 packages it's own fontconfig, but omits to package libfreetype.
  • libfreetype is a dependency of fontconfig. One should package either both of them, or none at all.
  • Since the steam runtime provides a matching pair of fontconfig and libfreetype already, it is best to not provide it at all.
  • Civ 6's fontconfig ends up trying to work with steam runtime libfreetype and fails (undefined symbol: FT_Done_MM_Var)
  • Your workaround points fontconfig to your host libfreetype, and it works - for now, mostly out of luck.
Ssouenzzo 2020-09-16 github

After more then 1 year, I still can't easily play this game on linux.

Aantonincms 2020-09-20 github

@souenzzo I opened a ticket, but when they replied I did not had my linux laptop on hand and couldn't give them the required info. I forgot to follow up when I got my laptop, and I don't play on Linux anymore. You could open a ticket on Aspyr support page if you want.

I guess the games works on some distros (maybe only ubuntu 16.04 or something), at the time at least Archlinux and Flatpaks were not working correctly, what distro are you using ?

Ssouenzzo 2020-09-20 github

@antonincms I'm using Arch with steam package from official repository.
The game works with this command:
LD_PRELOAD=/usr/lib/libfreetype.so steam steam://rungameid/289070
But I expect a solution for this.
I have tickes on 2k(5894849) and Aspyr(158178) support.
2k says that 'its Aspyr problem'
Aspyr never give me any response (the last email is the "bug report confirmation" from 09/June)

There is other issues that I want to report, like the "welcome screen" has scaling issues and I can't play internet games with windows. But I don't even know if it's worth reporting, once nobody is working on fix linux issues.

Aantonincms 2020-09-20 github

For my ticket, they ended it with this, after more than one month :

So sorry for the delayed reply. I appreciate your patience.
Glad to hear it! I'll pass this info along to the team.
We will go ahead and close out this ticket. If you run into anymore issues or have any additional questions, please open up a new ticket with us at support.aspyr.com
Have a great day!

It's indeed Aspyr problem, they are the developpers of this port, but you could respond to 2K that aspyr did not answered you, nor fixed the issue in more than one year (my ticket was opened in may 2019) I guess.

Ssouenzzo 2021-05-30 github

Hello , I'm here to prepare an birthday party for this issue.

What should I do in order to get support on this?

I just wanna to be able to download and play the game, without hacking it every time that I need to open.

There is other issues, like the "welcome" screen do not fit in my 1080p screen, so I need to hack again in order to click in "play the game", but to be honest, I don't think that worst my time to report it.

Ssmcv 2021-11-16 github

when I start steam with the command LD_PRELOAD=/usr/lib/libfreetype.so steam steam://rungameid/289070 instead of steam steam://rungameid/289070, it works perfectly.

If possible, please don't use this workaround: setting environment variables in Steam's environment alters how all of your Steam games are launched, and can break other games, for example in ValveSoftware/steam-runtime#476.

You can also set LD_PRELOAD=/usr/lib/libfreetype.so %command% as custom lauch command.

This is a better workaround, because it is more narrowly-targeted to only affect Civ VI, and not other games.

If the equivalent issue appears in future on Debian-derived distributions such as Ubuntu, the equivalent workaround for those distributions would be to set the launch options to:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so.6 %command%

(I think Debian-derived distributions do not have this issue yet, but it's only a matter of time.)

Similarly, on Red-Hat-derived distributions like Fedora it would be:

LD_PRELOAD=/usr/lib64/libfreetype.so.6 %command%

Flatpak using Freedesktop runtime 18.08

Newer versions of the Steam Flatpak app on Flathub (using runtimes newer than 18.08) have their own workaround for this issue.

Note that the Steam Flatpak app on Flathub is not officially supported by Valve.

Unfortunately, we cannot use the same workaround in a "native" (non-Flatpak) installation of Steam, because there's a glibc issue that would make it result in a significant performance penalty.

Hhartmark 2022-06-08 github

Easiest is to edit the Civ6 file and instead of launching the launcher, edit to start Civ6Sub instead, as it is the launcher that requires the libfontconfig.

I have i add that this issue is also on Steam deck of you change the compability mode to Linux runtime.

Ffosskers 2022-07-13 github

Unfortunately even with the fixes advertised in this issue, Civ 6 still fails to properly launch. An initial launcher external to Steam does boot, but when I hit "Play" within it, it crashes with a popup window stating:

An unrecoverable error has occured, and Civilization IV cannot continue.