Skip to content

Fix CI failures from updated runner images (deriveConstants, ld warnings)#180

Merged
angerman merged 3 commits into
stable-ghc-9.14from
fix/macos-ld-reexport-warning
Apr 5, 2026
Merged

Fix CI failures from updated runner images (deriveConstants, ld warnings)#180
angerman merged 3 commits into
stable-ghc-9.14from
fix/macos-ld-reexport-warning

Conversation

@angerman

@angerman angerman commented Apr 4, 2026

Copy link
Copy Markdown

Summary

Fixes CI build/test failures caused by updated GitHub Actions runner images.

  • deriveConstants: split CC flags from program path — Recent macOS and Windows runner images set CC to "/usr/bin/cc -std=gnu23". deriveConstants passed the entire string to rawSystem as an executable path, failing on Mac x86_64, Mac aarch64, and Windows.
  • ghc-internal: use struct _utimbuf on Windows — With -std=gnu23, clang on MSYS2/CLANG64 now errors on the type mismatch between struct utimbuf (POSIX) and struct _utimbuf (Windows _utime parameter). Use the correct Windows type name in the CTYPE pragma.
  • testsuite: normalise macOS ld reexported library warning — The macOS-13 runner now ships Homebrew llvm@18, whose libunwind triggers a linker warning on every ld invocation, causing ~190 spurious test stderr mismatches on Test binary (Mac x86_64).

Test plan

  • Mac x86_64, Mac aarch64, and Windows builds succeed
  • Test binary (Mac x86_64) passes (reexported library warning filtered)
  • Windows ghc-internal compiles without -Wincompatible-pointer-types error

angerman added 2 commits April 4, 2026 14:38
The macOS-13 GitHub Actions runner now ships with Homebrew llvm@18,
whose libunwind triggers a linker warning on every invocation:

  ld: warning: reexported library with install name
  '/usr/local/opt/llvm@18/lib/libunwind.1.dylib' ... couldn't be
  matched with any parent library and will be linked directly

This causes ~190 spurious test failures (bad stderr / stderr mismatch)
on the Mac x86_64 CI. Filter the warning in both normalise_errmsg and
normalise_output, alongside the existing macOS ld warning patterns.
Recent macOS and Windows CI runner images set CC to include flags
(e.g. "/usr/bin/cc -std=gnu23"). The --gcc-program argument was
passed directly to rawSystem which treats the entire string as an
executable path, causing:

  deriveConstants: /usr/bin/cc -std=gnu23: rawSystem: posix_spawnp:
  does not exist (No such file or directory)

Split the --gcc-program value on whitespace: the first word becomes
the program path, remaining words are prepended to the gcc flags.
@angerman angerman changed the title testsuite: normalise macOS ld reexported library warning Fix CI failures from updated runner images (deriveConstants, ld warnings) Apr 4, 2026
On Windows (MSYS2/CLANG64), the _utime function expects a
struct _utimbuf pointer. The CUtimbuf CTYPE was declared as
"struct utimbuf" which worked when clang treated them as compatible,
but with -std=gnu23 (now the default on updated CI runner images)
clang errors on the type mismatch:

  incompatible pointer types passing 'struct utimbuf *' to
  parameter of type 'struct _utimbuf *'

Use the correct Windows type name in the CTYPE pragma.
@angerman angerman merged commit b118611 into stable-ghc-9.14 Apr 5, 2026
61 of 62 checks passed
@angerman angerman deleted the fix/macos-ld-reexport-warning branch April 5, 2026 08:52
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.

1 participant