Cabal Mac OS(雪豹)错误 - ld:未知选项:-no_pie

发布于 2024-12-23 08:51:32 字数 2036 浏览 0 评论 0原文

我正在尝试使用 cabal 来安装一些软件包,但我收到了一个错误,例如:

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

有人遇到过类似的事情吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心的憧憬 2024-12-30 08:51:32

看起来 leopard 已经摆脱了 no-pie 一段时间:http:// trac.macports.org/ticket/34064

据我所知,要么已恢复,要么 GHC 添加了解决方法,或两者​​兼而有之。

正如 GHC - Mac OS X - ld: Unknown option: -no_pie 上的注释,将 xcode/ld 升级到更新版本版本启用该标志

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文