构建问题,使用 macports 库和 GHC

发布于 2024-12-26 01:44:49 字数 1202 浏览 4 评论 0原文

我正在尝试遵循haskell图表库的教程

我已经用 macports 安装了 Cairo 和 gtk2hs。

但是,当我尝试运行教程示例时,出现以下错误:

$ ghc --make diagramsTutorial.lhs
Linking diagramsTutorial ...
ld: warning: in /opt/local/lib/libgtk-x11-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libgdk-x11-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libatk-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libpangocairo-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
.. etc...

我使用的是 OS X 10.6.8、core i5 macbook pro。

编辑 我刚刚发现我正在使用 32 位 haskell 平台,这可能是问题的一部分。但是我无法安装 64 位版本(安装过程中出现未指定的错误)。我找不到卸载程序。根据 此页面,我应该在 /Library/Frameworks/GHC 中找到卸载程序。 Framework/Tools/Uninstaller 但那里什么也没有。

I'm trying to follow a tutorial for the Diagrams library for haskell.

I've installed Cairo and gtk2hs with macports.

But when I try to run the tutorial examples, I get the following error:

$ ghc --make diagramsTutorial.lhs
Linking diagramsTutorial ...
ld: warning: in /opt/local/lib/libgtk-x11-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libgdk-x11-2.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libatk-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /opt/local/lib/libpangocairo-1.0.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
.. etc...

I'm using OS X 10.6.8, core i5 macbook pro.

EDIT I have just found that I'm using the 32bit haskell platform, which may be part of the problem. However I can't install the 64 bit version (it has an unspecified error during install). I can't find the uninstaller. According to this page, I should find an uninstaller at /Library/Frameworks/GHC.framework/Tools/Uninstaller but there is nothing there.

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

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

发布评论

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

评论(1

櫻之舞 2025-01-02 01:44:49

看起来 Macports 库仅限 64 位。您可以使用 lipo -info /opt/local/lib/libgtk-x11-2.0.dylib 检查如果是这种情况,您应该使用 +universal 变体重新安装它们,这将允许链接两者32 位和 64 位代码。

It looks like the Macports libraries are 64-bit only. You can check with lipo -info /opt/local/lib/libgtk-x11-2.0.dylib If this is the case, you should reinstall them using the +universal variant, which will allow for linking both 32bit and 64bit code.

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