8000 java.lang.UnsatisfiedLinkError at MacOS with JavaExample.java · Issue #7640 · Z3Prover/z3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
java.lang.UnsatisfiedLinkError at MacOS with JavaExample.java #7640
Open
@sabrieker

Description

@sabrieker

I executed below commands but couldn't figure out why it fails.

OS: MacOS Sequoia 15.4.1 (24E263)
JDK : java --version
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment Homebrew (build 17.0.2+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.2+0, mixed mode, sharing)

cd /Users/theuser/microsoft
git clone https://github.com/Z3Prover/z3.git
cd /Users/theuser/microsoft/z3
python3 scripts/mk_make.py --java
cd build
make -j4 

cp /Users/theuser/microsoft/z3/examples/java/JavaExample.java .
javac -cp /Users/theuser/microsoft/z3/build/com.microsoft.z3.jar:. JavaExample.java 
java -Djava.library.path=/Users/theuser/microsoft/z3/build/ -cp /Users/theuser/microsoft/z3/build/com.microsoft.z3.jar:. JavaExample

Error Stacktrace

 build % java -Djava.library.path=/Users/theuser/microsoft/z3/build/ -cp /Users/theuser/microsoft/z3/build/com.microsoft.z3.jar:. JavaExample
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Exception in thread "main" java.lang.UnsatisfiedLinkError: no libz3java in java.library.path: /Users/theuser/microsoft/z3/build/
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2429)
	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
	at java.base/java.lang.System.loadLibrary(System.java:1989)
	at com.microsoft.z3.Native.<clinit>(Native.java:17)
	at com.microsoft.z3.Global.ToggleWarningMessages(Global.java:87)
	at JavaExample.main(JavaExample.java:2285)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0