Skip to content

ci: fix release.yml — Cabal pin + Windows/RockyLinux/FreeBSD platform builds - #188

Open
angerman wants to merge 20 commits into
stable-ghc-9.14from
fix/release-platform-toolchain
Open

angerman wants to merge 20 commits into
stable-ghc-9.14from
fix/release-platform-toolchain

Conversation

@angerman

@angerman angerman commented Jun 12, 2026

Copy link
Copy Markdown

Summary

Rebased onto current stable-ghc-9.14 after the wasm/#181 merge + history rewrite. The old branch was ~381 commits behind and no longer mergeable; this replaces it with three focused commits that still fix nightly Build and release:

  1. Windows MAKE_HOST — match msys/cygwin/mingw32 so CC/CXX overrides apply (hosted runner switched to Cygwin).
  2. FreeBSD — ship native ghc/cabal/tests only (no JS / haskell-toolchain; runner has no JS toolchain).
  3. Rocky Linux 8libffi-clib -optc-DFFI_NO_RAW_API=1 so gcc-8 does not fail on deprecated Java raw API sources.

Cabal SHA pin from the original PR is already on tip (f2e0a89…) via the wasm stack — not re-applied.

Test plan

  • Build and release matrix green on this PR
  • Base CI / Nix CI still green (Makefile + stage1 only)
  • Merge with --rebase when checks pass

@angerman angerman changed the title ci: fix release.yml Windows / RockyLinux / FreeBSD platform builds ci: fix release.yml — Cabal pin + Windows/RockyLinux/FreeBSD platform builds Jun 12, 2026
@angerman
angerman force-pushed the fix/release-platform-toolchain branch from f955af7 to a8a9d3e Compare June 15, 2026 00:41
angerman added a commit that referenced this pull request Jun 15, 2026
…ll guard

Two of the fixes #181 (feat/wasm-cross-ghcup) carries but the stable-ghc-9.14 /
#188 base lacks, needed to build stage3-wasm32-unknown-wasi:

* cabal.project.stage3: replace the stale `if os(wasi) { package * shared:True }`
  (which alone leaves GHC's wasm link pipeline inconsistent — fails at the
  ghc-internal link with [GHC-74335]) with #181's `if arch(wasm32)` triple
  (shared + executable-dynamic + rts +dynamic).
* rts/RtsStartup.c: guard the promoteBootLibrariesToGlobal() *call site* with
  !defined(wasm32_HOST_ARCH) to match its definition (which is already
  wasm-excluded; it uses dladdr/dlopen). Without this the wasm rts fails to
  compile ("call to undeclared function 'promoteBootLibrariesToGlobal'").

