Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc98x: use ghc964 to bootstrap on Darwin #297616

Closed

Conversation

TravisWhitaker
Copy link
Contributor

haskell.packages.ghc963Binary.shake fails to build with this (extremely confusing) linker error on Darwin:

[72 of 72] Linking dist/build/shake/shake
ld: warning: ignoring file /nix/store/9x5cwd0bhsyi79kr7aaygyxkbkymrmxi-clock-0.8.4/lib/ghc-9.6.3/lib/aarch64-osx-ghc-9.6.3/clock-0.8.4-Bnns7LmnhG01nLONJf4lGG/libHSclock-0.8.4-Bnns7LmnhG01nLONJf4lGG.a, building for macOS-arm64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture arm64:
  "_hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziLowLevel_hashInt_closure", referenced from:
      _hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziClass_zdfHashableInt_closure in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_getTime1_closure", referenced from:
      _LufAk_srt in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziLowLevel_hashWord64_closure", referenced from:
      _hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziClass_zdfHashableWord64_closure in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_zdwtoNanoSecs_closure", referenced from:
      _LufAf_srt in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_Monotonic_closure", referenced from:
      _Lsfp9_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
      _extrazm1zi7zi14zmC0NyHfWRM5MFtpHgm996cH_SystemziTimeziExtra_duration1_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_getTime1_info", referenced from:
      _Lsfp9_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
      _extrazm1zi7zi14zmC0NyHfWRM5MFtpHgm996cH_SystemziTimeziExtra_duration1_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_zdwtoNanoSecs_info", referenced from:
      _LcfzD_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_zdwnormalizze_info", referenced from:
      _Lcfzs_info in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_ghczuwrapperZC0ZChashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofESZCDataziHashableziLowLevelZChashablezufnvzuhashzuoffset", referenced from:
      _Lccgd_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _LcdAH_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _LcgYU_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _Lch0Y_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _Lchlx_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _Lchnw_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _Lchpu_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      ...
  "_hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziLowLevel_hashInt64_closure", referenced from:
      _hashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofES_DataziHashableziClass_zdfHashableInt64_closure in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
  "_clockzm0zi8zi4zmBnns7LmnhG01nLONJf4lGG_SystemziClock_zdwnormalizze_closure", referenced from:
      _LufAg_srt in libHSextra-1.7.14-C0NyHfWRM5MFtpHgm996cH.a(Extra.o)
  "_ghczuwrapperZC1ZChashablezm1zi4zi3zi0zmA9LFXpiwTxs1MJiRE3ofESZCDataziHashableziLowLevelZChashablezufnvzuhash", referenced from:
      _LcVe7_info in FileInfo.o
      _Ls1edD_info in Cloud.o
      _Ls2zGO_info in Files.o
      _Ls2xXm_info in Derived.o
      _Lsa90_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _LcdzG_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      _Lsb7C_info in libHShashable-1.4.3.0-A9LFXpiwTxs1MJiRE3ofES.a(Class.o)
      ...
ld: symbol(s) not found for architecture arm64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
ghc-9.6.3: `clang' failed in phase `Linker'. (Exit code: 1)

This prevents us from building GHC 9.8.x on Darwin. haskell.packages.ghc963.shake has no such issue.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Mar 21, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Mar 21, 2024
@mpscholten
Copy link
Contributor

Some existing discussion on this issue is on #296909 :) Hope we can get the fix merged soon 👍

@TravisWhitaker
Copy link
Contributor Author

Closing in favor of #296909 or #297418

Damn, how do I so consistently manage to miss such duplicates?

Frankly I don't think it matters much if we bootstrap 9.8.x with a binary or Nix-built 9.6.x (maybe it matters for Hydra though?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: haskell 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants