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

Dependent parameters, z3, java.library path #4

Open
xhajnal opened this issue Dec 7, 2016 · 1 comment
Open

Dependent parameters, z3, java.library path #4

xhajnal opened this issue Dec 7, 2016 · 1 comment

Comments

@xhajnal
Copy link
Member

xhajnal commented Dec 7, 2016

Selecting dependent parameters on run parameter synthesis in \biodivine-GUI results in error:
"
PID: 10288
Exception in thread "main" java.lang.UnsatisfiedLinkError: no libz3java in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.microsoft.z3.Native.(Native.java:14)
at com.microsoft.z3.Context.(Context.java:37)
at com.github.sybila.ode.generator.smt.Z3Kt.(z3.kt:10)
at com.github.sybila.ode.generator.smt.SMTOdeFragment.(SMTOdeFragment.kt:18)
at com.github.sybila.biodivine.exe.MainKt.main(Main.kt:96)
"
Please change java.library path in code

@daemontus
Copy link
Member

This comment is a set of proposed solutions, becasue this turns out to be a bigger problem than expected.

What we need: Each process has it's own copy of the shared z3 library (necessary for parallel execution) because of file locking.

The "No fix" solution

We say that each user has to figure out on their own how to properly link their z3 with biodivine.
Upside: No work for us.
Downside: Crappy user experience. Possible version and parallel execution problems.

The "Bundled Z3" solution

We bundle a Z3 executable (.dylib, .dll, .so) with the distribution and add the APP_HOME modifier to the startup script.
Upside: Easy to cover most users (ubuntu, windows) + one vanilla "no fix" binary. We control the z3 version (z3 has bugs!).
Downside: Platform dependant distributions. OS X is a special snowflake (see [1])

The "Build your own" solution

We don't bundle anything, but we require the user to copy the shared binaries into a specific directory.
Upside: Less work than bundling, but similar effect.
Downside: We don't control z3 version. User has to build. OS X still won't work.

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

No branches or pull requests

2 participants