ci(windows): link SDL2main before SDL2 (fixes main after PR #3)#4
Merged
Conversation
Removing SDL2_image exposed a latent link-order bug: libSDL2main.a references SDL symbols (SDL_strlen, SDL_SetMainReady, …) but was linked after libSDL2. MinGW's ld is single-pass, so the references went unresolved. SDL2_image at the tail used to re-pull the SDL archive and mask it. Put SDL2main before SDL2. macOS (static path) unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #3 merged without this follow-up fix (it was pushed to the branch during a network outage, after the merge). main's windows-x64 job is now failing.
Problem
Removing SDL2_image (PR #3) exposed a latent MinGW link-order bug:
libSDL2main.areferences SDL symbols but was linked afterlibSDL2. MinGW's ld is single-pass. SDL2_image at the tail used to re-pull the SDL archive and mask the ordering bug; with it gone, the references go unresolved.Fix
Link
SDL2::SDL2mainbeforeSDL2::SDL2. One-line ordering change in the dynamic-link branch (Linux/Windows). macOS static path unaffected.macOS arm64 / linux / web were all green in PR #3 — this only unblocks windows-x64.