Execution error (UnsatisfiedLinkError) at jdk.internal.loader.NativeLibraries/load (NativeLibraries.java:-2).
/Users/andersmurphy/.javacpp/cache/dtlvnative-macosx-arm64-0.12.8.jar/datalevin/dtlvnative/macosx-arm64/libjniDTLV.dylib: dlopen(/Users/andersmurphy/.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>
datalevin 9.21 and 9.22 don't seem to work on arm64 MacYou have missing native dependencies
Ah so I need to install libdtlv.dylib separately?
No
brew install libomp llvm
Oh, I missed this. Thought it might be to do with the vector db addition. Thanks for the link I'll have a read.
That fixes it. Thanks for the quick reply!
In the future, we may explore building these as static libs
Nice. It's funny I thought I read the release notes at least twice. But somehow completely missed this [Doc] Vector doc. Note, you may need to install some native dependencies on your system to load Datalevin: OpenMP and Vector Math.
A couple of these are added later.
Did you consider lazy loading the code that depends on these libraries? It is sort of a breaking change now and is only required if you use the vector search, right? I really appreciate that Datalevin didn't have native dependencies until this version
Datalevin has always had native dependencies. For example, the right version of libc is always expected to be on the host system, which is not available by default on system like alpine linux, or a wrong version may be present, e.g. a too new version of ubuntu or too old version of ubuntu.
So "no native dependencies" is an illusion, you were just lucky that you did't have problems before. I have never made such a claim for Datalevin.
Of course, I want to minimize such problems, but everything takes time. This is an open source project and I welcome contributions. People do contribute, e.g. the arm64 linux support was added by someone other than me, and I appreciate that. The solution for this problem is to build our native dependencies entierely statically. But there are a few platforms to support and it took a lot of time to debug things. Some of them are difficult without access to the platform. For example, we do not support vector indexing on Windows at this point, because I don't have a Windows machine to debug this. Besides, my time to work on this is limited.
The message is going to be the same as Rich Hickey's message: this is an open source project. If you need something, work on it. For example, if someone can convert our native dependencies into static libraries, e.g. using musl, that would be great. https://github.com/juji-io/dtlvnative
As to the long term plan, more features will be pushed down to native code, as my goal is to have a world class database and we have to compete with databases written in C/C++/Rust, etc. Eventually, probably all code will be native, e.g. written in jank when it becomes usable.
| So "no native dependencies" is an illusion, you were just lucky that you did't have problems before. I have never made such a claim for Datalevin. Ah then apologies for my ignorance about no native dependencies and congratulations on making my first experience so smooth. Just wanted to point it out in case it was an oversight, but so it was my oversight afterall
It's definitely desirable to keep it that way. Hopefully we can get there soon. It is definitely something I want Datalevin to have for the version 1.0.0. But there are still quite a lot of things to work on before that happens, the big ones are rewriting the rule engine, compression, and so on.
Thanks for all the hard work. I've been having a blast with datalevin in production. Hoping to find the time to contribute more in future.
9.20 works fine
I appreciate all the docs that were written to introduce someone to the library and some of design choices made. While reading, I found a few typos that are not worthy of a MR, but may want to get fixed whenever someone is pushing new commits to the repo.
https://github.com/juji-io/datalevin/blob/master/doc/transact.md?plain=1#L216-L218
(def ava-with-age (d/entity db [:user/handle "ava"]))
If I understand correctly, db should be db2
https://github.com/juji-io/datalevin/blob/master/doc/query.md?plain=1#L155
PostgrSQL => PostgreSQL
https://github.com/juji-io/datalevin/blob/master/doc/search.md?plain=1#L220
search supposes => search purposes ?🙏
Fixed