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

Fix build on Raspbian #221

Closed
wants to merge 1 commit into from
Closed

Fix build on Raspbian #221

wants to merge 1 commit into from

Conversation

fstanis
Copy link
Contributor

@fstanis fstanis commented May 5, 2020

Currently, trying to build on Raspbian fails with the following error:

$ go get github.com/google/fscrypt/cmd/fscrypt
# github.com/google/fscrypt/keyring
go/src/github.com/google/fscrypt/keyring/fs_keyring.go:231:6: constant 3225445912 overflows int
go/src/github.com/google/fscrypt/keyring/fs_keyring.go:235:7: constant 3225445913 overflows int

Copy link
Collaborator

@ebiggers ebiggers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please put the explanation in the commit message, not just in the pull request description? The pull request description gets lost on merge.

Also, this fix is actually needed for any 32-bit build, right?

@@ -228,7 +228,7 @@ func fsRemoveEncryptionKey(descriptor string, mount *filesystem.Mount,
return err
}

ioc := unix.FS_IOC_REMOVE_ENCRYPTION_KEY
ioc := uintptr(unix.FS_IOC_REMOVE_ENCRYPTION_KEY)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the cast to uintptr below redundant. Can you remove that one?

ebiggers pushed a commit that referenced this pull request May 9, 2020
Since v0.2.6, fscrypt only builds for 64-bit systems.  E.g. trying to
build on Raspbian fails with the following error:

  $ go get github.com/google/fscrypt/cmd/fscrypt
  # github.com/google/fscrypt/keyring
  go/src/github.com/google/fscrypt/keyring/fs_keyring.go:231:6: constant 3225445912 overflows int
  go/src/github.com/google/fscrypt/keyring/fs_keyring.go:235:7: constant 3225445913 overflows int

Fix it by making the 'ioc' variable have type uintptr.

[EB - removed the later cast to uintptr that became unnecessary, and
 added explanation to commit message.]
@ebiggers
Copy link
Collaborator

ebiggers commented May 9, 2020

Updated and merged as c576433. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants