valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.44k stars 111 forks source link

/usr/bin/ar: permission denied when running haste-boot #353

Closed simonjrp closed 8 years ago

simonjrp commented 8 years ago

I can't run haste-boot after a fresh installation on El Capitan (via cabal). I immediately get "/usr/bin/ar: permission denied", even when running as root. This might be related to the "System Integrity Protection" that Apple introduced in OS X El Capitan.

Edit: Seems to work if one disables SIP before running haste-boot (boot into safe mode and run "csrutil disable"), and then re-enables it again afterwords.

valderman commented 8 years ago

That's interesting, and slightly weird: Haste should never be calling ar. Does your .cabal/config contain shared: True or any other interesting flags? This seems like it may be related to, or at least the same kind of problem as, #348.

bananu7 commented 8 years ago

It's called by haste-boot which calls haste-cabal which tries to call ar. I can, sadly, reproduce. No shared: True.

And I'm pretty sure it's related to this main cabal issue.

I have unix 2.7.1.0 installed system-wide, but I suppose haste-cabal is downloaded as a binary and thus might have older version in it. I'll see if I can build just that from source with new unix.

EDIT: I hit environment problems while building cabal. Will retry soon and see if getting new unix in fixes it. I am pretty sure it will.

atamon commented 8 years ago

@bananu7 I've run into the same issue it seems. I tried building cabal from source as stated in the README, and it includes unix 2.7.1.0 when run. But I still get the same error as above.

Did you get this working, if so, how? :)

Cheers

bananu7 commented 8 years ago

It was a while ago; I think that fixing unix got it to work though.

atamon commented 8 years ago

Alright, thanks for the lead! :)

On Thu, Mar 3, 2016 at 12:45 PM Bartek Banachewicz notifications@github.com wrote:

It was a while ago; I think that fixing unix got it to work though.

— Reply to this email directly or view it on GitHub https://github.com/valderman/haste-compiler/issues/353#issuecomment-191722042 .

valderman commented 8 years ago

Until this is fixed (and even after that - this build is finicky), it's highly recommended that you use the pre-built binaries for non-Linux platforms. Not only does this have a substantially higher likelihood of working, but you also get niceties such as manual pages and not having to wait forever for haste-boot to complete.

saurabhnanda commented 8 years ago

I have downloaded the pre-build Haste binary and am trying to compile https://github.com/yamafaktory/reflex-starter with it.

vilhelms commented 8 years ago

Unfortunately, I don't think using the pre-build binary is a solution, because the haste-cabal that comes with it still doesn't seem to work:

$ haste-cabal install parsec
haste-cabal: /usr/bin/ar: permission denied
valderman commented 8 years ago

Fixed as of release 0.5.5.1.

saurabhnanda commented 8 years ago

So, time to try reflex-frp with haste now?

On 16 Oct 2016 4:06 am, "Anton Ekblad" notifications@github.com wrote:

Fixed as of release 0.5.5.1.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/valderman/haste-compiler/issues/353#issuecomment-254015262, or mute the thread https://github.com/notifications/unsubscribe-auth/AABu0W63w0Shuwtdnoo816D15x-nTh3oks5q0VV4gaJpZM4Gv6g- .