Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GHC - Mac OS X - ld: unknown option: -no_pie

When I try to compile a simple Hello World in Haskell and compile with
ghc --make Main.hs
I get:
Linking Main ...
ld: unknown option: -no_pie
collect2: ld returned 1 exit status

I'm on Mac OS X 10.6.8. I used to be able to compile without this error, but I haven't used GHC for a while, so I must've installed or broken something in that period.

like image 785
Brandon oubiub Avatar asked Jan 23 '26 13:01

Brandon oubiub


1 Answers

Leopard got rid of no-pie for a period: http://trac.macports.org/ticket/34064

As the comments note, upgrading xcode/ld to more recent versions enables the flag.

like image 114
sclv Avatar answered Jan 25 '26 03:01

sclv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!