Skip to content

Upgrade windows docker images base to Ubuntu 24.04#1755

Open
Raniz85 wants to merge 1 commit intocross-rs:mainfrom
Raniz85:ubuntu-24.04-pc-windows-gnu
Open

Upgrade windows docker images base to Ubuntu 24.04#1755
Raniz85 wants to merge 1 commit intocross-rs:mainfrom
Raniz85:ubuntu-24.04-pc-windows-gnu

Conversation

@Raniz85
Copy link

@Raniz85 Raniz85 commented Mar 11, 2026

Newer versions of Rust require a newer version of MingW.

Fixes #1754, #1737

@Emilgardis
Copy link
Member

/ci try --target *indows-gnu

@github-actions

This comment has been minimized.

@github-actions
Copy link

Try run for comment

Failed Jobs

@Raniz85
Copy link
Author

Raniz85 commented Mar 11, 2026 via email

@Emilgardis
Copy link
Member

have a look at #1580 also, where we've been trying to bump the image

Newer versions of Rust require a newer version of MingW.

Fixes cross-rs#1754, cross-rs#1737
@Raniz85 Raniz85 force-pushed the ubuntu-24.04-pc-windows-gnu branch from 82b57ad to 38d5272 Compare March 12, 2026 12:37
@Raniz85
Copy link
Author

Raniz85 commented Mar 12, 2026

This turned out to be quite the rabbit hole. Made deeper because I haven't worked with C++ for some 20 years :S

I've spent considerable time trying to figure out what goes wrong - with a lot of help from pushing Claude in various directions.

The issue seems to be that the rust-cmake-hello-world crate is incompatible with newer GCC.
The reason that Claude gave me is that re2 uses call_once which is reliant on thread locals and this doesn't work with MingW-GCC-13 across DLL-boundaries. I found some info online that seems to support this (among others, this: llvm/llvm-project#161039).

The solution is to either force libstdc++ to be linked statically (I don't like this solution) or to upgrade RE2 (newer versions doesn't seem to use call_once, which turned out to be a bit of a rabbit hole itself :)

Either way, the fix needs to be done in https://github.com/cross-rs/rust-cmake-hello-world.

I think that upgrading RE2 is the better option, but that will break the test for most (all?) other images right now since they don't support C++17, which Abseil (a dependency of RE2 since ~May 2024) requires - it could help the effort in #1850 though since 24.04 has toolchains that support C++17.

There's a PR open on rust-cmake-hello-world to upgrade RE2, once that is merged, the CI run should pass for these images again (though it will break for pretty much all the other images that use GCC-8 or older).

One option would be to point test.sh to specific revisions of rust-cmake-hello-world instead of main until all images have been updated.

@Raniz85
Copy link
Author

Raniz85 commented Mar 12, 2026

Two questions:

  1. Should I change test.sh to use different refs for rust-cmake-hello-world depending on which image we're testing?
  2. Should we combine this PR with Updated Docker image to Ubuntu-24.04 and Cargo dependencies #1580?

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.

x86_64-pc-windows-gnu image 0.2.5: link failure — GetHostNameW missing from mingw-w64

2 participants