hzqst / metamod-fallguys

It's a metamod plugin for Fall Guys maps in Sven Co-op
MIT License
14 stars 4 forks source link

Crash when compiled from source #6

Open wootguy opened 1 year ago

wootguy commented 1 year ago

The plugins compile ok, but the server won't start when I try using them.

Couldn't load game library "/home/woot/.local/share/Steam/steamapps/common/Sven Co-op Dedicated Server/svencoop/addons/metamod/dlls/metamod.so"
Reason: /home/woot/.local/share/Steam/steamapps/common/Sven Co-op Dedicated Server/svencoop/addons/metamod/dlls/metamod.so: undefined symbol: _Z7__xstatiPKcP4stat
Host_Error: No valid game library could be found!
FATAL ERROR (shutting down): Host_Error: No valid game library could be found!

Uh oh it seems the server has crashed or failed to run (╯°□°)╯︵ ┻━┻

Don't know what that _Z7__xstatiPKcP4stat function could be. I'm using a Lubuntu 22.04 VM to compile.

output.zip

wootguy commented 1 year ago

from discord

just found out why I replaced stat with xstat there. it was a breaking change from glibc between ubuntu-20.04 and 22.04, that "stat" would be compiled into "xstat" in 20.04 or earlier version while kept as "stat" in 22.04 thus metamod.so compiled in ubuntu-22.04 won't work in older distribution.

If compiling and testing in 22.04 then you can replace the xxstat func in osdep.h to fix the crash

__inline int xxstat(char const* const _FileName, struct stat* const _Stat)
{
    return stat(_FileName, _Stat);
}
dobregon96 commented 5 months ago

Couldn't load game library "/home/server/sv/svencoop/addons/metamod/dlls/metamod.so" Reason: /home/server/sv/svencoop/addons/metamod/dlls/metamod.so: undefined symbol: _ZN7procmap13MemorySegment12startAddressEv Host_Error: No valid game library could be found! FATAL ERROR (shutting down): Host_Error: No valid game library could be found!
I also have this problem when my server starts system debian 10.1

hzqst commented 4 months ago

Couldn't load game library "/home/server/sv/svencoop/addons/metamod/dlls/metamod.so" Reason: /home/server/sv/svencoop/addons/metamod/dlls/metamod.so: undefined symbol: _ZN7procmap13MemorySegment12startAddressEv Host_Error: No valid game library could be found! FATAL ERROR (shutting down): Host_Error: No valid game library could be found! I also have this problem when my server starts system debian 10.1

Should've been fixed in the latest commit by changing procmap to static library.