Closed dragos closed 6 years ago
Would it be possible to set the @loaderpath
in libz3java
as well? I took a look at the generated Makefile
and it seems that the targets for all
are: shell
, api_dll
and java
. Would decomposing the call to make
into
make shell api_dll
install_name_tool -id @loader_path/libz3.dylib z3/z3-4.5.0/build/libz3.dylib
make java
set the @loader_path
correctly for the java native interface?
There are 3 native libraries that need to be loaded by ScalaZ3, with the following dependencies:
These dependencies are part of the dynamically-loaded libraries, and are resolved by the OS. Even if the JVM has the right
java.library.path
, Mac OS will fail to resolve the dependency fromlibz3java
tolibz3
. The other dependency, fromlibscalaz3
tolibz3
is properly resolved because thedylib
list the dependency as@loaderpath
:Somebody knew something, because this is explicitly set in the Mac part of this build. But it's not done for
libz3java
.The z3 java library, instead:
The workaround seems to be to install Z3 in a place that's part of
DYLD_LIBRARY_PATH
, though relying on this environment variable is discouraged for security reasons.