-
Notifications
You must be signed in to change notification settings - Fork 81
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
ghc_wrapper
is killed on MacOS arm64 running tests under rules_haskell_tests
#2101
Comments
Looking at the error message, the relevant code is probably here: rules_haskell/haskell/private/cc_wrapper.py.tpl Lines 932 to 939 in b2baa5f
|
I tracked this down to how the |
…nking On aarch64 Darwin, when using a nixpkgs provided cc toolchain, we have [seen][1] the linking step to fail as the process got killed: ``` bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_haskell/haskell/ghc_wrapper: line 80: 90734 Killed: 9 "${compile_flags[@]}" "${extra_args[@]}" 2>&1 90736 Done | drop_loaded_and_warning 1>&2 ``` More specifically this happened when trying to add an rpath to a dylib calling the `install_name_tool`, but running the same command manually succeeded. This seems to be caused by mixing different tools from stdenv.cc and darwin.cctools, especially the fact that the tools from the latter overwrote tools from the former. Only add missing tools not provided by the current cc toolchain from the darwin.cctools package instead. [1]: tweag/rules_haskell#2101
@avdv Good find. Can we close this issue or do you think that there is more work to do here? |
@cgrindel Maybe we should upgrade rules_nixpkgs to a revision that has this fix? WDYT? |
That is a good idea. Should we create a separate issue to track? |
👍 done: #2119 |
Describe the bug
The
ghc_wrapper
is killed when executingbazel test //...
inrules_haskell_tests
on MacBook Pro (M2 Pro).To Reproduce
Change into
rules_haskell_tests
.cd rules_haskell_tests
Create
.bazelrc.local
file.Build and test.
BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 bazel test //...
Expected behavior
Success.
Environment
Additional context
Messages found in MacOS Console
Possible related to input-output-hk/haskell.nix#2018.
The text was updated successfully, but these errors were encountered: