compiling for linux Created 6 months ago2018-04-06 10:55:41 UTC by tschumann tschumann

Created 6 months ago2018-04-06 10:55:41 UTC by tschumann tschumann

Posted 6 months ago2018-04-06 10:55:41 UTC Post #339223
Anyone got experience with compiling and distributing a Half-Life mod/plugin for Linux and having it work for most distros etc?
I'm working on and a user has reported that on their distro they get the following error: "LoadLibrary failed on home/name/dod2017/dod./dod/dlls/ ./ version `CXXABI_1.3.9' not found"
I've done some digging and it seems like an incompatibility between libstdc++ versions but I have and they have and says "Binaries with equivalent DT_SONAMEs are forward-compatibile", so I'm not exactly sure what's going on.
Posted 6 months ago2018-04-06 13:45:04 UTC Post #339224
The which is shiped with steam is the problem.

execute strings | grep CXX against the steam version and also which is the one of your repo. Then you'll see the problem. It's known and for a quick and dirty fix:

Maybe this helps.
Posted 6 months ago2018-04-07 02:25:06 UTC Post #339229
Ah right. I think one of the people having the problem is using HLDS, and sure enough it does ship with its own whose latest CXXABI is CXXABI_1.3.7
So I guess steamcmd overrides LD_LIBRARY_PATH with its own linux32/ which means the apt-get installed versions don't get loaded?

Incidentally the Steam is okay.
Posted 6 months ago2018-04-08 16:58:19 UTC Post #339253
I had the same situation when porting the dedicated server of Zombie Panic! Source 3.0 (Source 2013) to Linux.

I don't remember if it's gonna 100% identical with HLDS/SteamCMD so I will explain what I did with ZPS 3.0 which is on Source 2013. Basically, you open the shell script that act as launcher with a text editor ("srcds_run"). There should be a line that look like this:


Depending on the Linux distribution that you and you user choose (because not all Linux distributions agrees on the standards), you will have to add to the beginning the path to your system's "". On Debian/Ubuntu IIRC, the path should be "/usr/lib/i386-linux-gnu", so the variable would look something like this:

export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu:bin:$LD_LIBRARY_PATH

Save the file, and it should pickup the "" from your system.

Alternative: You could delete the "" shipped with HLDS/SteamCMD. If it complains about missing file, you could make a symbolic link.
Shepard62700FR Shepard62700FRHalf-Cat is watching...
Posted 6 months ago2018-04-13 21:21:14 UTC Post #339312
Thanks - looked like deleting it worked for the person reporting the issue. Probably time to read up on Linux's .so resolution rules (I naively assumed that it would only look at the path that ldd outputs but it looks closer to Windows' .dll resolution).
You must be logged in to post a response.