Skip to content

System libraries are no longer in the file system on macOS Big Sur #100

Description

@carlocab

This snippet checks for the existence of /usr/lib/libffi.dylib on Darwin and uses it if it is found:

nu/Nukefile

Lines 63 to 68 in 1b0cd7f

(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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions