epfl-lara / ScalaZ3

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

Make all Mac OS dynamic libraries be relocatable #58

Closed dragos closed 6 years ago

dragos commented 6 years ago

In order for Mac OS to correctly load libscalaz3 it needs to be able to find it’s dependencies. They’re libz3 and libz3java. This commit modifies the dependency information in all binaries to use @loader_path, which makes them relative to the calling library (or app). This makes the test suite (and stainless) pass all tests via Z3.

More info: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html#//apple_ref/doc/uid/TP40008306-SW1

Fix #56