From b56c83a2f9b22144fc8a635e85b22493a361b3ea Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 31 Jan 2024 23:55:18 +0300 Subject: [PATCH] Documentation: add a note about musl --- Documentation/musl.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/musl.md diff --git a/Documentation/musl.md b/Documentation/musl.md new file mode 100644 index 00000000..4ac8f875 --- /dev/null +++ b/Documentation/musl.md @@ -0,0 +1,15 @@ +# Xash3D FWGS on `musl` + +Xash3D FWGS works on `musl` out of the box. However, the engine doesn't try to differentiate glibc and musl anymore. If you see error similar to: + +``` +Host_InitError: can't initialize cl_dlls/client.so: Error relocating valve/cl_dlls/client.so: __sprintf_chk: symbol not found +``` + +... or you know that the game you're running is linked against glibc, you can try using `libgcompat`, like this: + +``` +$ LD_PRELOAD=/lib/libgcompat.so.0 ./xash3d ... +``` + +It will automatically add the missing symbols that glibc binaries usually need. In the future we might automatically link engine against `libgcompat` for better compatibility with prebuilt or closed-source games, if there will be any use for this.