-
Notifications
You must be signed in to change notification settings - Fork 155
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
go test & run-tests.sh failing - expected 'package', found 'EOF' #26
Comments
Hi @carstenhag - this is almost certainly due to processing different header files that c2go cannot understand. The compiler environments are slightly different from those I've tested with my mac, ubuntu 14.04 and travis builds. I realise the error is confusing, the error messages will become more useful over time. This specific error is caused by it trying to translate a C type into the equivalent Go type. Like Try replacing the problematic line with something that can be seen in the output like: // panic(fmt.Sprintf("'%s'", s))
return "!HERE!" Hopefully, if this is the only issue you will be able to see |
After changing that line you can simply run The |
@elliotchance Thanks for the quick answer! After modifying
|
If you are seeing that Go output then you did not hit the error on that particular file, try running Also, |
I have traced the issue back to this line: Calling Parse on this line produces: &main.TypedefDecl{Address:"0x55b9da8784b0", Position:"line:341:1, line:342:16", Position2:"", Name:"line", Type:"", Type2:"", IsImplicit:false, IsReferenced:false, Childre
n:[]interface {}{}} |
I believe the problem is in |
@bongo227 yes, that definitely looks like the issue. Can you please submit a PR for that change? With a test case |
@bongo227 please try again with v0.8.4 and see if that fixes the issue. |
Done. All tests parse. |
Awesome. @carstenhag can you confirm this is now working for you? If so, close this issue. |
Just a note, seems to take ~14sec now instead of the previous 6-7. |
I clone the repo, ran
go get
and thengo test
, but unfortunately it fails with a panic:run-tests.sh
also seems to produce an empty panic:The text was updated successfully, but these errors were encountered: