Skip to content

github: update compiler toolchains#3368

Open
avikivity wants to merge 1 commit into
scylladb:masterfrom
avikivity:github-tests-update-toolchain
Open

github: update compiler toolchains#3368
avikivity wants to merge 1 commit into
scylladb:masterfrom
avikivity:github-tests-update-toolchain

Conversation

@avikivity

@avikivity avikivity commented Apr 26, 2026

Copy link
Copy Markdown
Member

Switch to Fedora 44 (in a container, as github doesn't support it
directly yet), Clang 22, and gcc 16. This lets us test with modern
toolchains and sets the stage for bumping the standard to C++26.

Since we're running in a container, drop sudo, which isn't provided
by the container and also isn't needed.

Disable the g++ debug mode combination due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124584.

@nyh nyh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean our tests will run only on clang-22? Shouldn't we also build on clang-21, which Seastar users are far more likely to use and we would care more if it generates bad code?

@avikivity

Copy link
Copy Markdown
Member Author

Does this mean our tests will run only on clang-22?

Yes

Shouldn't we also build on clang-21, which Seastar users are far more likely

Far more likely?!

to use and we would care more if it generates bad code?

The tests aren't to verify the compiler. They are to verify Seastar itself builds on the supported compiler/library combinations.

In principle we should build on the last two compiler versions, since that's our compatibility promise. Usually newer compilers are more strict (they catch violations that previous compilers did not) and older libraries are more strict (they implement fewer features). But the test environment allows testing only one, for now, and this changes from clang-20 (which we no longer support) to clang-22 (which we do).

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from c0aceb5 to 5abc5d7 Compare April 26, 2026 12:05
@avikivity

Copy link
Copy Markdown
Member Author

v2: drop sudo; isn't supplied by the container, and now unneeded

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 5abc5d7 to 2b909ef Compare April 26, 2026 12:25
@avikivity

Copy link
Copy Markdown
Member Author

v3:

  • install git
  • explicitly name libstdc++ version we target

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 2b909ef to 65996e8 Compare April 26, 2026 12:27
@avikivity

Copy link
Copy Markdown
Member Author

v4:

  • make sure apt-get update runs before any package installation

@nyh

nyh commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Shouldn't we also build on clang-21, which Seastar users are far more likely

Far more likely?!

I use the latest Fedora officially released (Fedora 43) and it has clang 21.1.8, not clang 22.
ScyllaDB's official build system ("dbuild") uses clang 21.1.8 (not surprising, it also uses Fedora 43).

I didn't do a survey on how many developers using what, so I can't prove my hunch, but my hunch is that most of the Seastar users have not yet switched to clang 22.

@avikivity

Copy link
Copy Markdown
Member Author

Shouldn't we also build on clang-21, which Seastar users are far more likely

Far more likely?!

I use the latest Fedora officially released (Fedora 43) and it has clang 21.1.8, not clang 22. ScyllaDB's official build system ("dbuild") uses clang 21.1.8 (not surprising, it also uses Fedora 43).

For a few more days.

I didn't do a survey on how many developers using what, so I can't prove my hunch, but my hunch is that most of the Seastar users have not yet switched to clang 22.

Seastar should be leading, not trailing, its users, so we encounter and fix the problems early.

@avikivity

Copy link
Copy Markdown
Member Author

#3376

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 65996e8 to 85a6ca7 Compare May 2, 2026 15:54
@avikivity

Copy link
Copy Markdown
Member Author

v5: switch to Fedora 44 instead of Ubuntu 26.04. Ubuntu 26.04 had too-old libfmt which contained an unfixed bug wrt newer clang. We have more expertise in Fedora, and Fedora tracks upstream releases better.

@avikivity

Copy link
Copy Markdown
Member Author

#3377

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 85a6ca7 to ed501df Compare May 4, 2026 09:29
@avikivity

Copy link
Copy Markdown
Member Author

v6: rebased past 2891a4b

@avikivity

Copy link
Copy Markdown
Member Author

#3378

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from ed501df to 1db6d6d Compare May 5, 2026 12:53
@avikivity

Copy link
Copy Markdown
Member Author

v7: rebased past 6be1e64

@nyh nyh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good but one silly nitpick: The last pagraph of the commit message doesn't look correct. Maybe it was relevant for some earlier version of this patch?

@nyh

nyh commented May 5, 2026

Copy link
Copy Markdown
Contributor

Looks good but one silly nitpick: The last pagraph of the commit message doesn't look correct. Maybe it was relevant for some earlier version of this patch?

Also, there seem to be some tests failing with the new compiler/library combination, please take a look.

@avikivity

Copy link
Copy Markdown
Member Author

#3385

@avikivity

Copy link
Copy Markdown
Member Author