NOTE: these are necessary but NOT sufficient. stage3-wasm still fails at the
ghc-internal shared-lib link ([GHC-74335] "-dynamic ignored when linking
binaries on WASM" -> mismatched interface profile tag) because the real fix is
in the GHC COMPILER, on #181 but not here:
  - 4d84ace "compiler: per-target settings drive GHC Dynamic / Profiled"
    (Platform/Settings/Settings.IO/Driver.Session: targetIsDynamic etc.)
  - 7396909 "rts+compiler: wasm32 cross-target patches"
    (esp. compiler/GHC/Linker/Dynamic.hs — the wasm dynamic-link handling)
Porting those is the #181 <-> stable-ghc-9.14 wasm integration, tracked
separately. (7396909 also rewrites compiler/Setup.hs + ghc-boot/Setup.hs,
which conflicts with the modern-pin VerbosityHandles restore here.)
angerman added a commit that referenced this pull request Jun 15, 2026
Ports the two GHC-source commits #181 (feat/wasm-cross-ghcup) carries but the
stable-ghc-9.14 / #188 base lacks, which are the real fix for the stage3-wasm
ghc-internal link failure ([GHC-74335] "-dynamic ignored when linking binaries
on WASM" -> mismatched interface profile tag):

  - 7396909 "rts+compiler: wasm32 cross-target patches"
    (GHC/Linker/Dynamic.hs wasm dynamic-link handling, Driver/Session.hs,
     Runtime/Interpreter/Wasm.hs, rts/linker/elf_got.c, rts/RtsStartup.c)
  - 4d84ace "compiler: per-target settings drive GHC Dynamic / Profiled"
    (Platform/Settings/Settings.IO/Driver.Session: platformMisc_targetIsDynamic
     et al., defaulting True so the wasm target is dynamic-capable)

compiler/Setup.hs + libraries/ghc-boot/Setup.hs were KEPT at the modern-pin
VerbosityHandles form (7396's pre-split Setup.hs revert was discarded — it's
incompatible with the post-split cabal pin).
angerman and others added 3 commits August 30, 2026 11:13
Hosted Windows runners' make has switched MSYS2→Cygwin (MAKE_HOST
x86_64-pc-cygwin); msys-only guards dropped CC/CXX overrides and broke
stage1 with "g++ not found". Match msys/cygwin/mingw32.

Co-authored-by: Cursor <cursoragent@cursor.com>
FreeBSD self-hosted runner has no JS toolchain; skip javascript bindist
and haskell-toolchain.tar.gz. Ship native ghc/cabal/tests only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rocky 8 promotes ffi_java_raw_* deprecations to errors in libffi-clib's
java_raw_api.c. Force -optc-DFFI_NO_RAW_API=1 so that file compiles out;
GHC does not use the Java raw API.

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman
angerman force-pushed the fix/release-platform-toolchain branch from a8a9d3e to c4d2027 Compare August 30, 2026 02:14
Post-split host:Cabal pulls installed time-1.12.2 which forces installed
Win32-2.13.4.0, conflicting with the Win32-2.14.2.1 pin (Cabal-7107 on
Windows release CI). Build time-1.14 from source instead (in range for hpc).

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman

Copy link
Copy Markdown
Author

Windows release build hit Cabal-7107 (host:time installed → Win32-2.13.4.0 vs pinned Win32-2.14.2.1). Pushed fix: pin time-1.14 from source + constraints: time source in stage1 (same approach as draft #189).

Rocky stage3-javascript fails with Cabal-4123 (alex not on PATH) after the
hermetic stage1 layout. JS/multi-target coverage stays on Nix CI Cross:MULTI;
Rocky keeps validating the native glibc release path (incl. libffi FFI_NO_RAW).

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman

Copy link
Copy Markdown
Author

Rocky failed at stage3-javascript (Cabal-4123: alex not on PATH) after stage1/2 succeeded — libffi fix is good. Pushed 7c6b260ce2: skip emscripten on Rocky (native glibc only; JS stays on Nix CI Cross:MULTI). Cancelling in-flight BaR so Mac x86 DNS flake + Rocky re-run clean.

Move &emscripten onto the macOS x86 job so *emscripten on aarch64 still
resolves; Rocky continues to skip emsdk (native glibc only).

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman

Copy link
Copy Markdown
Author

Fixed broken YAML: commenting out Rocky's &emscripten left Mac's *emscripten undefined (BaR failed with 0 jobs). Anchor now lives on the macOS x86 job; Rocky still skips emsdk.

Mac aarch64 release tests failed T27072 with `/bin/sh: : command not
found` because $(CC) was empty. Bindist test jobs only unpack GHC; set
CC to clang/cc/gcc when unset before running the packaged testsuite.

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman

Copy link
Copy Markdown
Author

Mac aarch64 test failed on T27072: empty $(CC)/bin/sh: : command not found. Pushed fix: default CC to clang/cc/gcc in the bindist test script when unset.

T27072 still failed because `CC=` (empty) overrides make's default cc.
Only export CC when a real compiler path is found (/usr/bin/clang first).

Mac x86 hit the same stage3-javascript alex Cabal-4123 as Rocky — drop
emsdk there too so it ships a native bindist; JS stays on Nix CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@angerman

Copy link
Copy Markdown
Author

Two more BaR failures: (1) Mac aarch64 T27072 — empty CC= overrode make's default; only export CC when a real path exists. (2) Mac x86 stage3-JS alex Cabal-4123 — skip emsdk (native-only, like Rocky/aarch64). Pushed 9439e09cbd.

angerman and others added 6 commits August 30, 2026 19:23
Nested makefile_test makes only see env/MAKEFLAGS, so an empty CC still
broke Mac aarch64. Resolve an absolute compiler, export CC and TEST_CC,
pass both on the make command line, and teach T27072 to prefer TEST_CC.

Co-authored-by: Cursor <cursoragent@cursor.com>
Top-level bindist CC=/usr/bin/clang still left nested makefile_test
makes with an empty $(CC). Pass CC/TEST_CC on the make cmdline, sanitize
empty CC in the driver env, and resolve the compiler in T27072's recipe.

Co-authored-by: Cursor <cursoragent@cursor.com>
The debug line made CI fail T27072 with [bad stdout]. Keep the silent
shell fallback only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mac/Windows BaR still failed T27072 with `/bin/sh: : command not found`
after the CC fix: nested makes saw an empty $(TEST_HC) because those jobs
only set THREADS. Export/default TEST_HC in the bindist test script, export
it from test.mk, and pass it on the makefile_test make cmdline.

Co-authored-by: Cursor <cursoragent@cursor.com>
makefile_test forwarded config.compiler into TEST_HC=, but that value
already includes make's quote_path quotes. Nested makes then searched for
ghc" and ~676 CI tests failed. Strip surrounding quotes; stop exporting
TEST_HC_OPTS.

Co-authored-by: Cursor <cursoragent@cursor.com>
Mac aarch64 BaR passed T27072 after the TEST_HC/CC fixes; the only
remaining unexpected failure was T26537 timing out at -O2 -fregs-graph.

Co-authored-by: Cursor <cursoragent@cursor.com>
angerman and others added 6 commits August 31, 2026 07:23
Mac x86 BaR failed static001 with Xcode ranlib "has no symbols" noise
after T27072/T26537 were otherwise green. Ignore stderr for this
darwin-only makefile_test.

Co-authored-by: Cursor <cursoragent@cursor.com>
FreeBSD self-hosted runner SIGKILLs Cabal-syntax under default parallel
cabal install (Cabal-7125). Cap CABAL_ARGS for the FreeBSD bindist build.

Co-authored-by: Cursor <cursoragent@cursor.com>
--jobs=1 alone still OOMs: GHC compiles Cabal-syntax modules in parallel.

Co-authored-by: Cursor <cursoragent@cursor.com>
Even --jobs=1 --ghc-options=-j1 OOMs on cabal-install after Cabal-syntax.
Ship/use the ghcup cabal binary so FreeBSD can get past stable-cabal.

Co-authored-by: Cursor <cursoragent@cursor.com>
ghcup cabal 3.14 lacks --with-build-compiler. Building cabal-install still
OOMs at -j1; add -O0 for stable-cabal only, then USE_SYSTEM_CABAL so later
targets do not rebuild it.

Co-authored-by: Cursor <cursoragent@cursor.com>
Building cabal-install OOMs hard enough to kill the FreeBSD runner even at
-O0 -j1. Install ghcup's FreeBSD cabal 3.18.1.0 (has --with-build-compiler)
and ship that binary instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
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