Steam FTL on Linux packed with libstdc++ that's too old.

Discuss problems related to FTL here. If you are having a problem or experiencing a bug PLEASE READ THE "MUST READ" POST.
Post Reply
ChadJoan
Posts: 2
Joined: Fri May 24, 2013 5:54 am

Steam FTL on Linux packed with libstdc++ that's too old.

Post by ChadJoan »

I tried to post this on the getsatisfaction.com site that the forum rules suggested, but the site was very unresponsive (I usually had to click twice to make it do things), the text field for entry was too small to handle respectable bug reports, and I ultimately couldn't do anything because the "continue" button would not respond, despite how many times I clicked on it. Sorry, I have ot use the forum instead. (Good thing I edit my posts in a text editor first!)

Anyhow, here's the bug report itself:

The Steam release of FTL on Linux packages a bunch of library files in "~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/<arch>/lib" and then dynamically links against them when running. This causes problems because the libstdc++.so.6 file provided with FTL is an older version than is required by my graphics drivers. In my case, this causes X to crash and bump me to my KDE login screen. That's very distruptive, because it can lose data held by other programs running in that X session at the time. It also prevents FTL from running at all.

I am running 64-bit Gentoo Linux.

Here's an unhealthy run of FTL:
chad@Hugin ~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data $ LIBGL_DEBUG=verbose ./FTL 2>&1 | tee ftl.log
Loading Arch = amd64
libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL error: dlopen /usr/lib64/dri/r600_dri.so failed (/home/chad/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/amd64/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib64/dri/r600_dri.so))
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL error: dlopen /usr/lib64/dri/swrast_dri.so failed (/home/chad/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/amd64/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib64/dri/swrast_dri.so))
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
No settings file found!
Initializing Crash Catcher...
Initializing Video
Video Initialized
GL_ARB_framebuffer_object not supported.
Opengl version = 1.4 (3.0 Mesa 9.1.2)
Starting audio library...
Audio Initialized!
Resource Loading Failure (or voluntary quit)!
... At this point I ctrl-C, otherwise it will eventually kill my desktop environment. ...

I am on a 64-bit machine, so I moved data/amd64/lib to data/amd64/lib.bak and then made a new data/amd64/lib directory that contains only symlinks. At that point I did a pick-and-choose depending on which libraries I felt should be loaded from the game and which should be loaded from my system.
Here's my fixed up data/<arch>/lib directory:
chad@Hugin ~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data $ ls amd64/lib -l
total 0
lrwxrwxrwx 1 chad chad 21 May 24 01:25 libIL.so.1 -> ../lib.bak/libIL.so.1
lrwxrwxrwx 1 chad chad 22 May 24 01:25 libILU.so.1 -> ../lib.bak/libILU.so.1
lrwxrwxrwx 1 chad chad 23 May 24 01:25 libILUT.so.1 -> ../lib.bak/libILUT.so.1
lrwxrwxrwx 1 chad chad 24 May 24 01:27 libSDL-1.2.so.0 -> /usr/lib/libSDL-1.2.so.0
lrwxrwxrwx 1 chad chad 21 May 24 01:25 libbass.so -> ../lib.bak/libbass.so
lrwxrwxrwx 1 chad chad 24 May 24 01:25 libbassmix.so -> ../lib.bak/libbassmix.so
lrwxrwxrwx 1 chad chad 25 May 24 01:26 libfreetype.so.6 -> /usr/lib/libfreetype.so.6
lrwxrwxrwx 1 chad chad 24 May 24 01:25 libpng12.so.0 -> ../lib.bak/libpng12.so.0
lrwxrwxrwx 1 chad chad 23 May 24 01:26 libstdc++.so.6 -> /usr/lib/libstdc++.so.6
lrwxrwxrwx 1 chad chad 16 May 24 01:29 libz.so.1 -> /lib64/libz.so.1

With my new library directory humming along nicely, I am able to run the game. (Honestly I haven't tried gameplay yet. I am about to go to bed and then go to work tomorrow, and playing FTL would probably be exclusive to both of those activities. ;) )
Here's a healthy run of FTL:
Loading Arch = amd64
libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL: Can't open configuration file /home/chad/.drirc: No such file or directory.
libGL: Can't open configuration file /home/chad/.drirc: No such file or directory.
Initializing Crash Catcher...
Initializing Video
Video Initialized
Opengl version = 3.0 Mesa 9.1.2
Starting audio library...
Audio Initialized!
Resource Preload: 8786
Initializing animations...
Animations Initialized!
Loading Ship Blueprints....
Blueprints Loaded!
Initializing Sound Data....
Generating world...
Loading achievements...
Loading score file...
Running Game!

More useful data; here are the versions of GLIBCXX provided with FTL:
chad@Hugin ~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data $ strings amd64/lib.bak/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_FORCE_NEW

and here are the versions of GLIBCXX available on my system:
chad@Hugin ~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data $ strings /usr/lib/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_DEBUG_MESSAGE_LENGTH

Before I had this particularly fortuitous debugging session, I had given up on running FTL on Linux and was using Windows instead. That's very inconvenient though, and it won't work for players that lack a dual boot. Please help the players!
ChadJoan
Posts: 2
Joined: Fri May 24, 2013 5:54 am

Re: Steam FTL on Linux packed with libstdc++ that's too old.

Post by ChadJoan »

I'll add that it would probably be a lot wiser to only link against your own library if the one on the user's system is incompatible or (more commonly) nonexistant. Repeat the logic for each library. This would, in principle, solve the problem in a way that would stick for all future upgrades of everyone's machines. Of course there may be better ways, because I just came up with that.

HTH.
boa13
Posts: 808
Joined: Mon Sep 17, 2012 11:42 pm

Re: Steam FTL on Linux packed with libstdc++ that's too old.

Post by boa13 »

ChadJoan wrote:The Steam release of FTL on Linux packages a bunch of library files in "~/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/<arch>/lib" and then dynamically links against them when running. This causes problems because the libstdc++.so.6 file provided with FTL is an older version than is required by my graphics drivers. In my case, this causes X to crash and bump me to my KDE login screen. That's very distruptive, because it can lose data held by other programs running in that X session at the time. It also prevents FTL from running at all.
This is a known issue on some Linux distributions. Just remove the libstdc++.so.6 file shipped with FTL, this should solve it for you.

You can probably do the same for libfreetype.so.6, libpng12.so.0, libSDL-1.2.so.0, libz.so.1, which are frequently installed by default on most distributions, or at least are easy to install (just make sure that SDL is recent enough, I think).

You could also do it for libbass.so and libbassmix.so, but BASS is less commonly installed, and less easily obtained (depending on the Linux distribution you are using). Same for libIL.so.1, libILU.so.1, libILUT.so.1 (part of DevIL), which are also less frequently distributed.

I think the FTL devs just wanted to make sure all the needed libraries were available, without having to write detailed instructions / specific installers for every distribution. libstdc++.so.6 is the one that causes most problems in such a setup.
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.
deepdivingspearo
Posts: 1
Joined: Sat Sep 14, 2013 5:32 am

Re: Steam FTL on Linux packed with libstdc++ that's too old.

Post by deepdivingspearo »

boa13 wrote:
ChadJoan wrote:This is a known issue on some Linux distributions. Just remove the libstdc++.so.6 file shipped with FTL, this should solve it for you.
Great tip, that sorted it for me. I had the same issue with Gnome3 on Ubuntu 12.04.
Post Reply