-
Notifications
You must be signed in to change notification settings - Fork 238
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
Allow .so dynamic libraries on Darwin #534
Conversation
This code is a hack that applied only to Darwin, it collects all required dynamic libraries into a single directory. It does this by listing all library dirs and then linkin all dynamic libraries in them. Before this change, it would link only `*.dylib` files. This was a problem, because (weirdly) a lot of libraries in Nixpkgs actually produce .so even on Darwin (and, weirdly, this somehow works). So we now link `.so` files as well.
For searchability: Fixes
|
This piece of code `ln`s all libraries we might want to link with into a single directory and then hides all previous directories from Cabal. The problem is that this code only `ln`s dynamic libraries, however we might want to link with some library that only comes in a static version. So, `ln` static `.a` libraries too so that they are found when linking.
Oh look, there is already NixOS/nixpkgs#80191. |
bors try |
tryBuild succeeded |
Hi. With However, linking of executables is still broken. Please see https://github.com/maksbotan/nix-hmatrix-repro. If I do
I get this error:
Note that to trigger this error the library must use certain functions from |
LGTM |
See commit.
Not tested, because it causes a massive rebuild, and my computer is incompatible with building GHC.