Closed AlixANNERAUD closed 8 months ago
@thedataking, might this have something to do with #1041?
Not entirely sure what the problem is but it appears that the build is picking up files from both LLVM 14 and 15, e.g.:
/usr/lib/llvm-14/include/llvm/ADT/FoldingSet.h:258:29: error: redeclared with 1 template parameter
258 | template<typename T> struct FoldingSetTrait
| ^~~~~~~~~~~~~~~
In file included from /usr/lib/llvm-15/include/clang/Basic/Diagnostic.h:19,
from /usr/lib/llvm-15/include/clang/AST/NestedNameSpecifier.h:18:
/usr/lib/llvm-15/include/clang/Basic/SourceLocation.h:27:47: note: previous declaration ‘template<class T, class Enable> struct llvm::FoldingSetTrait’ used 2 template parameters
27 | template <typename T, typename Enable> struct FoldingSetTrait;
| ^~~~~~~~~~~~~~~
Can you try to explicitly set the LLVM version like this: LLVM_CONFIG_PATH=llvm-config-15 cargo install c2rust
?
I just confirmed that if you install rustup and the c2rust prerequisites in a pristine ubuntu:23.04
docker image (cd /path/to/c2rust && docker run -it --rm --privileged -v $PWD:/opt/c2rust ubuntu:23.04 /bin/bash
), c2rust builds correctly against LLVM 15.0.7.
Hello, I tried to c2rust with different version of LLVM (13, 14 and 15), but it fails, even with the master branch or the corresponding (
feature/llvm-X
) branch. I get the following errors related toc2rust-ast-exporter
:Is there a version mismatch with llvm ? I didn't test with llvm-11 and llvm-12 though (not in the main ubuntu repository anymore).