KZGlobalTeam / cs2kz-metamod

Metamod Plugin for CS2 KZ
GNU General Public License v3.0
116 stars 41 forks source link

Plugin Failing to Load #27

Closed DizzyThermal closed 10 months ago

DizzyThermal commented 10 months ago

I'm not able to get the compiled cs2kz_metamod plugin to load in Metamod:

Compilation Steps:

git clone --recurse-submodules https://github.com/zer0k-z/cs2kz_metamod.git && cd cs2kz_metamod
git submodule update --init --recursive

mkdir build
cd build
python3 ../configure.py --hl2sdk-root "../"
ambuild

cp -rf package/addons/* /path/to/game/csgo/addons/.

Output:

meta list

Listing 1 plugin:
  [01] <ERROR>

Metamod Version Info:

meta version

Metamod:Source Version Information
Metamod:Source version 2.0.0-dev+1256
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: GameDLL (gameinfo.txt)
Compiled on Oct 26 2023 10:57:52
Built from https://github.com/alliedmodders/metamod-source/commit/6ee74f0
Build ID: 1256:6ee74f0
http://www.metamodsource.net/

I've tried using 2.0.0-dev+1225 also, same issue.

Are there any steps that I missed here?

Thank you!

zer0k-z commented 10 months ago

Can you show the output when you try meta retry 1?

DizzyThermal commented 10 months ago
meta retry 1

Error reloading plugin: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by /home/steam/cs2-dedicated/game/csgo/addons/cs2kz/bin/linuxsteamrt64/cs2kz.so

I'm running this inside a docker container (https://github.com/CM2Walki/CS2)

I'm thinking I need to add some development packages to the Dockerfile rebuild. I didn't know about meta retry - thanks!

busheezy commented 10 months ago

You need to build with an older version of glibc. Your game server is older than the machine you're using to compile so the game server can't use the newer libraries.

DizzyThermal commented 10 months ago

You need to build with an older version of glibc. Your game server is older than the machine you're using to compile so the game server can't use the newer libraries.

Yes, this ended up being what I needed to do.. I ended up with a Docker solution to my Docker problem :)

FROM debian:bullseye-slim

LABEL maintainer="dizzythermal@gmail.com"
ARG PUID=1000

RUN set -x \
        # Install, update & upgrade packages
        && apt-get update \
        && apt-get install -y --no-install-recommends --no-install-suggests \
        ca-certificates clang curl git-all locales python3 python3-pip

# Install AMBuild
RUN git clone https://github.com/alliedmodders/ambuild && pip install ./ambuild

# Compile cs2kz
RUN git clone --recurse-submodules https://github.com/zer0k-z/cs2kz_metamod.git \
        && cd cs2kz_metamod \
        && git submodule update --init --recursive \
        && mkdir build \
        && cd build \
        && python3 ../configure.py --hl2sdk-root "../" \
        && ambuild

# Hold Container Open (for Copying)
ENTRYPOINT ["tail", "-f", "/dev/null"]

Then I'd build and run my container:

docker build -t cs2kzbuild .
docker run cs2kzbuild --name cs2kzbuild

The previous command would hang because of the tail in the Dockerfile, but this allows me to copy the content from another shell:

docker cp cs2kzbuild:/cs2kz_metamod/build/package/addons .

Figured I'd leave this here for anyone else who needs it 👍

zer0k-z commented 10 months ago

You should consider using Valve's docker image to build the plugin in the future, it's gonna be the env for most servers: https://gitlab.steamos.cloud/steamrt/sniper/sdk

kmsraidboss commented 10 months ago

I know this is closed but I'm commenting because I'm having the same Failing to Load issue with v0.0.1

I'm not compiling it myself, I'm using the release. Running latest Metamod. Other plugins loading on server fine. Don't see anything in metamod/console.log related to this plugin. If you have a moment, could you please give me an idea of what might be up, if you know? Thank you!

zer0k-z commented 10 months ago

0.0.1 shouldn't contain anything downloadable...? Try the latest prerelease dev build and if it doesn't load, show the response when you do meta retry 1 (assuming the plugin was slot 1)