Skip to content

Fix build on Raspbian#221

Closed
fstanis wants to merge 1 commit intogoogle:masterfrom
fstanis:patch-1
Closed

Fix build on Raspbian#221
fstanis wants to merge 1 commit intogoogle:masterfrom
fstanis:patch-1

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?

}

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