Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description for environment setup (to fix at least tests) #900

Open
redexp opened this issue Oct 5, 2024 · 0 comments
Open

Description for environment setup (to fix at least tests) #900

redexp opened this issue Oct 5, 2024 · 0 comments

Comments

@redexp
Copy link

redexp commented Oct 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant