Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carlocab opened this issue Jul 13, 2022 · 0 comments
Open

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

carlocab opened this issue Jul 13, 2022 · 0 comments

Comments

@carlocab
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant