haskell / happy

The Happy parser generator for Haskell
Other
288 stars 84 forks source link

error: Malformed Mach-o file #127

Closed zoecarver closed 6 years ago

zoecarver commented 6 years ago

I think this is the right place to put this issue - if not just let me know and I can move it.

I am trying to install happy with cabal (cabal install happy). It seems to work but when I try to run happy I get the following error:

$ happy
[1]    45269 killed     happy
$ lldb happy 
(lldb) run
error: Malformed Mach-o file

Installing

$ cabal install happy
clang-6.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
Configuring happy-1.19.9...
Building happy-1.19.9...
Installed happy-1.19.9
Warning: could not create a symlink in /Users/zoe/.cabal/bin for happy because
the file exists there already but is not managed by cabal. You can create a
symlink for this executable manually if you wish. The executable file has been
installed at /Users/zoe/.cabal/bin/happy

I am not exactly sure what it means with the warning at the end. I have made sure that happy does not exist on my machine and the file /Users/zoe/.cabal/bin/happy does not exist prior to install.


Info

cabal version: 2.2.0.0 OS: MacOS version: 10.13.5

simonmar commented 6 years ago

I doubt this is caused by Happy itself. Perhaps try moving your /Users/zoe/.cabal dir out of the way and try again?

zoecarver commented 6 years ago

You were right. Re-installing cabal ended up fixing it. Thanks for the help.