Closed F1F88 closed 2 weeks ago
Already tried solutions
change system
ubuntu 18.04 and latest
debian 12
centos
.github\workflows\ci.yml
remove param: '--symbol-files'
change clang to gcc
AMBuildScript
add flag: cxx.linkflags += ['-static-libstdc++']
add flag: cxx.linkflags += ['-static']
change c++14 to c++17
Add metamod
Sometime, although the compiled so file has increased a lot, it has not solved this problem.
$ ldd log4sp.ext.so
ldd: warning: you do not have execution permission for `./log4sp.ext.so'
linux-gate.so.1 (0xf7f5c000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0xf7c00000)
libc.so.6 => /lib/libc.so.6 (0xf7a0a000)
/lib/ld-linux.so.2 (0xf7f5e000)
libm.so.6 => /lib/libm.so.6 (0xf793f000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7e9a000)
$ strings log4sp.ext.so | grep GLIBCXX_3.4.2
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
_ZTINSt6thread6_StateE@@GLIBCXX_3.4.22
_ZNSt6thread6_StateD2Ev@@GLIBCXX_3.4.22
_ZNSt3_V216generic_categoryEv@@GLIBCXX_3.4.21
_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE@@GLIBCXX_3.4.22
_ZNSt28__atomic_futex_unsigned_base19_M_futex_notify_allEPj@@GLIBCXX_3.4.21
_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20
_ZNSt28__atomic_futex_unsigned_base19_M_futex_wait_untilEPjjbNSt6chrono8durationIxSt5ratioILx1ELx1EEEENS2_IxS3_ILx1ELx1000000000EEEE@@GLIBCXX_3.4.21
_ZNSt13runtime_errorC2EPKc@@GLIBCXX_3.4.21
这篇博客谈论到了 '-lstdc++' 参数会导致 '-static-libgcc' 和 'static-libstdc++' 失效。 但是没有解释原因 https://blog.csdn.net/10km/article/details/73130579
Error message
Cause
See the Metamod:Source document
Affected range
Linux system, and the game server's './serverfiles/bin/libstdc++.so.6' file lacks 'GLIBCXX_3.4.20'
If the Linux system's '/usr/lib/libstdc++.so.6' also lacks 'GLIBCXX_3.4.20', then even deleting the game server's './serverfiles/bin/libstdc++.so.6' will not solve this problem
Solution
Before, this problem was left to the user to fix, but I think it should be as ready as possible to use it out of the box, so that users can be more worry-free.
Manual processing solution (keep records)
Compile this project yourself
错误信息
产生原因
详情见 Metamod:Source 文档
受影响的范围
Linux 系统,并且游戏服务器的 './serverfiles/bin/libstdc++.so.6' 文件缺少 'GLIBCXX_3.4.20'
如果 Linux 系统的 '/usr/lib/libstdc++.so.6' 也缺少 'GLIBCXX_3.4.20',那么即使删除游戏服务器的 './serverfiles/bin/libstdc++.so.6' 也无法解决此问题
解决方案
在之前,这个问题留给了用户自己解决,但我认为应该尽量做到开箱即用,让用户更省心。
手动处理方案(保留记录)
方案一
方案二
方案三
自己编译这个项目