-
Notifications
You must be signed in to change notification settings - Fork 381
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
Racket cannot find libidris2_support on Mac M1 #1032
Comments
Trying to reproduce the behaviour in idris-lang#1032. I may have a fix but I need to observe the behaviour first.
Is this #840? |
It looks very similar but I don't understand how to resolve the problem. |
Can you try I have been trying to fix the |
That doesn't help. Same error. But the file exists, see below:
|
Yeah I expect the file is there. But for some reason MacOS is ignoring I don't see how to fix this at the moment so you may want to build via |
Could it be related to this: https://support.apple.com/en-us/HT204899 ? Googling lead me to this issue nteract/nteract#1523 which seems to expose a similar issue. |
This happens because the OSX dynamic library loader has some... bizzare behavior with regards to environment variables. Namely, it has a habit of ignoring them all! As a workaround, move the generated dylib into The proper fix is to patch the Mach-O headers of the dylib using For reference, here is the code for Take a look at |
Moving the dylib into ~/lib. worked. Two tests are failing with the same error though:
and
|
Only these 2? What about |
I missed one, sorry:
|
I did make some progress by putting the library in But then I still got quite a few failures in I am starting to think that the ideal solution may be to generate a |
I made some progress on this: #1219 (comment) However, |
I actually think it's a different thing. The issue is that the produced executable is a shell script which calls the generated binary. The problem is that MacOS System Integrity Protection (SIP) prevents child processes from inheriting environment variables starting with LD_ or DYLD_, so the hello binary will never see the path to the support library. Idris currently has a sort of 'portable' installation, i.e. all installed files are kept in the same location. The Framework solution feels like what a production language would do, Idris feels more experimental at this stage. I would say that past the experimental stage though, you would want some way of installing the libraries required for running Idris programs without modifying LD_LIBRARY_PATH. I don't think many apps would be distributed that way. |
I just tried to install idris2 on my M1 laptop and I could not reproduce the issue. Everything worked fine, except for one thing.
Since we haven't heard of this since August I think we can close it for now and reopen if someone else can reproduce the issue again |
I am having this same issue installing with
|
Can you try |
here is output from commit 98b1062 I had to add the
|
This seems to be the issue |
I have updated my guide for Apple silicon: Building Idris2 for Apple silicon as of August 2022 I encountered a slew of related bugs involving Second, The fix is simple; have the |
For homebrew/cask Racket:
So the dylib needs to be in |
I'm building idris2 on a Mac M1 with Racket. When I run
make bootstrap-racket
, it builds idris2, but then it fails atThe idris2 executable under
/Users/user1/Documents/Idris2-0.3.0/bootstrap/bin/idris2
works though.The text was updated successfully, but these errors were encountered: