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

Drop CGO #4280

Closed
4 tasks
alessio opened this issue May 6, 2019 · 0 comments · Fixed by #4262
Closed
4 tasks

Drop CGO #4280

alessio opened this issue May 6, 2019 · 0 comments · Fixed by #4262
Assignees
Labels
C:Ledger Issues and features related Ledger integration and functionality

Comments

@alessio
Copy link
Contributor

alessio commented May 6, 2019

We rely on CGO to build support for Ledger devices. On the other hand, CGO breaks build determinism.
When CGO is disabled, byte-to-byte reproducible builds can be achieved, see #4262.

As A user of gaiacli
I Can compile gaiacli without calling C code nor linking against external static/shared libraries.

Acceptance Criteria

Given a local clone of github.com/cosmos/cosmos-sdk
Given CGO_ENABLED=0 is set in the environment
When I run make install
Then the build terminates successfully
Then gaiacli keys add --ledger successfully adds a ledger reference to the keybase.

References

@jaekwon @zmanian

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alessio alessio added build C:Ledger Issues and features related Ledger integration and functionality labels May 6, 2019
alessio pushed a commit that referenced this issue May 13, 2019
This change set introduces support for building gaia with gitian
on the following GOOS/GOARCH pairs:

- darwin/386
- darwin/amd64
- linux/386
- linux/amd64
- linux/arm
- linux/arm64
- windows/386
- windows/amd64

cmd/gaia/contrib/gitian-descriptors/ contains gitian descriptor files.

cmd/gaia/contrib/gitian-keys/ contains:
- a keys.txt file that is meant to list core developers and gitian
  builders PGP keys. 
- README.me to provide instructions on how to import the keys
  into one's personal GPG keyring.

The gosum utility is removed, so is the go.sum hashsum bit from
gaiacli/gaiad version string. It was meant to be a provisional
mitigation to the lack of a reproducible build process.

GOBIN is removed from all Makefiles. When GOBIN is set, go
refuses to cross-compiles binaries for foreign architectures.
export GOBIN=$GOPATH/bin is unnecessary anyway as by
default go install places built binaries in $GOPATH/bin.
Developers are required to update their enviornment files and
replace $GOBIN with $GOPATH/bin in PATH.

circleci configuration file is amended accordingly.

Closes: #4027
Closes: #4280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Ledger Issues and features related Ledger integration and functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants