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

GO runtime: Can not compile on ARM #1858

Closed
milanaleksic opened this issue May 5, 2017 · 5 comments
Closed

GO runtime: Can not compile on ARM #1858

milanaleksic opened this issue May 5, 2017 · 5 comments

Comments

@milanaleksic
Copy link
Contributor

milanaleksic commented May 5, 2017

As presented in the reproduction scenario, current code that constitutes Go runtime the can't be compiled if target is linux + ARM architecture (no problem if I remove GOARCH=arm from the request below). Currently reproducible in my project wallabago, commit 48a5e22d2336c12fe24ab410ab260c79809623b4.

milan@dell /opt/go/src/github.com/milanaleksic/wallabago/cmd/main → GOARCH=arm go build -o wallabago
# github.com/milanaleksic/wallabago/vendor/github.com/antlr/antlr4/runtime/Go/antlr
../../vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go:368: constant 3432918353 overflows int
../../vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go:374: constant 3864292196 overflows int
../../vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go:381: constant 2246822507 overflows int
../../vendor/github.com/antlr/antlr4/runtime/Go/antlr/utils.go:383: constant 3266489909 overflows int
@w20089527
Copy link

It is the same on windows + 386

@neatnerd
Copy link
Contributor

I think the error is pretty clear. The murmur hash implementation is 64-bit (i guess?) in code, so ARM cannot handle it. Can you research the ARM murmur hash implementation, then some1 can PR that

@milanaleksic
Copy link
Contributor Author

All I've done in my case is change undefined type (probably resolved to int) to uint and I didn't encounter any issues but didn't have time to verify via comparing with some other implementation, since there are no explicit tests for this code (murmurInit etc) that I could find. I don't like sending PR code I didn't have time to test

@milanaleksic
Copy link
Contributor Author

I've sent a PR of the change that worked for me

@parrt parrt closed this as completed in 3beb771 Oct 27, 2017
juagargi added a commit to juagargi/scion that referenced this issue Sep 10, 2019
Antl had a problem with ARM 32:
antlr/antlr4#1858

So picking the commit of antlr where the PR scionproto#1990 was merged.

Also casting a constant to uint64 (see default type of an untyped constant
https://golang.org/ref/spec#Constants ).
lukedirtwalker pushed a commit to scionproto/scion that referenced this issue Sep 10, 2019
ANTLR had a problem with ARM 32:
antlr/antlr4#1858

So we take v4.7.2 of ANTLR which fixes the issue.

Also use AS and ISD types for Max constants.
juagargi added a commit to netsec-ethz/scion that referenced this issue Sep 10, 2019
ANTLR had a problem with ARM 32:
antlr/antlr4#1858

So we take v4.7.2 of ANTLR which fixes the issue.

Also use AS and ISD types for Max constants.
@exander77
Copy link

Seems to be broken, see bottom: #2152

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

4 participants