2

I have RubyCocoa 0.13.2 based application. It works on 10.5.8 and earlier versions. When i try to run it on 10.6 it crashes on infinite loop. 10.6 has 0.13.2 built in, but it's not same binary as for 10.5. When i tried to build my application's Xcode 3.1.3 project with 0.13.2 framework from 10.6, it gave a link error - malformed object on 0.13.2 framework binary. The application, that is built with Xcode 3.2 doesn't run on leopard, in spite that i built only 32 Arch. configuration. My question is whether there is a way to build a version, that will run on both platforms?

Thanks,

Nava

EDIT: I feel pretty exhausted trying to solve it and the best thing would be to just rewrite everything in Cocoa, at least you can debug it in a human way. But i don't have a permission for this luxury :)

IAdapter
  • 62,595
  • 73
  • 179
  • 242
Nava Carmon
  • 4,523
  • 3
  • 40
  • 74
  • Thank you @Alex for politically correct editing :)) – Nava Carmon Sep 26 '09 at 18:07
  • You should try fixing the infinite loop on 10.6 instead of trying to get a binary library to work on a different OS version (mind all those changes from 10.5 to 10.6 - especially that it's now pure 64bit). – Koraktor Sep 27 '09 at 18:34
  • I fixed the infinite loop on 10.6 and it's working now. The problem is that the version that is working on 10.6 doesn't work on 10.5+ and vise versa. That's what I'm asking here, how do i make SAME version for Leopard & Snow Leopard, since they are using the same RubyCocoa version... – Nava Carmon Sep 28 '09 at 16:30

4 Answers4

0

fat binary maybe??

zzawaideh
  • 2,021
  • 1
  • 17
  • 25
  • What i tried so far was building for 32bit-Universal architecture only using GCC 4.2. You suggest building 32/64bit-universal? – Nava Carmon Sep 28 '09 at 21:27
0

I got a notification from RubyCocoa source forge team on a RubyCocoa version 1.0.1 which is supposed to work for Leopard & Snow Leopard. Will give it a chance, especially it has a fix for a ver. 1.0.0 crash on Snow Leopard

Nava Carmon
  • 4,523
  • 3
  • 40
  • 74
0

SOLVED! First of all there is a new RubyCocoa version (rev. 2277, based on 1.0.0, soon the release), that solved SL crash and works for both Leopard & Snow Leopard.

I built a RubyCocoa version for i386 & ppc architectures. In the project I set 32bit-universal. Base SDK = 10.5, Deployment target = 10.5, Compiler = GCC 4.0.

Now I have one version, that I can build on Leopard & Snow Leopard and it works on both platforms (it doesn't say, that it there are no crashes, but this is for another question)

Nava Carmon
  • 4,523
  • 3
  • 40
  • 74
-1

You should probably have the following build settings :-

  • Architectures = 32/64-bit Universal
  • Base SDK = Mac OS X 10.6
  • Deployment Target = Mac OS X 10.5

If this doesn't work on 10.5, try changing

  • Base SDK = Mac OS X 10.5

I don't think the version of GCC should matter unless you can't build successfully.

James Mead
  • 3,472
  • 19
  • 17
  • Unfortunately, it didn't work.. It immediately crashes on Leopard in RubyCocoa on oc_import.rb:84: [BUG] Bus Error. we use system ruby, which is 1.8.6 for leopard & 1.8.7 for snow leopard. Same RubyCocoa 0.13.2 for both. – Nava Carmon Oct 01 '09 at 21:01
  • Have you tried creating a really simple app and trying to get that to work on both 10.5 and 10.6. That would help narrow things down a bit. – James Mead Oct 02 '09 at 12:25
  • The "fat" application works for snow leopard and crashes for leopard. The problem, I'm sure - RubyCocoa layer, which is not stable. If it was Ruby only it would work. – Nava Carmon Oct 03 '09 at 16:43