-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ci: build GCC 14, build nowallet
depends and source with it, stage built packages in /opt
, allowlist LLVM libc++
#6387
base: develop
Are you sure you want to change the base?
Conversation
29101ef
to
62d4636
Compare
GitHub Actions on 62d4636 works as expected on my fork, see https://github.com/kwvg/dash/actions/runs/11764281671/job/32769805675#step:6:1 |
This pull request has conflicts, please rebase. |
Also disable debug builds of libstdcxx
62d4636
to
3263879
Compare
/opt
, fix LLDB personality issuenowallet
depends and source with it, stage built packages in /opt
, allowlist LLVM libc++
GitHub Actions run for 3263879, https://github.com/kwvg/dash/actions/runs/11949630923. |
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ | ||
ln -s "/usr/include/${gnuArch}/asm" "/usr/include/asm"; \ | ||
majorVersion="${GCC_VERSION%%.*}"; \ | ||
./configure \ |
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.
I am against of building gcc everytime. It's heavy process, it make things that supposed to be close to instant to be "1 hour long".
If you really need custom gcc build - let's build it, put somewhere as a binary, and only download it and verify hashes. It's not necessary should be a build that is done by gcc's team, but it can be 3rd party repo
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.
gcc is default compiler in my ubuntu 24.10, I don't see a reason to build it from scratch. It's not a bleeding-edge-night-build which we need.
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.
maybe their's? https://github.com/xpack-dev-tools/gcc-xpack
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.
It's heavy process, it make things that supposed to be close to instant to be "1 hour long".
It doesn't take an hour, it takes ~25 minutes (build) and efforts have been made to make it cacheable as possible (as mentioned in the PR description, see below, along with all the alternatives explored, see above). Builds without the GCC compile take ~5 minutes (build), so the slowdown impact relative to the current deployment in a worst-case scenario (cache-miss) is 20 minutes and the subsequent caching should should give us pull times comparable to regular cache hits.
- Reducing the packages installed in first
RUN
layer to the minimum needed for GCC and LLVM installations and placing GCC build and install to the secondRUN
layer.
I'm not against building them separately and downloading binaries for them. What about baking in the first two steps into their own Docker container and FROM
'ing it? It should bypass cache misses and the rebuilds that it would attract.
gcc is default compiler in my ubuntu 24.10, I don't see a reason to build it from scratch. It's not a bleeding-edge-night-build which we need.
This has been addressed in the PR description (see below)
- Moving the development image base to noble as GCC 14 is available for it (source) (but means we aren't testing against the lowest supported LTS).
maybe their's? https://github.com/xpack-dev-tools/gcc-xpack
I had suggested this to Pasta and he seemed lukewarm towards the idea (@PastaPastaPasta, thoughts?)
This pull request has conflicts, please rebase. |
Motivation
This PR is a spiritual continuation of dash#5375. Unlike upstream, Dash uses a development image for CI and therefore, is limited by the packages provided by the base distro (in our case, Ubuntu 22.04
jammy
) unless additional efforts are placed to make those packages available, those efforts were expended for Clang and in this PR, it is being expanded to GCC to be able to catch issues like the ones resolved in dash#5064 within CI itself.Additional Information
Depends on ci: merge bitcoin#27314, #28954, #29765, introduce dependency options in GitHub Actions builds, fix multiprocess builds #6400
Dependency for backport: merge bitcoin#23060, #24164, #23565, #24337, #27682, #29208, #29091, #29165, #29934, #30261, partial bitcoin#27662, #28210, #28348, #30263 (bump minimum compiler) #6389
While building GCC ourselves increases the build time of the container, mitigations have been made to reduce the build time.
The following alternatives were explored before settling for building:
jammy
using theppa
branch, source, and GCC 13 usingtest
, source)noble
as GCC 14 is available for it (source) (but means we aren't testing against the lowest supported LTS).The following mitigations were made to reduce build time:
libsanitizer
(astsan
uses Clang andubsan
uses distro-supplied GCC),libstdcxx-debug
, Native Language Support (we expect CI diagnostic information to remain in English) and ISL (used for loop optimizations, no significant performance regressions found)RUN
layer to the minimum needed for GCC and LLVM installations and placing GCC build and install to the secondRUN
layer.As of
develop
(a8e2316), packages built by the container are stored in/tmp
, which is inadvisable as it is the same directory used to store functional test runs and it's not too difficult to delete/tmp
's contents to save space in a long runningdevelop
container and then realize that bothshellcheck
andcppcheck
are stored there and now you have to ditch the container you're working in and restart it./opt
in accordance with the FHS (source)./usr/local
was a contender but it's pre-populated, meanwhilels /opt
would give you a very quick picture of what's built for the container./tmp
will not be entirely empty because pypa/pip#10753 results in residual.pem
files leaking into/tmp
andpyenv
stores its build log there and keeping it around has some debug value.Using
LD_LIBRARY_PATH
to point to our compiled GCC's library files (and extending that to LLVM's library files) are acceptable and will not interfere with executing binaries built using the distro's packaged compiler as it will eventually search default paths and find the libraries shipped with the distro (source).depends
built using GCC 11.4 (distro's GCC) can be used to build Dash Core using GCC 14.2 (compiled GCC) but the reverse doesn't hold true.Breaking Changes
None expected.
Checklist