From 22b8459edf27fb40e7e299e694f73a8b8df9c8a4 Mon Sep 17 00:00:00 2001 From: Volker Braun Date: Thu, 9 May 2024 16:20:19 +0200 Subject: [PATCH] Link with -rpath and -rpath-link The former is for the binary, the latter is for dependencies between shared libraries. Only setting -rpath-link does not set the ELF RUNPATH any more on gcc-14, you have to specify -rpath now. This causes some applications to not find their shared libraries (ppl, gfan) --- src/bin/sage-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 61901897bcd..1f37b470b61 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -386,7 +386,7 @@ if [ -n "$SAGE_LOCAL" ]; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" fi if [ "$UNAME" = "Linux" ]; then - LDFLAGS="-Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS" + LDFLAGS="-Wl,-rpath,$SAGE_LOCAL/lib -Wl,-rpath-link,$SAGE_LOCAL/lib $LDFLAGS" fi export LDFLAGS fi