-
Notifications
You must be signed in to change notification settings - Fork 49
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
java.lang.UnsatisfiedLinkError: no scalaz3 in java.library.path #93
Comments
This is not a solution to the build problem, but you can run Leon without using the ScalaZ3 library. You need to install Z3 and add the
|
I ran into the same error a few times, and haven't found a better workaround than the one given by @colder in epfl-lara/ScalaZ3#40, specifically: epfl-lara/ScalaZ3#40 (comment). tl;dr: Make sure you have the ScalaZ3 JAR in
Note that you don't have to build ScalaZ3 yourself, just grab the appropriate .jar from https://github.com/epfl-lara/ScalaZ3/releases, put it in |
Thanks @romac for the suggestion. I downloaded the latest ScalaZ3 and ran the command you suggested: $ scala -Dscalaz3.debug.load=1 -cp unmanaged/64/scalaz3-osx-64b-2.1.1.jar
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> new z3.Z3Wrapper
Extracting lib-bin/libscalaz3.dylib from jar to libscalaz3.dylib...
Extracting lib-bin/libz3.dylib from jar to libz3.dylib...
Loading scalaz3
java.lang.UnsatisfiedLinkError: /private/var/folders/kx/f_xzx22x2hx6vypyfgg8xk4c0000gp/T/SCALAZ3_61f7962552d79e96a73fe47615a6b35d/lib-bin/libscalaz3.dylib: dlopen(/private/var/folders/kx/f_xzx22x2hx6vypyfgg8xk4c0000gp/T/SCALAZ3_61f7962552d79e96a73fe47615a6b35d/lib-bin/libscalaz3.dylib, 1): Library not loaded: /usr/local/lib/gcc/x86_64-apple-darwin13.2.0/4.8.2/libgomp.1.dylib
Referenced from: /private/var/folders/kx/f_xzx22x2hx6vypyfgg8xk4c0000gp/T/SCALAZ3_61f7962552d79e96a73fe47615a6b35d/lib-bin/libscalaz3.dylib
Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at z3.Z3Wrapper.loadFromJar(Z3Wrapper.java:97)
at z3.Z3Wrapper.<clinit>(Z3Wrapper.java:47)
... 33 elided
scala> Indeed, I don't have this gomp library. This is as far as I got trying to build ScalaZ3 locally as described here: The workaround @regb described worked for me with smt-z3 (based on the Z3 I built on my machine) and with the most recent development version of CVC4 (per Victor's suggestion) |
Instructions for building the native z3 interface on OS-X should come soon. In the mean time, I implemented a fix in 8674964 that falls back to SMT-based solvers in case the native API is unavailable. |
A long time has past and many things changed; it is now possible to use ScalaZ3 with Leon (epfl-lara/ScalaZ3#50). This issue should be re-inspected and probably closed. |
Indeed; they have. I built a fresh clone of leon 3.0 today and followed the instructions. For MacOSX, assuming that: then I suggest explaining the following:
Works for me (i.e., it shows that it used the Z3 native library, |
I built leon on my machine (MacOSX Yosemite, 10.10.3)
I see that the leon script includes in the SCALACLASSPATH.
To make it easier to see what's going on, I edited the leon script like this:
Then I get this:
Suggestions?
The text was updated successfully, but these errors were encountered: