epfl-lara / ScalaZ3

DSL in Scala for Constraint Solving with Z3 SMT Solver
Apache License 2.0
122 stars 34 forks source link

UnsatisfiedLinkError related to libgomp.1.dylib when using OSX binary on 10.9.5 #46

Closed JoshRosen closed 5 years ago

JoshRosen commented 9 years ago

When I try to use the scalaz3-osx-64b-2.1.1.jar binary on OSX, I run into UnsatisfiedLinkError exceptions:

scala -classpath /Users/joshrosen/Downloads/scalaz3-osx-64b-2.1.1.jar
Welcome to Scala version 2.11.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import z3.scala._
import z3.scala._

scala> import z3.scala.dsl._
import z3.scala.dsl._

scala>     val ctx = new Z3Context("MODEL" -> true)
java.lang.UnsatisfiedLinkError: /private/var/folders/0k/2qp2p2vs7bv033vljnb8nk1c0000gn/T/SCALAZ3_61f7962552d79e96a73fe47615a6b35d/lib-bin/libscalaz3.dylib: dlopen(/private/var/folders/0k/2qp2p2vs7bv033vljnb8nk1c0000gn/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/0k/2qp2p2vs7bv033vljnb8nk1c0000gn/T/SCALAZ3_61f7962552d79e96a73fe47615a6b35d/lib-bin/libscalaz3.dylib
  Reason: image not found
  at java.lang.ClassLoader$NativeLibrary.load(Native Method)
  at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
  at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
  at java.lang.Runtime.loadLibrary0(Runtime.java:849)
  at java.lang.System.loadLibrary(System.java:1088)
  at z3.Z3Wrapper.loadFromJar(Z3Wrapper.java:97)
  at z3.Z3Wrapper.<clinit>(Z3Wrapper.java:47)
  at z3.scala.Z3Config.<init>(Z3Config.scala:6)
  at z3.scala.Z3Context.<init>(Z3Context.scala:31)
  ... 33 elided

Maybe this is due to the GCC -> Clang change in 10.9?

romac commented 5 years ago

Closing as I cannot reproduce it anymore. Feel free to re-open if still an issue.