From c971f6f1ebff8f263ff17ac9dbd777e664e37ed9 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Wed, 19 Sep 2018 02:48:53 +0100 Subject: apple-libunwind: update path to library (#9265) --- .../builtin/packages/apple-libunwind/package.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/apple-libunwind/package.py b/var/spack/repos/builtin/packages/apple-libunwind/package.py index 1aacf98c2b..b77301359a 100644 --- a/var/spack/repos/builtin/packages/apple-libunwind/package.py +++ b/var/spack/repos/builtin/packages/apple-libunwind/package.py @@ -66,10 +66,24 @@ class AppleLibunwind(Package): @property def libs(self): - """ Export the Apple libunwind library + """Export the Apple libunwind library. The Apple libunwind library + cannot be linked to directly using an absolute path; doing so + will cause the linker to throw an error 'cannot link directly + with /usr/lib/system/libunwind.dylib' and the linker will + suggest linking with System.framework instead. Linking to this + framework is equivalent to linking with libSystem.dylib, which + can be confirmed on a macOS system by executing at a terminal + the command `ls -l + /System/Library/Frameworks/System.Framework` -- the file + "System" is a symlink to `/usr/lib/libSystem.B.dylib`, and + `/usr/lib/libSystem.dylib` also symlinks to this file. + + Running `otool -L /usr/lib/libSystem.dylib` confirms that + it will link dynamically to `/usr/lib/system/libunwind.dylib`. + """ - libs = find_libraries('libunwind', - join_path(self.prefix.lib, 'system'), + libs = find_libraries('libSystem', + self.prefix.lib, shared=True, recursive=False) if libs: return libs -- cgit v1.2.3-70-g09d2