-
Notifications
You must be signed in to change notification settings - Fork 697
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
ar
permission errors on OS X 10.11 El Capitan
with GHC 7.8.4
#2653
Comments
I encountered a similar error a year ago when building on Heroku. Although I don't remember what ultimately solved the problem, one thing you can experiment with is to copy the |
I tried copying to my home dir and it still had the permission issue. |
OK something else is going on here: When I use the --with-ar setup it has a new error: @begriffs seems this is more similar to your issue than I thought. Perhaps there's an issue with running commands from |
|
Doesn't look like that's the case for me: Also, I'm able to run |
/usr/bin/ar also seems to be affected by the new rootless "feature" introduced in 10.11. However, disabling rootless ( |
Weirdly I was unable to move the binary with sudo. Is this a part of rootless as well? I've not yet heard of this feature. |
@Codas, are you sure that rootless really got disabled? there has been a bug with disabling it. |
You were right, rootless was not disabled as I thought it was. The problem is that Now everything seems to be working as expected. |
|
You have to build to install using components that do not require root access. (and/or file a bug with Apple) |
@uchuugaka can you be more specific about what you mean by "build to install using components that do not require root access"? |
Simply disabling rootless isn't enough for everything. Many projects are waking up to realizing they need to find new places they can put things. Directories that are not locked down. I'm still looking into it. macports for example is finding they may need a new directory as their root. |
@uchuugaka Disabling rootless is only a workaround until a real fix is implemented. It doesn't sound like filing a bug with Apple is appropriate at this point. |
|
i had a problem making an alias for X11 in /usr, disabling rootless solved my problem, thanks all |
Rootless: Bans writing to /System, /usr, /bin, /sbin - So far /usr/local isn't write-protected. Homebrew has to contend with the same thing: Homebrew/legacy-homebrew#40837 |
I don't understand how write-protection is preventing |
It is strange that |
@notcome settings for what in particular? |
@lukehoersten which cabal version do you use / how you installed it (Haskell Platform, directly from binary?). I could try to reproduce and investigate this issue this week, as I get another mac to install El Capitan to. |
Confirmed this is still an issue on the
|
@lukehoersten It's strange that I cannot reproduce this error. I am using v1.22.0 and El Capitan 15A216g. But when I tried stack a similar error happened. Which version of GHC are you using? stack + ghc 7.8.4 => permission error |
ghc 7.8.4 for me. This could be the problem here. Can you try cabal w/ 7.8.4 and see if you can reproduce? |
That's the problem:
|
The issue is probably the same as in: haskell/unix#18
|
I installed ghc-7.8.4 from haskell.org site, and it has According to https://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries/VersionHistory there is no way to use EDIT I installed binary GHC 7.10.1 and cabal-install, cannot reproduce with that configuration. |
running $ stack install cabal-install
…
$ hash -r from ghcformacosx/ghc-dot-app#41 fix |
Documenting my solution here for future generations:
At this point I was able to use 7.8.4 as normal. Thanks to @glguy for suggesting the trick with Setup.hs. |
@dagit future generations will be proud of us struggling haskellers |
+1 |
Workaround:
System:
|
Thanks @mcandre that worked for me |
@creswick What is the output of |
It's ~500 lines, so I made a gist: https://gist.github.com/creswick/9489a197d93bb6f009f8 |
@creswick Yes, it looks like the version of Cabal you have installed is built against |
Trying to do this now, without ever disabling SIP. I'd guess disabling SIP, upgrading | tried other solutions but had trouble: @gbaz wrote:
Thanks, but that's not enough, because one also needs a fixed Cabal in the package database. @mcandre wrote:
@phadej wrote:
I think the "sometimes" might depend on |
Isn't it enough to just install the cabal binary (you can get it here now btw: https://www.haskell.org/cabal/release/cabal-install-1.24.0.0/cabal-install-1.24.0.0-x86_64-apple-darwin-yosemite.tar.gz ) and then install the Cabal library using that binary? |
I got this working with @dagit's suggestion (with slight changes)! Corrections:
Output w/ versions:
|
@gbaz Not quite (for me and with the previous binary), because the It might help if you had a newer version of |
@gbaz I partially retract; your suggestion might work with cabal-install 1.24 (not the Dropbox version) because it includes 03b02fb, fixing #2633, as @phadej earlier explained. I haven't tried, but based on #2653 (comment) it should work. EDIT: it worked, as long as I install |
haskell/cabal#2653 setup-Simple-Cabal-1.18.1.5-ghc-7.8.4: /usr/bin/ar: permission denied
…ss to avoid rootless problem cf. haskell/cabal#2653
We can probably just drop support for 7.8 in a future version. Related: haskell/cabal#2653 (comment)
When running cabal operations, things fail with
ar
permission errors:This started happening after upgrading to OS X 10.11. Running with
-v3
does not give any more information including the file thatar
is being run on.Permissions on the
ar
binary are fine and can be run directly with no issue. I suspect the filear
is being run on doesn't have read permissions.The text was updated successfully, but these errors were encountered: