-
Notifications
You must be signed in to change notification settings - Fork 842
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
Setup.hs: /usr/bin/ar: permission denied on OS X 10.11 "El Capitan" #563
Comments
Is it possible you ran
|
I executed this script and it turned out that every file's owner is me. I haven't executed any sudo with stack. I am running El Capitan, which doesn't allow writing to /usr/bin but I guess stack doesn't need that permission anyway, right? This is really strange. |
We haven't tested on El Capitan, so thank you for being a guinea pig! Stack should not be writing anywhere outside your home directory. Do regular |
I haven't install cabal or ghc on this system. I suppose stack can work without them? But on a similar system cabal works fine...I will give it a try anyway. |
Same with
|
/Library/Developer/CommandLineTools/usr/bin has a copy of those utilities. Is it possible to let stack use those binaries? Is there some environment variables that can be used to achieve this? |
@alexbiehl I have read this. The strange part is that all files to be written is inside ~/.stack, which should have no permission issue as I have verified using the |
Strange enough I can do this: It then fails with The strange thing is that |
Closing this issue here since it appears to be a problem with the upstream Cabal library rather than in stack itself. Here's hoping it's resolved before GHC 7.10.2 is released so at least that works out-of-the-box on El Capitan. |
Actually, changed my mind and am re-opening since it looks like it may be possible to implement a workaround if that turns out to be necessary. Will watch the upstream issue and see where that's going as we get closer to a non-beta El Capitan release. |
|
I just realized maybe I could adjust |
It seems to be a problem of GHC 7.8.4. See updates here. We just need to await GHC 7.10.2 out and use it on El Capitan 😂. By the way, is it possible to force stack to use GHC 7.10.1 right now? |
The GHC version is determined by the resolver setting in stack.yaml. |
As I commented on cabal issue the problem is most likely in I don't know what we can do with this. Either ask ghc maintainers to make ghc 7.8.5 with only EDIT building with nightly snapshot seems fine. |
Is someone who has El Capitan to test with willing to try building stack with a newer version of the |
I could do it tonight, seven/eight hours later.
|
@manny-fp the issue is that Example after steps in haskell/cabal#2653 (comment)
Notice So somehow you have to get good |
So from today's HWN it sounds like the GHC team is not planning to release a bugfix for ghc-7.8, and I think we'll have to follow their lead (anything else would require an ugly workaround of installing a different Cabal library -- not impossible, but but probably not worth doing, unless somebody feels like making a PR). This can be worked around by disabling rootless mode on El Capitan (HWN includes instructions). It sounds like ghc-7.10.1 should already be working on El Capitan. Has anyone tried stack with ghc-7.10.1 (e.g. with a recent nightly snapshot) on El Capitan? I'm curious if the current binaries (build with ghc-7.8.4) work, or if it will require building a new stack binary with ghc-7.10.x. |
stack binary works perfectly on El Capitan + ghc-7.10.1. stack uses system |
Ok, thanks, that's what I thought but just wanted someone to confirm it by actually trying it. |
Would it be possible to fail fast if stack tries to install ghc < 7.10 on El Capitan? (It would be much nicer to have a sane error message, since as stated above this won't be fixed.) |
We shouldn't blanket-disallow 7.8.4 on El Capitan, since some people may disable rootless mode. So if we want it to fast-fail, it should be done by performing a test that will fail if rootless is enabled, rather than just checking the OS version. A pull request would be appreciated. |
What is the current status of this ? ghc 7.10.2 here, and a fresh install of stack, but attempted stack installs still fail on OS X 10.11.1 with:
Is there any route to a clean install or other fix which would enable stack to work without suspending rootless mode ? |
It looks like you're using ghc-7.8.4. What is your resolver set to? |
Forgive me, but I have no idea :-) which file do I look at ? (as far as I am aware there is no copy of 7.8.4 on the system) stack.yaml shows: resolver: lts-2.14 |
Thanks ! Your question prompted me to edit Working now :-) |
El capitan issues described here: commercialhaskell/stack#563
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
Includes workaround to stack.yaml config to auto install alex/happy: commercialhaskell/stack#595 (comment) Uses lts-5.11 (GHC 7.10) for El Capitan compatibility: commercialhaskell/stack#563
Just to mention I am on OS Sierra and I still get this issue |
I am playing with stack. I tried to install some packages with it:
But for every dependency it tried to install there was permission issue:
Turning on verbose mode, I saw the following output:
I don't think stack was trying to write to some place it should not do. Where could the problem be? Am I using stack in a wrong way?
The text was updated successfully, but these errors were encountered: