Open balasub opened 2 years ago
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
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.