Closed niko-ng closed 4 months ago
Any updates on this?
Any updates on this?
What do yo mean "update" ? The team of rust-bindgen needs to update their docs. I have provided what should be updated. They havent done it yet. not sure they have seen this issue. If you need to make rust-bindgen work on your openbsd system with version 7.4 or 7.5, then you just have to follow the instructions i detailed above.
I need to install langchainrb basically. I'll follow your setup, many thanks man!
langchainrb
I think this command will work (or something similar)
env LIBCLANG_PATH=/usr/local/llvm17/lib gmake gem install langchainrb
you can also try to run export LIBCLANG_PATH=/usr/local/llvm17/lib
before running gem install langchainrb
Make sure you installed the version 17 of LLVM before, by running pkg_add llvm
.
BTW, I am curious why all those AI projects are running on Ruby, and why you guys are choosing OpenBSD as an OS for your AI stuff ? I love OpenBSD, just didn't know it is used for LLM. Is there a specific reason?
To me Ruby is mankind's greatest achievement so far in programming, and Rails is the best way of organizing it into a web framework. It's like Python's little brother. Same concepts basically, but with a modernized syntax and package system.
Choose OpenBSD for your Unix needs. OpenBSD -- the world's simplest and most secure Unix-like OS. A safe alternatve to the frequent vulnerabilities and overengineering of Linux and related software like NGiNX & Apache (https://openbsd.org/papers/httpd-asiabsdcon2015.pdf), OpenSSL, iptables/nftables, systemd, BIND, Postfix, Docker and so on.
OpenBSD -- the cleanest kernel, the cleanest userland and the cleanest configuration syntax.
The biggest obstacle to OpenBSD is its lack of NVidia drivers, but we're working on it!
Ah nice! Yes I love OpenBSd, the best OS for security and simplicity. I know Ruby a bit and Rails too, from 15 years ago. Nice to see it is still used. I'll give a try to those AI things you are using ;) there was also this guy that had the same issue : https://www.reddit.com/r/rust/comments/1cg82vz/rust_openbsd_and_ruby_gems/
BTW, if the fix works for you, you should talk to the maintainers of langchainrb and tiktoken_ruby because they need to upgrade their build scripts for openbsd (change the LIBCLANG_PATH env var)
We'd take a pr with the doc fix fwiw, but an even better approach might be to teach clang-sys about where libclang is in openbsd
You are right that it is not a rust-bindgen issue, but a clang-sys one.
in fact, llvm-config --libdir
should return the right path and clang-sys should be able to find the lib without the need for the env var LIBCLANG_PATH.
But something is wrong in the setup, at least on my machine, as it looks like there are 2 competing llvm-config on the machine. the old one and the newer one. Seems like an OpenBSD issue too.
In any case, you can update your docs indeed, and clang-sys would have to do the same.
I don't have the time for that right now, nor to open more issues everywhere, nor to make you a PR for your docs.
i just created an issue at clang-sys now.
I did my part which was to locate the issue (that has been mostly affecting rust-bindgen so far, as it is used extensively in the AI ruby ecosystem, apparently). For me it was when compiling rust-rocksdb, which can be also pretty common in general, but not so much on OpenBSD.
Anyway, you can take it in your hands @emilio, or not.
Me i leave you here with that.
closed as https://github.com/KyleMayes/clang-sys/issues/180 was opened. The readme already mentions what to do to point to the right libclang path.
Hello, Since OpenBSD 7.4 the libclang path has changed. users have to make sure they install the port of llvm by running
pkg_add llvm
. And then, depending on the version that was chosen for install, the path for the dynamic library varies. by example, for the 17 version, it should bethis is the solution for all users encountering the error :