Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to timadam, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

20

Cobalt

36

Turquoise

11

Cyan

17

Royal

11

Teal

3

Onliners

9 mins

Instant Mix

10 mins

UrbaNebula

28 mins

Dimbeak

30 mins

Jessie

1 hours

Strider

1 hours

NineTnine

2 hours

JeffMOD

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

compiling for linux

[1]

Forums > HL Engine Discussion

06 Apr 18, 11:55
By tschumann
avatar
Member
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 https://github.com/tschumann/sandbot and a user has reported that on their distro they get the following error: "LoadLibrary failed on /home/name/dod2017/dod/./dod/dlls/sandbot.s
o: ./libstdc++.so.6: version `CXXABI_1.3.9' not found"
I've done some digging and it seems like an incompatibility between libstdc++ versions but I have libstdc++.so.6.0.22 and they have libstdc++.so.6.0.24 and https://gcc.gnu.org/onlinedocs/libstdc++/ma
nual/abi.html
says "Binaries with equivalent DT_SONAMEs are forward-compatibile", so I'm not exactly sure what's going on.
06 Apr 18, 14:45
By Bacsu
avatar
Member
The libstdc++.so.6 which is shiped with steam is the problem.

execute strings libstdc++.so.6 | 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:

https://steamcommunity.com/app/221410/discu
ssions/0/350542683198244989/


Maybe this helps.
07 Apr 18, 03:25
By tschumann
avatar
Member
Ah right. I think one of the people having the problem is using HLDS, and sure enough it does ship with its own libstdc++.so.6 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 libstdc++.so.6 is okay.
08 Apr 18, 17:58
By Shepard62700FR
avatar
Member
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:

export LD_LIBRARY_PATH=bin:$LD_LIBRARY_PATH

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 "libstdc++.so.6". 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 "libstdc++.so.6" from your system.

Alternative: You could delete the "libstdc++.so.6" shipped with HLDS/SteamCMD. If it complains about missing file, you could make a symbolic link.
13 Apr 18, 22:21
By tschumann
avatar
Member
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).
[1]

Forums > HL Engine Discussion

Login to Reply

You must be logged in to reply.