构建问题,使用 macports 库和 GHC
我正在尝试遵循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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来 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.