tmp64 / BugfixedHL-Rebased

Bugfixed and improved Half-Life
GNU General Public License v3.0
108 stars 22 forks source link

./libstdc++.so.6: version `GLIBCXX_3.4.20' not found #144

Closed fnede closed 1 year ago

fnede commented 1 year ago

I get this error when I start the server: ./libstdc++.so.6: version GLIBCXX_3.4.20 not found

# strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
CentOS 7
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_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

Is this even compatible with CentOS 7? Thanks in advance

tmp64 commented 1 year ago

Looks like libstdc++ is too old in CentOS 7. I see two options on how to fix this:

  1. Rebuild BugfixedHL-Rebased server on your system so it will target the system libraries. Server doesn't require C++17 (unlike the client) so I think it should work. It may require changing the main CMakeLists.txt to reduce required C++ standard. scripts/BuildRelease.py should help: it automatically runs CMake, builds the target and makes a ZIP file.
  2. Follow this StackOverflow answer to install a newer libstdc++.so.6. You can put it into the server root.
tmp64 commented 1 year ago

Solved by switching from CentOS 7 to Ubuntu 22.04