Open pgillet opened 3 years ago
I'm currently trying to transpile a project that includes xxHash and am running into the same error using the latest version of c2rust (39be293c50235b169a76e38203865c4e60378235).
git clone https://github.com/Cyan4973/xxHash
cd xxHash
intercept-build make
../c2rust/target/debug/c2rust transpile compile_commands.json
warning: Missing child 187651756699440 of node AstNode { tag: TagCompoundStmt, children: [Some(187651756695832), Some(187651756696168), Some(187651756696320), Some(187651756697368), Some(187651756697608), Some(187651756697728), Some(187651756699440), Some(187651756700056), Some(187651756700256)], loc: SrcSpan { fileid: 1, begin_line: 3995, begin_column: 5, end_line: 4034, end_column: 5 }, type_id: None, rvalue: LValue, macro_expansions: [], macro_expansion_text: Some("XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX)"), extras: [] }
Exported Clang AST was invalid. Check warnings above for unimplemented features.
--> /home/ubuntu/xxHash/xxhash.h:3995:5
[-Wclang-ast]
thread 'main' panicked at 'Could not find CStmtId(5811) in TypedAstContext', c2rust-transpile/src/c_ast/mod.rs:240:38
There are many similar warnings so I just included the first one for brevity. Two blocks of code are causing the warnings:
I see #229 is also related to xxHash. I'm running c2rust on macOS from inside an Ubuntu VM. I'm able to transpile lz4 without -fno-blocks
, so some versions of xxHash seem to work.
I am having the same issue when trying to transpile a codebase which uses OpenMP
, using gcc-9.4.0 on linux.
Once I removed OpenMP
, it transpiles.
在尝试在 linux 上使用 gcc-9.4.0 转译使用 的代码库时,我遇到了同样的问题。
OpenMP
一旦我删除,它就会转译。
OpenMP
我尝试删除OpenMP就能转译了,非常感谢
Hi,
I try to transpile GraphBLAS. I successfully compiled and installed the project following its guidelines and it produced the required
compile_commands.json
.However, invoking
c2rust transpile compile_commands.json
withRUST_BACKTRACE=full
gives the following output that I can't really understand:At the beginning:
And at the very end:
I'in using C2Rust 0.15.1.
Thank you very much if you can provide any hint on how I could work around this issue!