Looks good but one silly nitpick: The last pagraph of the commit message doesn't look correct. Maybe it was relevant for some earlier version of this patch?

Yes, forgot to trim it.

@avikivity avikivity force-pushed the github-tests-update-toolchain branch 2 times, most recently from 2e28b1e to 4be44ec Compare May 6, 2026 16:08
@avikivity

Copy link
Copy Markdown
Member Author

v8:

  • rebased past 87cdb03
  • trimmed no-longer-relevant part of changelog

@avikivity

Copy link
Copy Markdown
Member Author

#3387

@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 4be44ec to 246f81b Compare May 17, 2026 12:21
@avikivity

Copy link
Copy Markdown
Member Author

v9:

Switch to Fedora 44 (in a container, as github doesn't support it
directly yet), Clang 22, and gcc 16. This lets us test with modern
toolchains and sets the stage for bumping the standard to C++26.

Since we're running in a container, drop sudo, which isn't provided
by the container and also isn't needed.

Disable the g++ debug mode combination due to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124584.
@avikivity avikivity force-pushed the github-tests-update-toolchain branch from 246f81b to c8b0ffb Compare May 17, 2026 12:56
@avikivity

Copy link
Copy Markdown
Member Author

v10:

  • completely disable g++/debug until the gcc bug is fixed (causes problems in rpc_test)

@avikivity

Copy link
Copy Markdown
Member Author

@scylladb/seastar-maint please review

@travisdowns

Copy link
Copy Markdown
Contributor

Switch to Fedora 44 (in a container, as github doesn't support it
directly yet), Clang 22, and gcc 16.

Is there a good to reason to switch away from Ubuntu? My impression is this is the most commonly used distro and probably the most common distro for seastar use and has long-lived LTS versions.

@avikivity

Copy link
Copy Markdown
Member Author

Switch to Fedora 44 (in a container, as github doesn't support it
directly yet), Clang 22, and gcc 16.

Is there a good to reason to switch away from Ubuntu? My impression is this is the most commonly used distro and probably the most common distro for seastar use and has long-lived LTS versions.

Ubuntu 26.04 has clang 21 and gcc 15, and I want 22/16.

If we want recent compiler versions (and I do), LTS doesn't help.

@travisdowns

Copy link
Copy Markdown
Contributor

Ubuntu 26.04 has clang 21 and gcc 15, and I want 22/16.

If we want recent compiler versions (and I do), LTS doesn't help.

Dunno about gcc side but you can trivially install any clang version with llvm.sh.

@avikivity

Copy link
Copy Markdown
Member Author

Ubuntu 26.04 has clang 21 and gcc 15, and I want 22/16.
If we want recent compiler versions (and I do), LTS doesn't help.

Dunno about gcc side but you can trivially install any clang version with llvm.sh.

What is llvm.sh?

But we do want gcc.

@travisdowns

Copy link
Copy Markdown
Contributor

What is llvm.sh?

The installer script maintained by the llvm project, it installs any version of llvm/clang/etc you'd like "side by side".

@avikivity

Copy link
Copy Markdown
Member Author

What is llvm.sh?

The installer script maintained by the llvm project, it installs any version of llvm/clang/etc you'd like "side by side".

Nice, we can use it later to test multiple clang versions.

gcc is trickier though.

@travisdowns

Copy link
Copy Markdown
Contributor

gcc is trickier though.

ubuntu 26.04 offers gcc-16 as an installable option, so that can be used via contianer if Ubuntu is preferred (26.04 not offered as "runner" yet)

on the runner itself gcc seems pretty easy with the toolchain ppa which is how I've done this many times

That said is there any interest in staying on ubuntu, and/or directly using the runner instead of container mode? If so I could do that, but trying to read the room here.

@avikivity

Copy link
Copy Markdown
Member Author

gcc is trickier though.

ubuntu 26.04 offers gcc-16 as an installable option, so that can be used via contianer if Ubuntu is preferred (26.04 not offered as "runner" yet)

on the runner itself gcc seems pretty easy with the toolchain ppa which is how I've done this many times

That said is there any interest in staying on ubuntu, and/or directly using the runner instead of container mode? If so I could do that, but trying to read the room here.

I don't have any love for Ubuntu, but also no motivation for the change other than it was the path of least resistance for me.

Ubuntu 26.04 isn't yet available as a runner, so we have to use a container.

The goal is to update on a half-year cadence like clang. Fedora offers this and also has mid-life updates. I don't know enough about Ubuntu.

If it's possible to do this on Ubuntu, and it is also advantageous (for example, supporting the last two compilers instead of just one), then by all means, post a patch.

@travisdowns

Copy link
Copy Markdown
Contributor

post a patch.

I will

@travisdowns

Copy link
Copy Markdown
Contributor

#3412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants