fix(mods): BepInEx_Valheim prevents startup on systems with newer glibc #4788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Installing BepInEx mod for Valheim via the LinuxGSM scripts installs a script called
fix_vh.sh
. In there the required lines of commands are introduced in order to work, as described in https://thunderstore.io/c/valheim/p/denikson/BepInExPack_Valheim/ . However, systems which have programms installed based on newer versions of glibc crash the startup of the server with a lot ofld.so: object 'libdoorstop_x64.so' from LD_PRELOAD cannot be preloaded
readlink: symbol lookup error: /home/XXX/serverfiles/BepInExPack_Valheim/doorstop_libs/libdoorstop_x64.so: undefined symbol: dlopen
Failed to hook dlsym, ignoring it. Error: no such function: dlsym
This causes sometimes to prevent starting the server or if the server starts to load the mod. Starting the Server in Debug mode gives
This error is described in #4149 and #4491 and this pull request fixes them.
fix_vh.sh
usesexport LD_PRELOAD=libdoorstop_x64.so:${LD_PRELOAD}
, as it is used in the original startup scripts of BepInEx_Valheim. However, by this the library is preloaded for every process involved in the startup. In the original startup script this is no issue, since only the server executable is run.I suggest to use the existing
${preexecutable}
varibale to put theLD_PRELOAD
in front of the tmux-execution command, now solely addressing the preload of the library only for the server executable. This solution was tested and gives for the debug commandType of change
Checklist
PR will not be merged until all steps are complete.
develop
branch as its base.Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
Thank you for your Pull Request!