Skip to content

Switch from c++17 to c++20 and reactivate fully static builds#15751

Merged
clonker merged 7 commits intodevelopfrom
cpp20
Jan 28, 2025
Merged

Switch from c++17 to c++20 and reactivate fully static builds#15751
clonker merged 7 commits intodevelopfrom
cpp20

Conversation

@clonker
Copy link
Member

@clonker clonker commented Jan 22, 2025

  • switches from c++17 to c++20 compilation mode
  • removes b_ubu_cxx20 job
  • b_ubu_static has its imaged bumped from ubuntu_2004 to ubuntu_2404
  • re-enables fully static binaries
  • bumps minimum requirements for gcc to 11 and for clang to 14
  • check nightly

PR adding the ubuntu2204 image: #15753
Depends on PR adding ubuntu2204 build jobs: #15754

@clonker clonker requested review from ekpyron and r0qs January 22, 2025 10:13
Comment on lines -1036 to +1076
# See: https://github.com/ethereum/solidity/issues/13954
# On large runs 2x faster than on medium. 3x on xlarge.
<<: *base_ubuntu2004_xlarge
<<: *base_ubuntu2404_xlarge
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we drop support for Ubuntu 20.04 focal?
If so, we'll also need to add Focal to the list here https://github.com/ethereum/solidity/blob/a28b2b1c89c4b8f7cdb7b171dc06925c85ae8c10/ReleaseChecklist.md?plain=1#L97, bump this https://github.com/ethereum/solidity/blob/a28b2b1c89c4b8f7cdb7b171dc06925c85ae8c10/scripts/release_ppa.sh#L69 to noble (we can since we're fully static again) and remove it from the list here https://github.com/ethereum/solidity/blob/a28b2b1c89c4b8f7cdb7b171dc06925c85ae8c10/scripts/release_ppa.sh#L71.
We can also drop it here then https://github.com/ethereum/solidity/blob/a28b2b1c89c4b8f7cdb7b171dc06925c85ae8c10/scripts/deps-ppa/static_z3.sh#L44

I need to think whether that's all. We should generally check the release builds where possible - I guess you can trigger a dry-run docker build? Depending on the answer here, I can trigger a PPA prerelease build once things are updated (since that requires launchpad permissions)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we drop focal, we can also drop https://github.com/ethereum/solidity/blob/develop/scripts/docker/buildpack-deps/Dockerfile.ubuntu2004 entirely.
Respectively, what's the GCC version in ubuntu 22.04 jammy, is that enough? If so, we could bump the image to that instead and have a CI run for it - would be good to have a run close to the minimal required versions, if feasible.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's actually an issue - https://packages.ubuntu.com/jammy/gcc looks like it's at GCC 11 only - but GCC 11 probably has sufficient C++20 support already? If so, we could still lower the requirement to GCC 11 only, add a jammy CI run and keep it in the PPA release list - otherwise, we would need to not only move focal, but also jammy to the "copy static binaries" method in the release checklist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, gcc11 should be enough actually. I just set it to 12 because that's what is contained in the current debian stable.

Copy link
Member Author

@clonker clonker Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran

docker build -t "ethereum/solc":build -f scripts/Dockerfile . --progress plain

and that went through fine.

Copy link
Member

@r0qs r0qs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :D

@clonker clonker changed the base branch from develop to ci_builds_on_2204 January 23, 2025 07:41
@clonker clonker force-pushed the cpp20 branch 2 times, most recently from 9fa9a10 to b55f0b4 Compare January 23, 2025 07:47
@clonker clonker added the has dependencies The PR depends on other PRs that must be merged first label Jan 23, 2025
@argotorg argotorg deleted a comment from stackenbotten Jan 23, 2025
@clonker
Copy link
Member Author

clonker commented Jan 23, 2025

Base automatically changed from ci_builds_on_2204 to develop January 23, 2025 14:36
@clonker clonker requested review from ekpyron and r0qs January 23, 2025 14:39
@clonker clonker added build system 🏗️ and removed has dependencies The PR depends on other PRs that must be merged first labels Jan 23, 2025
Changelog.md Outdated
Copy link
Collaborator

@ekpyron ekpyron Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's maybe a bit too inaccurate :-). I also just noticed that I actually never added a changelog entry for the switch to only semi-static builds either :-). We had

 * Build System: Optionally support dynamic loading of Z3 and use that mechanism for Linux release builds.

in 0.7.6

Maybe it should rather say something like

Suggested change
* Switch back to fully static binaries on Ubuntu.
* Static release builds for Linux no longer depend on ``glibc``.

or something like that - it's not really about Ubuntu and it's not all Ubuntu binaries.
I'm not too happy about the phrasing of my own suggestion either, but something along those lines.

This also overlaps with the SMTChecker changelog entry we added earlier, it's just the build system bit of that...

Copy link
Member Author

@clonker clonker Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that is fair enough :). Your phrasing is at least better than mine. Although I think even calling it static build when it depends on glibc is questionable. :D

Copy link
Collaborator

@ekpyron ekpyron Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can drop static actually -

Linux release binaries no longer depend on ``glibc``.

optinonally with a "are fully static again and" in between or so.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that phrasing, nice. Fixed.

@clonker clonker merged commit 96c8f38 into develop Jan 28, 2025
73 of 74 checks passed
@clonker clonker deleted the cpp20 branch January 28, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments