osx-snow-leopardllvmx86-64macrubyhotcocoa

MacRuby 0.10 HotCocoa unsupported file format which is not the architecture being linked (i386)


I've installed MacRuby (via rvm):

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

And LLVM (via homebrew):

$ 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)

When I run rake, I get an error:

$ 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)

I don't want to run xcode4, which allows you specify x86_64 as the output.

How can I resolve this issue? It looks like somewhere in the chain, 32-bit is being specified. I've tried compiling with flags, and running rake as:

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

and

RC_ARCHS=x86_64 rake

But none of these makes a difference. I get the same error.

I'm on Snow Leopard - 10.6.7.


Solution

  • Using hotcocoa from this repo solves the problem. The published version is outdated and ignores architecture.

    Not ideal, but at least it works until the published version catches up.

    Thanks goes to @watson1978

    This worked, but gave rise to another error: LSOpenURLsWithRole() failed with error -10810

    I had to install BridgeSupport and then everything worked fine.