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

Unable to load Z3 by default on Mac #4

Open
balasub opened this issue Feb 3, 2022 · 1 comment
Open

Unable to load Z3 by default on Mac #4

balasub opened this issue Feb 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@balasub
Copy link

balasub commented Feb 3, 2022

Running the symbolic execution engine on Mac throws the following exception:

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libz3' or one of its dependencies.

This exception is thrown even though the libz3.dylib and Microsoft.Z3.dll are downloaded through NuGet.

A temporary workaround is to manually export the DYLD_LIBRARY_PATH environment variable with the location of libz3.dylib.

@balasub balasub added the bug Something isn't working label Feb 3, 2022
@siraben
Copy link
Collaborator

siraben commented Feb 24, 2022

In the Nix expression, the following command ensures that the output binary has DYLD_LIBRARY_PATH set.

makeWrapper ${dotnetCorePackages.runtime_5_0}/bin/dotnet $out/bin/formula \
  --add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
  --prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native

@balasub balasub transferred this issue from VUISIS/formula-dotnet Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants