Closed cipherchabon closed 3 years ago
FWIW, my libclang.so
location is at /usr/lib/libclang.so
and it works for me, so you could try linking to it and retrying.
I finally solved it this way:
const LINUX_LLVM_PATHS: [&str; 1] = ["/usr/lib/llvm-6.0/lib/libclang.so"];
Reopened this since you shouldn't have to edit Rid to solve this. Sorry I didn't see the issue earlier.
I'm surprised it didn't find your installation since "/usr/lib/llvm-6.0/lib/"
is in the array of LLVM search paths, see below:
const LINUX_LLVM_PATHS: [&str; 6] = [
"/usr/lib/llvm-6.0/lib/",
"/usr/lib/llvm-9/lib/",
"/usr/lib/llvm-10/lib/",
"/usr/lib/llvm-11/lib/",
"/usr/lib/",
"/usr/lib64/",
];
These paths are passed to ffigen see configuration llvm-paths
in which it looks for libclang.so
among others.
Maybe something isn't working correctly there?
Alternatively we could provide the path to the actual library file as in:
const LINUX_LLVM_PATHS: [&str; 6] = [
"/usr/lib/llvm-5.0/lib/libclang.so",
"/usr/lib/llvm-9/lib/libclang.so",
"/usr/lib/llvm-10/lib/libclang.so",
"/usr/lib/llvm-11/lib/libclang.so",
"/usr/lib/libclang.so",
"/usr/lib64/libclang.so",
];
Could you try if that works? If so we can PR with that change and fix it for everyone.
I just tested it and it works.
Solved in https://github.com/thlorenz/rid/pull/18
I am trying to run on linux the examples and I get this error:
The llvm path is:
I set the LINUX_LLVM_PATHS const en the
rid-build/src/ffigen/host_props.rs
file:I appreciate any help!!