This snippet checks for the existence of /usr/lib/libffi.dylib on Darwin and uses it if it is found:
|
(then (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib") |
|
(then ;; Use the libffi that ships with OS X. |
|
(@inc_dirs addObject:"/usr/include/ffi")) |
|
(else ;; Use the libffi that is distributed with Nu. |
|
(@inc_dirs addObject:"./libffi/include") |
|
(@lib_dirs addObject:"./libffi"))))) |
This check always fails on macOS Big Sur because system libraries can no longer be found on the file system. (See, for example, https://developer.apple.com/forums/thread/655588.)
The headers are also no longer in /usr/include -- they can be found in the SDK, if installed. (Try xcrun -show-sdk-path.)
Fixing this would also resolve #97, because the system libffi does provide ffi_prep_closure.
This snippet checks for the existence of
/usr/lib/libffi.dylibon Darwin and uses it if it is found:nu/Nukefile
Lines 63 to 68 in 1b0cd7f
This check always fails on macOS Big Sur because system libraries can no longer be found on the file system. (See, for example, https://developer.apple.com/forums/thread/655588.)
The headers are also no longer in
/usr/include-- they can be found in the SDK, if installed. (Tryxcrun -show-sdk-path.)Fixing this would also resolve #97, because the system
libffidoes provideffi_prep_closure.