immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

Build failed on Ubuntu 2310 with llvm-16.0.6 #1048

Open ahaoboy opened 7 months ago

ahaoboy commented 7 months ago

Using llvm-15 as an alternative option runs successfully. https://github.com/immunant/c2rust/issues/1042

apt install llvm-15 clang-15 libclang-15-dev -y
LLVM_CONFIG_PATH=llvm-config-15 LIBCLANG_PATH=/usr/lib/llvm-15/lib/libclang.so cargo install c2rust

Error log

log,txt

kkysen commented 7 months ago

Hi! You shouldn't need to set LIBCLANG_PATH. Is it still erroring if you don't set that?

ahaoboy commented 7 months ago

Hi! You shouldn't need to set LIBCLANG_PATH. Is it still erroring if you don't set that?

Yes, the default LLVM version for Ubuntu 2310 is 16. When trying to directly use 'cargo install c2rust,' an error occurs. To successfully install it, I need to install LLVM-15 and set the LLVM_CONFIG_PATH.