From 068ddf4513281c0aa183552273b3b9a811b78263 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 20 May 2021 19:41:45 +0100 Subject: [PATCH] Ports: Add build completion sanity check to .port_include.sh Simply by checking whether a built libc.so exists, we should be able to avoid strange build errors where that's not the case and just tell the user upfront. Fixes #7309. --- Ports/.port_include.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 9a1c1bd8a8..dea3f333d1 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -50,6 +50,15 @@ host_env() { enable_ccache } +# Sanity check. +if [ ! -f "${DESTDIR}/usr/lib/libc.so" ]; then + echo "libc.so could not be found. This likely means that SerenityOS:" + echo "- has not been built and/or installed yet" + echo "- has been installed in an unexpected location" + echo "The currently configured build directory is ${SERENITY_BUILD_DIR}. Resolve this issue and try again." + exit 1 +fi + packagesdb="${DESTDIR}/usr/Ports/packages.db" . "$@"