validation: post-split cabal re-pin + stage-qualified host-only (DO NOT MERGE — pins WIP cabal#378)#189
Draft
angerman wants to merge 7 commits into
Draft
validation: post-split cabal re-pin + stage-qualified host-only (DO NOT MERGE — pins WIP cabal#378)#189angerman wants to merge 7 commits into
angerman wants to merge 7 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.
Replace the pre-split aa57a49 pin (feature/wasm-cross-ghcup-stack) with
feat/wasm-cross-ghcup-stack-next (ee3b55e6): stable-haskell/cabal's
wip/andrea/stage-qualified-options (#378, Host-only `package *` handling)
+ target-prefixed ghc-pkg guess (#361) + absolute-rpath relativization
(#368) + the $ORIGIN/@loader_path self-rpath (#385, musl T14304).
Being post-split, the next branch carries the Cabal-3.17 VerbosityHandles
API and the hooks-exe sub-dir, so two adaptations the aa57a49 pin forced
are no longer needed and are reverted here:
* compiler/Setup.hs, libraries/ghc-boot/Setup.hs: restore the upstream
`#if MIN_VERSION_Cabal(3,17,0)` VerbosityHandles form (un-revert).
* cabal.project.stage0: restore the hooks-exe sub-dir.
The libffi-clib FFI_NO_RAW_API workaround (Rocky gcc-8) is unrelated to
the pin and is kept. Tracked by stable-haskell/cabal#384; re-pin to
`master` once #378 lands there.
The post-split Cabal (#378, `package <stage>:*`) does not treat an unqualified
`package *` as host-only the way the pre-split aa57a49 pin did, so a bare
`package * { shared: True }` here also built the BUILD-stage tools shared and
they failed to link the bootstrap GHC's static-only libs
("ld: library not found for -lHSbytestring-...-ghc9.8.4", on build:os-string).
Split it per #378's own fixture: `package host:*` carries shared/dynamic,
`package build:*` forces the build tools static. Validated locally:
stage0+stage1+stage2 (DYNAMIC=1) build green on aarch64-darwin and stage2 ghc
is dynamically linked (@rpath/libHSghc-9.14-ghc9.14.dylib).
Consolidates the cabal.project changes for the post-split Cabal pin: - stage1 hermetic build: `active-repositories: :none` + pin happy/alex/ happy-lib/hpc so stage1 build-tools don't float to Hackage's newest (a floated happy produces parser code mismatching the pinned template -> genprimopcode/GHC-44432). stage2/stage3 already did this. (stable-haskell/ cabal#384) - stage1 `time-1.14` as source: the post-split host Cabal-3.17.0.1 pulls in `time`; the bootstrap's installed time-1.12.2 is bound to installed Win32-2.13.4.0 and conflicts with the pinned source Win32-2.14.2.1 on Windows. time-1.14 is the newest release satisfying hpc-0.7.0.2's `time >=1.2 && <1.15` (1.15 backjumps on host:hpc/host:time). - re-pin Cabal ee3b55e6 -> f2e0a89 (stage0/1/2.common/3): f2e0a89 fixes cross build-stage `ar` archiving — it derives -L/@-file support from the actual ar program (its --version) instead of the host/target compiler's claim, with a non-throwing probe so Apple cctools `ar` (no --version) falls back to the conservative path. Without it, build-stage happy-lib failed to archive on RockyLinux 8 (GNU ar, -qL) and macOS x86_64 (cctools ar, @-file).
The post-split Cabal-syntax now knows ExplicitLevelImports and ImplicitStagePersistence, so T4437 no longer reports them as "GHC-only" extensions; the two stale lines are removed from the golden.
25d5e45 to
13636ca
Compare
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.
Validation only — DO NOT MERGE. This pins the WIP cabal branch
feat/wasm-cross-ghcup-stack-next(stable-haskell/cabal #378 host-only +#361 + #368 + #385
$ORIGIN), to validate the eventual post-split re-pinacross the full release matrix. It cannot merge until cabal #378 lands.
Replaces the pre-split
aa57a49pin and drops both pre-split hacks:compiler/Setup.hs+ghc-boot/Setup.hsrestored to the upstream#if MIN_VERSION_Cabal(3,17,0)VerbosityHandlesform.cabal.project.stage0hooks-exesub-dir restored.Plus the one adaptation the post-split host-only model needs:
cabal.project.stage2.dynamicstage-qualifies
shared/executable-dynamictohost:*(withbuild:*forcedstatic), because an unqualified
package *no longer scopes host-only on #378.Validated locally on aarch64-darwin: stage0 + stage1 + stage2 (DYNAMIC=1)
green, stage2 ghc dynamically linked. This run exercises the breadth
(DYNAMIC=0, Linux/Windows/FreeBSD/musl, cross). See stable-haskell/cabal#384.