I am having trouble loading Datalevin. I installed the native libraries via brew on Macosx according to https://github.com/juji-io/datalevin/blob/master/doc/install.md#native-dependencies https://clojurians.slack.com/archives/C01RD3AF336/p1743174251541709 But still getting error like
Execution error (UnsatisfiedLinkError) at jdk.internal.loader.NativeLibraries/load (NativeLibraries.java:-2).
/Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib: dlopen(/Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib, 0x0001): Library not loaded: libdtlv.dylibHere is my deps jvm config
{:jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"
#_"--enable-native-access=ALL-UNNAMED"
"-Djava.library.path=/Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64"]}
The last one was ai genertated trying to troubleshoot this.
I am running the datalevin 0.9.22Here is the error with none of those jvm config flags loaded
Execution error (UnsatisfiedLinkError) at jdk.internal.loader.NativeLibraries/load (NativeLibraries.java:-2).
/Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib: dlopen(/Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib, 0x0001): Library not loaded: libdtlv.dylib
Referenced from: <2A08DF9A-2B23-309A-B81F-16225AD373AA> /Users/ryan/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib
Reason: tried: 'libdtlv.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibdtlv.dylib' (no such file), 'libdtlv.dylib' (no such file), '/Users/ryan/dev/gbo/libdtlv.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/ryan/dev/gbo/libdtlv.dylib' (no such file), '/Users/ryan/dev/gbo/libdtlv.dylib' (no such file)Here is what it looks like from when I try to install libs
brew install libomp llvm
✔︎ JSON API cask.jws.json [Downloaded 15.0MB/ 15.0MB]
✔︎ JSON API formula.jws.json [Downloaded 31.7MB/ 31.7MB]
Warning: libomp 21.1.5 is already installed and up-to-date.
To reinstall 21.1.5, run:
brew reinstall libomp
Warning: llvm 21.1.5 is already installed and up-to-date.
To reinstall 21.1.5, run:
brew reinstall llvmAnd i rebooted terminal tab
Is this a complication?
your Homebrew is running under Rosetta.
Your Mac is Apple Silicon (arm64), but Homebrew is installed at /usr/local, which is the Intel x86_64 prefix. On Apple Silicon Macs, the native ARM version of Homebrew installs to /opt/homebrew.
This means all packages installed via this Homebrew instance will run under Rosetta 2 (Apple's x86_64 emulation).I am seeing this exact same error on my new Mac. My homebrew is under /opt/homebrew and appears to not be using Rosetta. I see the same error when I try to load dataleven libraries in a require. I am running MacOS Sequoia 15.7.2 on a brand new M3 mac. The library loads in a podman container and on my linux machine, but on the new mac fails with the error: Library not loaded: libdtlv.dylib
You are having different problems. Brand new MacOS may have too new libraries, while some are using rossenta. The CI build machine for 0.9.22 was latest-maosx I believe, but that's half a year ago. The current master branch build with maces-14, which works well on my MacOSX 15.6.1. So Really, it's about the version mismatch. That's the price to pay for going native.
Im trying to migrate my homebrew setup to arm to see if that helps. i am running osx 15.6.1
The one running the new Mac , make sure you read the instructions and install the native dependencies. These are the common dependencies for a dev machine, not something strange.
After migrating homebrew installs and config, it is working for me! 🙌 Thanks for commenting
Yes thank you for the pointer, I was able to brew install the native deps (libomp llvm) and datalevin is now working great on my new Mac.
With recent change to DLMDB, we cut query planning time in half, and also slightly increased query execution speed. JOB benchmark numbers update:
Slightly? It's like 41% improvement 🚀 😅
After tuning the magic numbers of the optimizers a bit, Datalevin now is twice faster than PostgreSQL in JOB benchmark 🙂