-
Notifications
You must be signed in to change notification settings - Fork 144
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
Deprecate zigbuild and glibc in favor of static musl binaries for Linux builds. #541
Merged
michaelsutton
merged 76 commits into
kaspanet:dev
from
starkbamse:goodbye-zigbuild-hello-musl
Sep 5, 2024
Merged
Deprecate zigbuild and glibc in favor of static musl binaries for Linux builds. #541
michaelsutton
merged 76 commits into
kaspanet:dev
from
starkbamse:goodbye-zigbuild-hello-musl
Sep 5, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Crosstools-ng configuration file for quick reproducable builds on musl. - Instructions for how to build RK on musl.
starkbamse
changed the title
Goodbye zigbuild hello musl
Deprecate zigbuild and glibc in favor of static musl binaries for Linux builds.
Sep 4, 2024
Move preset hash update after openssl build
elichai
reviewed
Sep 5, 2024
Should not trigger cache
Adds comment and should invalidate cache.
KaffinPX
reviewed
Sep 5, 2024
michaelsutton
approved these changes
Sep 5, 2024
elichai
approved these changes
Sep 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! THis looks great now :)
michaelsutton
added a commit
to michaelsutton/rusty-kaspa
that referenced
this pull request
Sep 6, 2024
commit afbcf9e Author: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Fri Sep 6 05:40:53 2024 +0200 Change directory back to repo root & Fix Rust v1.81 lints (kaspanet#545) * Change directory back to repodir Change directory back to repodir after building toolchain * Clippy * Update crypto/txscript/src/caches.rs Co-authored-by: Maxim <59533214+biryukovmaxim@users.noreply.github.com> * Update crypto/txscript/src/caches.rs * rename `is_none_or` -> `is_none_or_ex` to avoid conflict with future std * remove `use std::mem::size_of` wherever possible (added to std prelude recently) --------- Co-authored-by: Maxim <59533214+biryukovmaxim@users.noreply.github.com> Co-authored-by: Michael Sutton <msutton@cs.huji.ac.il> commit 06a874f Author: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Thu Sep 5 18:51:04 2024 +0200 Deprecate zigbuild and glibc in favor of static musl binaries for Linux builds. (kaspanet#541) * CTNG Config file, Musl build instructions - Crosstools-ng configuration file for quick reproducable builds on musl. - Instructions for how to build RK on musl. * Test * Update ci.yaml * Test crosstools install * Cache ct-ng build * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Fix error in command * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Update ci.yaml * Comments, naming * Update ci.yaml * Update ci.yaml * Update ci.yaml * Merge new musl build with old CI, Release builds - Merges the old CI script with the new musl build. - Update deploy.yaml to use updated musl toolchain to build musl target for linux. * Move to workspace * Delete musl-build.md * Lock to ctng version 1.26 * Checkout fix * Revert master change * Indentation * Revert "Indentation" This reverts commit 6a7e6c0. * Revert "Revert master change" This reverts commit 1a047e4. * Update ci.yaml * Force mimalloc * Compress into script * Fix typo * Update build.sh * Replace bloaded config file * Update build.sh * Update build.sh * Source script * Revert vendor * Update defconfig * Update defconfig * Update defconfig * Update build.sh * Update build.sh * Update build.sh * Update build.sh * Update defconfig * Delete defconfig * Create defconfig * Update build.sh * Deprecate config, use default preset * Update build.sh * Add preset hash logic in script * Move preset hash update Move preset hash update after openssl build * Use openssl crate * Update exports, cache config * Remove spaces in export command * Update names Should not trigger cache * Move source preset * CD before preset * Add comment Adds comment and should invalidate cache. commit b04092e Author: aspect <anton.yemelyanov@gmail.com> Date: Thu Sep 5 18:00:24 2024 +0300 add proxy limit field to sysinfo (kaspanet#544) commit f866dfa Author: Michael Sutton <msutton@cs.huji.ac.il> Date: Thu Sep 5 14:04:16 2024 +0300 Various miscellaneous changes towards 0.15.1 RC2 (kaspanet#543) * infrequent logs should be debug * cleanup some todos * when a network starts, genesis has a body, so there's no need for a special exception * remove unneeded method and add an error just in case it is added in the future * count and log chain disqualified blocks * count and log mempool evictions * bump version to 0.14.5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this
This PR replaces current ways to build linux binaries (zigbuild) with a musl build using custom built OpenSSL and CTNG musl toolchains.
How
We utilize ctng to generate a musl toolchain using a configuration which includes libstdc++, a requirement by RocksDB. This allows us to compile OpenSSL and rusty-kaspa against musl.
Tests performed
Ran by two testers in #qa for two days.
Why do we need it
We need it because on certain machines (Ubuntu 22.04.1 LTS) when running TN10 we get a segmentation fault with the following backtrace snippet:
Cache updates
You can trigger a cache update by updating the preset.sh. Both Actions, and the build.sh script keep track of the latest hash and rebuild in the case of a mismatch.
Considerations:
Performance, could be worse if areas where performance is crucial utilize C memory allocators. It is planned to maybe replace the allocator with mimalloc to solve this problem.