librelist archives

« back to archive

Shoes on OS X picking up system ruby

Shoes on OS X picking up system ruby

From:
Eric Watson
Date:
2012-03-28 @ 18:03
Hi, all,

I have run into a new problem with the current build, and I can't figure 
it out. I built Shoes on a 64-bit OSX machine, and it worked there. Then I
built on a 32-bit OSX machine, and it worked there. Then I tried to run 
the 32-bit build on the 64-bit machine, and it all fell apart.

The more I look into it, the less I understand, so I thought folks might 
have some insights. It seems like Shoes is running the system ruby at some
point, or at least loading files from the system ruby, which is *not 
good*. I added some debugging to shoes_start()[1], and here's the output 
on both systems:

https://gist.github.com/2228517

As you can see, before it gets to the debugging code, shoes has loaded 
features from the system ruby (that ...rvm... part). On the non-building 
machine, it also fails to load features. I am guessing this rbconfig 
failure happens because it tries to load from the system ruby, but is 
looking for the shoes architecture (which doesn't exist on the 
non-building machine). The rbconfig source file seems to be located in the
architecture-specific directory, alongside the compiled shared objects, 
unlike other ruby source files.

As I read it, the shoes-bin binary (from skel/main.skel) starts this call chain:

shoes_init()
 shoes_ruby_embed()
   RUBY_INIT_STACK
   ruby_init()
 shoes_ruby_init()
 shoes_native_init()

shoes_start()

So somewhere above shoes_start(), there seems to be a problem.

Any ideas?

Eric



[1](https://github.com/wasnotrice/shoes/blob/fix-main/shoes/world.c#L186)

Re: [shoes] Shoes on OS X picking up system ruby

From:
Steve Klabnik
Date:
2012-03-28 @ 18:26
Mind amending the gist with the text of the email? I'd like to tweet
about it, and librelist takes a few hours to catch up.

Re: [shoes] Shoes on OS X picking up system ruby

From:
Steve Klabnik
Date:
2012-03-28 @ 19:19
It picked it up pretty quick:
https://twitter.com/#!/steveklabnik/status/185080820158046208

Re: [shoes] Shoes on OS X picking up system ruby

From:
Eric Watson
Date:
2012-03-28 @ 19:57
Sorry I missed you, Steve. I was mailing a birthday card :)

Re: [shoes] Shoes on OS X picking up system ruby

From:
Steve Klabnik
Date:
2012-03-28 @ 20:12
haha, no worries. :D