7

i am trying using cabal in order to install some package but i got a error like:

Resolving dependencies...
[1 of 1] Compiling Main             ( /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/HUnit-1.2.4.229829/HUnit-1.2.4.2/Setup.hs, /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/HUnit-1.2.4.229829/HUnit-1.2.4.2/dist/setup/Main.o )

/var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/HUnit-1.2.4.229829/HUnit-1.2.4.2/Setup.hs:6:1:
    Warning: In the use of `runTests'
             (imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
             Deprecated: "Please use the new testing interface instead!"
Linking /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/HUnit-1.2.4.229829/HUnit-1.2.4.2/dist/setup/setup ...
ld: unknown option: -no_pie
collect2: ld returned 1 exit status
[1 of 1] Compiling Main             ( /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/syb-0.3.629829/syb-0.3.6/Setup.hs, /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/syb-0.3.629829/syb-0.3.6/dist/setup/Main.o )

/var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/syb-0.3.629829/syb-0.3.6/Setup.hs:4:30:
    Warning: In the use of `runTests'
             (imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
             Deprecated: "Please use the new testing interface instead!"
Linking /var/folders/qA/qAV3z3wUGnOKfufb0vx2N++++TI/-Tmp-/syb-0.3.629829/syb-0.3.6/dist/setup/setup ...
ld: unknown option: -no_pie
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
Crypto-4.2.4 depends on HUnit-1.2.4.2 which failed to install.
HUnit-1.2.4.2 failed during the configure step. The exception was:
ExitFailure 1
aeson-0.4.0.1 depends on syb-0.3.6 which failed to install.
snap-0.7 depends on syb-0.3.6 which failed to install.
snap-core-0.7.0.1 depends on HUnit-1.2.4.2 which failed to install.
snap-server-0.7.0.1 depends on HUnit-1.2.4.2 which failed to install.
syb-0.3.6 failed during the configure step. The exception was:
ExitFailure 1

Has anyone had something like that?

Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99
Édipo Féderle
  • 4,169
  • 5
  • 31
  • 35
  • I think the problem is something with: ld: unknown option:-no_pie command – Édipo Féderle Dec 31 '11 at 12:52
  • 1
    What versions of GHC and Cabal-install are you using? The base error is that HUnit is failing to install, but HUnit is a very stable package (it depends only on Base, doesn't use FFI as far as I know, all the version on Hackage compile) so you really should have a problem installing it. – stephen tetley Dec 31 '11 at 14:45
  • Can you paste the result of running `ld -v` at your terminal? – acfoltzer Dec 31 '11 at 17:22

1 Answers1

1

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

As far as I can tell, either it was restored, or GHC added a workaround, or both.

as the comments note on GHC - Mac OS X - ld: unknown option: -no_pie, upgrading xcode/ld to more recent versions enables the flag

Community
  • 1
  • 1
sclv
  • 38,665
  • 7
  • 99
  • 204