MacRuby 0.10 HotCocoa不支持的文件格式,不是链接的体系结构(i386)

时间:2011-06-03 15:40:29

标签: osx-snow-leopard llvm x86-64 macruby hotcocoa

我安装了MacRuby(通过rvm):

$ ruby -v
MacRuby 0.10 (ruby 1.9.2) [universal-darwin10.0, x86_64]

和LLVM(通过自制软件):

$ llvmc --version
Low Level Virtual Machine (http://llvm.org/):
llvm version 2.9
Optimized build.
Built Jun  3 2011 (10:06:35).
Host: x86_64-apple-darwin10
Host CPU: corei7

Registered Targets:
(none)

当我跑rake时,我收到一个错误:

$ rake
(in /Users/briankierstead/dev/kci/macruby/hourz)
ld: warning: in /Library/Frameworks//MacRuby.framework/MacRuby, file was built for
 unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_macruby_main", referenced from:
  _main in ccvGpB6J.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/qm/qm1gYJL6Fa4uPhnq239pak+++TI/-Tmp-//ccS18qN4.out (No such file or directory)

想要运行xcode4,它允许你指定x86_64作为输出。

如何解决此问题?它看起来像链中的某个地方,正在指定32位。我尝试使用标志进行编译,然后运行rake:

env UNIVERSAL=1 UNIVERSAL_ARCH="x86_64" ENABLE_OPTIMIZED=1

RC_ARCHS=x86_64 rake

但这些都没有任何区别。我得到了同样的错误。

我在Snow Leopard上 - 10.6.7。

1 个答案:

答案 0 :(得分:4)

使用此repo中的hotcocoa解决了这个问题。发布的版本已过时,忽略了架构。

不理想,但至少在发布的版本赶上之前它才有效。

感谢@ watson1978

这有效,但引发了另一个错误:LSOpenURLsWithRole()失败,错误-10810

我必须安装BridgeSupport,然后一切正常。