c2go
c2go copied to clipboard
Description for environment setup (to fix at least tests)
Good day
Looks like many people have same problem with transpiling and I guess it's something with environment like clang version + go version combination, because I cloned this repo and run integration tests and got same unknown node type
error. I'v tried different versions like v0.26.10
, v0.26.9
and got same result so it's definitely not code issue. I'v tried different clang like clang-12
, clang-13
, clang-14
and got same result. I'v tried c2go
from apt install
all the same results
go test -tags=integration ./...
? github.com/elliotchance/c2go/cc [no test files]
? github.com/elliotchance/c2go/darwin [no test files]
? github.com/elliotchance/c2go/linux [no test files]
? github.com/elliotchance/c2go/program [no test files]
panic: unknown node type: 'BuiltinAttr 0xede050 <<invalid sloc>> Inherited Implicit 1054'
goroutine 32 [running]:
github.com/elliotchance/c2go/ast.Parse({0xc000320374, 0x3d})
/home/sergii/projects/c2go/ast/ast.go:294 +0x1b1a
github.com/elliotchance/c2go.convertLinesToNodes({0xc00015d5b0, 0x1f, 0x522d602020202020?})
/home/sergii/projects/c2go/main.go:89 +0xf6
github.com/elliotchance/c2go.convertLinesToNodesParallel.func1.2({0xc00015d5b0?, 0x2e73657079742f73?, 0x202c313a31333a68?}, 0x203e33323a6c6f63?)
/home/sergii/projects/c2go/main.go:121 +0x2f
created by github.com/elliotchance/c2go.convertLinesToNodesParallel.func1 in goroutine 30
/home/sergii/projects/c2go/main.go:119 +0x286
FAIL github.com/elliotchance/c2go 0.444s
ok github.com/elliotchance/c2go/ast (cached)
ok github.com/elliotchance/c2go/noarch (cached)
ok github.com/elliotchance/c2go/preprocessor (cached)
ok github.com/elliotchance/c2go/transpiler (cached)
ok github.com/elliotchance/c2go/types (cached)
ok github.com/elliotchance/c2go/util (cached)
FAIL
regular go test .
works fine