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

Build fails w/ GOOS of "mips" or "mipsle" #101

Closed
josephlr opened this issue Aug 22, 2018 · 1 comment
Closed

Build fails w/ GOOS of "mips" or "mipsle" #101

josephlr opened this issue Aug 22, 2018 · 1 comment
Assignees
Labels

Comments

@josephlr
Copy link
Member

Running either of the following commands:

GOARCH=mips go build github.com/google/fscrypt/...
GOARCH=mipsle go build github.com/google/fscrypt/...

results in the following error:

# github.com/google/fscrypt/util
util/util.go:47:11: type [2147483647]byte larger than address space

This has broken the Debian package for mips and mipsle.

This failure comes from my error here:

// Silce must fix in 32-bit address space to build on 32-bit platforms.
return (*[math.MaxInt32]byte)(ptr)[:]

The docs clearly say that 1 << 30 should be used instead of math.MaxInt32. There have been discussions here and here about this, but they haven't ever resulted in anything nicer to use.

@josephlr
Copy link
Member Author

We should also fix our CI to at least make sure that fscrypt builds on all supported GOOS values

josephlr added a commit that referenced this issue Aug 22, 2018
Addresses most of the issues in #101.

The following commands now succeed:
    GOARCH=mips go build github.com/google/fscrypt/util
    GOARCH=mipsle go build github.com/google/fscrypt/util
@josephlr josephlr self-assigned this Aug 22, 2018
@josephlr josephlr added the bug label Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant