From 175995986337e58e8ceec72d09515332fe363d3a Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Mon, 3 Aug 2020 23:38:57 -0400 Subject: [PATCH] gcc: On darwin, adjust IDs of installed .so files also Turns out that libgccjit gets installed as a .so file, which the gcc builder.sh didn't change: It only touched .dylib files; that means that anything linking in libgccjit.so would receive an "Image not found" error at load time. With this change, we invoke `install_name_tool` on .so files too, adjusting their dynamic linker ID, so that they too can be found. --- pkgs/development/compilers/gcc/builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 45587020844..80e07c7f93f 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -251,7 +251,7 @@ postInstall() { fi if type "install_name_tool"; then - for i in "${!outputLib}"/lib/*.*.dylib; do + for i in "${!outputLib}"/lib/*.*.dylib "${!outputLib}"/lib/*.so.[0-9]; do install_name_tool -id "$i" "$i" || true for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do new_path=`echo "$old_path" | sed "s,$out,${!outputLib},"`