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

Update build tags for static link #97

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Update build tags for static link #97

merged 1 commit into from
Sep 20, 2024

Conversation

2dvorak
Copy link
Contributor

@2dvorak 2dvorak commented Sep 20, 2024

Proposed changes

  • This PR adds build tags for building statically linked kaia binaries
    • Some glibc features (e.g., libnss) can cause dependencies on specific version of glibc.
    • To avoid using such features, we can add build tags to guide go compiler (and linker) to use Golang implementation (as an alternative to the related glibc feature)
    • This is a known issue in Golang, and also a mitigation adopted in geth

The following build method now produces a fully static binary.

KAIA_STATIC_LINK=1 make ken

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have read the CLA and signed by comment I have read the CLA Document and I hereby sign the CLA in first time contribute
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

Further comments

@2dvorak 2dvorak self-assigned this Sep 20, 2024
@2dvorak 2dvorak marked this pull request as ready for review September 20, 2024 01:52
@blukat29 blukat29 merged commit 05655eb into dev Sep 20, 2024
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
@2dvorak 2dvorak deleted the 2dvorak/static-link branch September 24, 2024 01:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants