Closed markusalbertgraf closed 1 month ago
Wouldn't it be better to modify extract-lmdb
(change it to access-lmdb
), so that checking OS provided LMDB is done before throwing exception? Right now, this PR checks OS package first. It is possible that Datalevin requires a version of LMDB that is different from the OS provided, for we mostly tracks the master branch of LMDB that would be likely ahead of OS provided ones. It works for you case now by accident.
We will likely add freebsd to the jar as well in the future. We use zig for cross compilation, so it is simple to add a new target at https://github.com/juji-io/dtlvnative . Right now, freebsd is not a cross-compilation target for zig, so we will do that after it becomes so.
Hi,
datalevin 0.9 throws "Unsupported OS FreeBSD" on FreeBSD.
FreeBSD provides a package and a port for lmdb, currently at version 0.9.32.1 see https://www.freshports.org/databases/lmdb/.
This patch checks whether the file liblmdb.so exists in the canonical location and points the system property "lmdbjava.native.lib" at it. If the file does not exist it throws with a reminder to install the package.
I added the function
use-os-package
instead of adding it to the platform detection inextract-lmdb
because it would make the function nameextract-lmdb
misleading.Running
lein test
, all tests pass on FreeBSD 14.0 amd64.