Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBSD: shared library could not be opened #180

Open
niko-ng opened this issue May 29, 2024 · 0 comments
Open

OpenBSD: shared library could not be opened #180

niko-ng opened this issue May 29, 2024 · 0 comments

Comments

@niko-ng
Copy link

niko-ng commented May 29, 2024

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 be

LIBCLANG_PATH=/usr/local/llvm17/lib
this is the solution for all users encountering the error :

Unable to find libclang: "the `libclang` shared library at /usr/local/lib/libclang.so.8.2 could not be opened: Cannot load specified object"

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.

I leave this here. Hopefully someone will sort it out.
The issue was first reported in rust-bindgen
rust-lang/rust-bindgen#2838

@KyleMayes KyleMayes pinned this issue May 30, 2024
@KyleMayes KyleMayes changed the title update Environment Variables instructions for OpenBSD OpenBSD: shared library could not be opened May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant