Skip to content

Native dependencies, better behaviour on non-Windows#54

Merged
cgravill merged 3 commits into
masterfrom
nativeDependencies
Jun 11, 2019
Merged

Native dependencies, better behaviour on non-Windows#54
cgravill merged 3 commits into
masterfrom
nativeDependencies

Conversation

@cgravill
Copy link
Copy Markdown
Contributor

Only copy the Windows native dlls when on Windows
Adjust the Homebrew command for where openblas is now

@cgravill
Copy link
Copy Markdown
Contributor Author

Note, for macOS, I've found that the included dylib isn't enough to work on macOS, I get:

Unhandled Exception: System.TypeInitializationException: The type initializer for '<StartupCode$difftestcore>.$Program' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libopenblas' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(liblibopenblas, 1): image not found
   at DiffSharp.Backend.OpenBLAS.BLAS.dnrm2_(Int32* n, Double* x, Int32* incx)
   at DiffSharp.Backend.OpenBLAS.BLAS.dnrm2(Double[] x)
   at DiffSharp.AD.Float64.DV.L2Norm(DV a)

If I instead install with Homebrew:

brew install openblas

(which brew won't link globally "Warning: Refusing to link macOS-provided software: openblas")

then go ahead an link locally in a project

ln -s /usr/local/Cellar/openblas/0.3.6_1/lib/*.dylib .

I get everything working. So the choice seems to be to package more of these files or rely on the end-user.

@erydo I saw that you did some work on this, any suggestions on the best approach?

I'm going to default to leaving it in the end-users responsibility. That's what the last released NuGet did.

@cgravill
Copy link
Copy Markdown
Contributor Author

Merging this to provide a test release.

@cgravill cgravill merged commit b688aaa into master Jun 11, 2019
@cgravill cgravill deleted the nativeDependencies branch June 19, 2019 12:47
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

Successfully merging this pull request may close these issues.

1 participant