ci: fix release.yml — Cabal pin + Windows/RockyLinux/FreeBSD platform builds#188
Open
angerman wants to merge 3 commits into
Open
ci: fix release.yml — Cabal pin + Windows/RockyLinux/FreeBSD platform builds#188angerman wants to merge 3 commits into
angerman wants to merge 3 commits into
Conversation
The hosted Windows runner's make changed from MSYS2 (MAKE_HOST=x86_64-pc-msys) to Cygwin (x86_64-pc-cygwin). Both `ifeq ($(MAKE_HOST),x86_64-pc-msys)` guards then fell through, dropping the Windows CC/CXX/LD overrides so CC/CXX defaulted to cc/g++ and ghc-toolchain failed stage1 settings generation with "g++ not found". Match all Windows make-host triples (msys, cygwin, mingw32) via $(filter ...).
release.yml was broken at the root by the Cabal source-repo pin
`tag: stable-haskell/master`, which cabal could not resolve at stage0 (every
platform died building cabal-install). Pin an explicit, resolvable SHA on the
feature/wasm-cross-ghcup-stack branch (aa57a49) which carries the fixes the
build needs:
* host-only `package *` handling, so cabal.project.stage2.dynamic's
`shared: True` no longer builds the build-stage packages shared (those
failed to link against the bootstrap GHC on ~every platform:
"ld: cannot find -lHSbytestring-...-ghc9.8.4");
* #361 target-prefix-aware companion-tool guess (cross ghc-pkg);
* a self ($ORIGIN/@loader_path) rpath entry so an instantiated Backpack
unit finds its signature implementation under musl (testsuite T14304 on
Alpine; glibc masked it via the runtime LD_LIBRARY_PATH GHC sets before
dlopen, which musl ignores).
Adapt the tree to this Cabal:
* cabal.project.stage0: drop the `hooks-exe` subdir (absent on this branch);
* compiler/Setup.hs, libraries/ghc-boot/Setup.hs: revert the Cabal-3.17
Verbosity/VerbosityHandles-split adaptation (this branch predates it);
* cabal.project.stage{1,2.common}: compile out libffi's deprecated (Java)
raw API with -optc-DFFI_NO_RAW_API=1, which RockyLinux 8 gcc treats as a
hard error (GHC does not use that API).
The FreeBSD self-hosted runner has no JS toolchain (llc/opt/emscripten), so it cannot build the javascript-unknown-ghcjs cross target. Drop both the JS bindist and haskell-toolchain.tar.gz (which depends on stage3-javascript-unknown-ghcjs) from the FreeBSD build; ship only the native ghc/cabal/tests bindists.
f955af7 to
a8a9d3e
Compare
7 tasks
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).
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.
Unblocks and fixes the
Build and release(release.yml) pipeline, which hasbeen red on
stable-ghc-9.14every night. Surfaced while validating #181.Four commits, each a distinct root cause:
0. Cabal pin no longer resolves → masks everything (commit 4)
The Cabal source-repo pinned the bare branch
stable-haskell/master, whichstock cabal-3.14.2.0 fails to resolve in its shallow git fetch at stage0
("fatal: Failed to resolve stable-haskell/master as a valid revision",
Makefile:560). Every platform aborts here before any build step — the real
first failure behind the daily-red nightly. Now SHA-pinned to the current
stable-haskell/mastertip (843fceb) across all four stage project files(base already carries the
ghc-boot/Setup.hsVerbosity adaptation, so it'sAPI-compatible).
1. Windows —
make-host guard (commit 1)Hosted Windows runner's
makeswitched MSYS2→Cygwin (MAKE_HOSTnowx86_64-pc-cygwin); bothifeq ($(MAKE_HOST),x86_64-pc-msys)guards missed,dropping the Windows CC/CXX/LD overrides →
g++ not foundin stage1 settingsgen. Now matches msys/cygwin/mingw32 via
$(filter …).2. RockyLinux 8 — libffi-clib
-Werror(commit 2)Rocky-8 gcc makes libffi-clib's deprecated-declaration a hard error in stage1.
Adds
-optc-Wno-errorfor libffi-clib incabal.project.stage1(mirrorsstage2.common; no
-no-rts— stage1 uses the stock bootstrap GHC).3. FreeBSD — JS cross target (commit 3)
FreeBSD self-hosted runner has no JS toolchain; it built
ghc-javascript-…unconditionally and failed at
stage3-javascript-unknown-ghcjs. Now ships onlythe native FreeBSD bindist.
Verified by
release.yml+ baseCIon this PR.