-
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
Example fails on macOS Big Sur (11.0.1) #1442
Comments
Thanks for reporting this! Unfortunately, I don't have a Big Sur machine available to reproduce this issue. The relevant code in rules_haskell is here. You can inspect the state of the filesystem after the failed operation by looking around in the following directory
Something that stands out: The files on which the error is reported are, I think, all symbolic links. On Linux, I see that A possible workaround would be to hard code the list of files to avoid accessing the symlinks (the GHC version may need to be adjusted): diff --git a/haskell/ghc_bindist.bzl b/haskell/ghc_bindist.bzl
index 6194cf3b..feca3a73 100644
--- a/haskell/ghc_bindist.bzl
+++ b/haskell/ghc_bindist.bzl
@@ -281,11 +281,11 @@ def _ghc_bindist_impl(ctx):
execute_or_fail_loudly(ctx, ["./configure", "--prefix", bindist_dir.realpath])
execute_or_fail_loudly(ctx, ["make", "install"])
ctx.file("patch_bins", executable = True, content = r"""#!/usr/bin/env bash
-grep --files-with-matches --null {bindist_dir} bin/* | xargs -0 -n1 \
sed -i.bak \
-e '2i\
DISTDIR="$( dirname "$(resolved="$0"; while tmp="$(readlink "$resolved")"; do resolved="$tmp"; done; echo "$resolved")" )/.."' \
- -e 's:{bindist_dir}:$DISTDIR:'
+ -e 's:{bindist_dir}:$DISTDIR:' \
+ bin/{ghc,ghc-pkg,ghci,haddock,runghc}-8.8.3
""".format(
bindist_dir = bindist_dir.realpath,
)) Once we know what changed in Big Sur to introduce this issue we could then try to properly fix the code. |
I see this pattern in the bin directory
Seems like inplace editing using sed on a symlink no longer works, which sort of makes sense.
One of the few references I could find to this error message included some source code from freebsd and apple opensource:
I can try something like a |
On Catalina that last line doesn't give me an error indeed. |
I was testing this idea out as well and it gets me further along the build 👍 . I will validate #1445 (since it's slightly different from what I had). Unfortunately, I was seeing more downstream issues, potentially unrelated to rules_haskell since they are in the zlib compilation part, that I was trying to fix via configuration. The TL;DR version is
|
It looks like the default CC toolchain enables |
@aherrmann, what's exact command (or option) to have -Werror disabled? I tried the this:
Still got the same error in the end. Not sure what else to try. I'm new to this and seeing the same issue when trying to build github/semantic. Having googled for quite some time without any luck. Much appreciated. |
Describe the bug
rules_haskell fails on newest macOS because of
sed
issue. Other downstream issues may exist.To Reproduce
curl https://haskell.build/start | sh bazel build //...
Expected behavior
Example builds
Environment
Additional context
The text was updated successfully, but these errors were encountered: