From b7f2ce9fd86b49a524ee8246d66f32e49c3cc6fa Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 12 Dec 2022 09:13:50 +0100 Subject: [PATCH] Show better error on ./unrealircd start when .so files are missing. And refer to https://www.unrealircd.org/docs/FAQ#shared-library-error --- doc/RELEASE-NOTES.md | 8 +++++++- unrealircd.in | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/doc/RELEASE-NOTES.md b/doc/RELEASE-NOTES.md index 9e7947018..0b56cffc0 100644 --- a/doc/RELEASE-NOTES.md +++ b/doc/RELEASE-NOTES.md @@ -68,7 +68,13 @@ You can help us by testing this release and reporting any issues at https://bugs [`set:max-unknown-connections-per-ip`](https://www.unrealircd.org/docs/Set_block#set::max-unknown-connections-per-ip) is now handled by the new module `max-unknown-connections-per-ip`. This module is loaded by default as well, no changes needed in your configuration file. -* Bump shipped PCRE2 to 10.41, update curl-ca-bundle to 2022-10-11 +* Upgrade shipped PCRE2 to 10.41, curl-ca-bundle to 2022-10-11, + on Windows LibreSSL to 3.6.1 and cURL to 7.86.0. +* After people do a major upgrade on their Linux distro, UnrealIRCd may + no longer start due to an `error while loading shared libraries`. + We now print a more helpful message and link to the new + [FAQ entry](https://www.unrealircd.org/docs/FAQ#shared-library-error) + about it. ### Fixes: * Fix crash when linking. This requires a certain sequence of events: first diff --git a/unrealircd.in b/unrealircd.in index 0f8772ba2..a3b057958 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -42,15 +42,24 @@ if [ "$1" = "start" ] ; then fi @BINDIR@/unrealircd if [ $? -ne 0 ] ; then - echo "=====================================================" - echo "UnrealIRCd failed to start. Check above for possible errors." - echo "If you don't understand the problem, then have a look at our:" - echo "* FAQ (Frequently Asked Questions): https://www.unrealircd.org/docs/FAQ" - echo "* Documentation: https://www.unrealircd.org/docs/" - echo "=====================================================" if [ -r $PID_BACKUP ] ; then mv -f $PID_BACKUP $PID_FILE fi + # Try to be helpful... + if ldd @BINDIR@/unrealircd 2>&1|grep -qF '=> not found'; then + echo "========================================================" + echo "UnrealIRCd failed to start due to missing libraries." + echo "Maybe you need to recompile UnrealIRCd? See" + echo "https://www.unrealircd.org/docs/FAQ#shared-library-error" + echo "========================================================" + else + echo "=====================================================" + echo "UnrealIRCd failed to start. Check above for possible errors." + echo "If you don't understand the problem, then have a look at our:" + echo "* FAQ (Frequently Asked Questions): https://www.unrealircd.org/docs/FAQ" + echo "* Documentation: https://www.unrealircd.org/docs/" + echo "=====================================================" + fi exit 1 fi # Now check if we need to create a crash report.