Skip to content

ci: Switch to ubuntu:26.04 images#5175

Open
tgross35 wants to merge 8 commits into
rust-lang:mainfrom
tgross35:docker-image-updates
Open

ci: Switch to ubuntu:26.04 images#5175
tgross35 wants to merge 8 commits into
rust-lang:mainfrom
tgross35:docker-image-updates

Conversation

@tgross35

@tgross35 tgross35 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Where possible, change to the latest Ubuntu release. The 32-bit images still aren't bumped because of the time64 mismatch.

There are a handful of supporting changes needed, see individual commit messages for more details. The first two commits are #5188.

Closes: #5126

@rustbot

rustbot commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

@rustbot

This comment has been minimized.

@tgross35 tgross35 marked this pull request as draft June 23, 2026 00:45
@tgross35 tgross35 force-pushed the docker-image-updates branch 4 times, most recently from 58e90cc to 2df722a Compare June 23, 2026 23:13
@rustbot

This comment has been minimized.

@tgross35 tgross35 force-pushed the docker-image-updates branch 10 times, most recently from 48101b5 to da91ee5 Compare June 24, 2026 19:19
@tgross35 tgross35 marked this pull request as ready for review June 24, 2026 19:22
@tgross35

Copy link
Copy Markdown
Contributor Author

🎉 that took some effort

@tgross35 tgross35 requested a review from JohnTitor June 24, 2026 19:24
@tgross35 tgross35 changed the title ci: Switch to ubuntu:26.04 images ci: Switch to ubuntu:26.04 images Jun 24, 2026
@rustbot

This comment has been minimized.

@tgross35 tgross35 force-pushed the docker-image-updates branch from da91ee5 to 1d9ef30 Compare June 25, 2026 19:30
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@tgross35 tgross35 force-pushed the docker-image-updates branch from 1d9ef30 to e922061 Compare June 26, 2026 06:08
@rustbot

This comment has been minimized.

tgross35 and others added 8 commits June 26, 2026 05:11
When there are additions or updates that are only available with newer
platform versions, we don't have a great way to handle testing. The only
thing we can really do is unconditionally skip anything that doesn't
pass on the oldest versions we have on CI.

Improve this by adding a preprocess-only compiler invocation that
collects versions from the headers we are building against. These are
then used to skip 

This initial patch only uses the versions for skips on Linux and
replacing the NetBSD `uname` invocation.
PowerPC, Sparc, and MIPS (32- and 64-bit for all) have different `_IOC`
numbers, meaning the constants were inaccurate. Example error on
PowerPC64:

    bad `EPIOCSPARAMS` value at byte 4: rust: 64 (0x40) != c 128 (0x80)
        rust bytes: 00 00 00 00 40 08 8a 01
        c bytes:    00 00 00 00 80 08 8a 01
    bad `EPIOCGPARAMS` value at byte 4: rust: 128 (0x80) != c 64 (0x40)
        rust bytes: 00 00 00 00 80 08 8a 02
        c bytes:    00 00 00 00 40 08 8a 02

Resolve this by using `_IOW` and `_IOR`.

Source: https://github.com/torvalds/linux/blob/502d801f0ab03e4f32f9a33d203154ce84887921/include/uapi/linux/eventpoll.h#L97-L99
Fixes: fb58c01 ("epoll: add busy polling parameters")
Where possible, change to the latest Ubuntu release. The 32-bit images
still aren't bumped because of the time64 mismatch.
Glibc 2.42 updated this definition to an unsigned integer so it no
longer overflows.

Source: https://sourceware.org/git/?p=glibc.git;a=commit;h=3263675250cbcbbcc76ede4f7c660418bd345a11
In Ubuntu 26.04, the musl build hits:

    In file included from /checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-1eed7f417ef9e9ac/out/ctest_output.c:51:
    /musl-aarch64/include/string.h:97:7: error: conflicting types for 'basename'; have 'char *(void)'
       97 | char *basename();
          |       ^~~~~~~~
    In file included from /checkout/target/aarch64-unknown-linux-musl/debug/build/libc-test-1eed7f417ef9e9ac/out/ctest_output.c:19:
    /musl-aarch64/include/libgen.h:9:7: note: previous declaration of 'basename' with type 'char *(char *)'
        9 | char *basename(char *);
          |       ^~~~~~~~
    cc1: note: unrecognized command-line option '-Wno-unknown-warning-option' may have been intended to silence earlier diagnostics

I believe this may be due to a new error in recent versions of GCC,
though I have not actually gone through the effort to verify this. In
any case, musl received a patch in 1.2.5 that resolves the issue; apply
it to our 1.1.x build to keep it working.

Link: kraj/musl@725e17e
Ubuntu 26.04 transitioned PowerPC64LE from the IBM long double format to
IEEE binary128 [1], which mean a handful of variadic functions needed to
switch to a binary128-compatible version. These were available starting
with glibc 2.32 (2020-08) per the abilist [2], which is quite a bit
newer than what we say we support at [3] (2.17, 2012-12).

This explains test failures, so skip checking the functions per now. We
should migrate to the `__<name>ieee128` functions at some point, which
need not be related to our documented minimum, but there is no reason to
do it now since Rust doesn't even stably support either IBM `long
double` or binary128.

Demo on Ubuntu 24.04:

    $ cat demo.c
    #include <stdio.h>
    #include <syslog.h>

    void demo() {
            char buf1[20] = { 0 };
            char buf2[20] = { 0 };
            printf("Hello, world! %d\n", 1);
            fprintf(stderr, "Hello, world! %d\n", 2);
            sprintf(buf1, "Hello, world! %d\n", 3);
            snprintf(buf2, 20, "Hello, world! %d\n", 4);
            syslog(0, "Hello, world! %d\n", 5);
    }
    $ powerpc64le-linux-gnu-gcc demo.c -c
    $ powerpc64le-linux-gnu-nm demo.o
                     U .TOC.
                     U __stack_chk_fail
    0000000000000000 T demo
                     U fprintf
                     U printf
                     U snprintf
                     U sprintf
                     U stderr
                     U syslog

And the same demo on Ubuntu 26.04:

    $ cat demo.c
    #include <stdio.h>
    #include <syslog.h>

    void demo() {
            char buf1[20] = { 0 };
            char buf2[20] = { 0 };
            printf("Hello, world! %d\n", 1);
            fprintf(stderr, "Hello, world! %d\n", 2);
            sprintf(buf1, "Hello, world! %d\n", 3);
            snprintf(buf2, 20, "Hello, world! %d\n", 4);
            syslog(0, "Hello, world! %d\n", 5);
    }
    $ powerpc64le-linux-gnu-gcc demo.c -c
    $ powerpc64le-linux-gnu-nm demo.o
                     U .TOC.
                     U __fprintfieee128
                     U __printfieee128
                     U __snprintfieee128
                     U __sprintfieee128
                     U __stack_chk_fail
                     U __syslogieee128
    0000000000000000 T demo
                     U stderr

[1]: https://bugs.launchpad.net/ubuntu/+bug/2132257
[2]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist;h=65d78e50760b5d6b1a9cb39016a7bf8064224794;hb=HEAD#l2519
[3]: https://doc.rust-lang.org/1.96.0/rustc/platform-support.html
@tgross35 tgross35 force-pushed the docker-image-updates branch from e922061 to 1ec51ca Compare June 26, 2026 09:11
@rustbot

rustbot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

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

Labels

A-CI Area: CI-related items S-waiting-on-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants