Skip to content

ci: Bump musl 1.2.5->1.2.6 and Alpine headers 3.20->3.24 (kernel 6.6->7.0)#5215

Open
tgross35 wants to merge 9 commits into
rust-lang:mainfrom
tgross35:musl-bump
Open

ci: Bump musl 1.2.5->1.2.6 and Alpine headers 3.20->3.24 (kernel 6.6->7.0)#5215
tgross35 wants to merge 9 commits into
rust-lang:mainfrom
tgross35:musl-bump

Conversation

@tgross35

Copy link
Copy Markdown
Contributor

Based on #5175

tgross35 and others added 8 commits June 24, 2026 03:34
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
@rustbot rustbot added the A-CI Area: CI-related items label Jun 24, 2026
@tgross35

Copy link
Copy Markdown
Contributor Author

@tgross35 tgross35 force-pushed the musl-bump branch 4 times, most recently from 21689af to 7685cd8 Compare June 25, 2026 05:11
@tgross35

Copy link
Copy Markdown
Contributor Author

I did the paths wrong so this needs rust-lang/ci-mirrors#36, then should be good to go.

@tgross35 tgross35 marked this pull request as ready for review June 25, 2026 05:23
@rustbot

rustbot commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

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