[MacRuby-devel] DRb and macruby

2009-06-22 Thread John Shea

Hello all,

anyone using DRb and macruby?

I know next to nothing about DRb but its giving me some crashes in  
macirb that it is not in irb, for setting variables on the server side.


For example (I have coloured responses so its easier to see the  
difference between input and output):


with the simple server below running:
require 'drb'

class TestServer
  attr_accessor :var_a, :var_b
end

aServerObject = TestServer.new
DRb.start_service('druby://localhost:9000', aServerObject)
DRb.thread.join


#irb in a terminal:

dev:~ johnshea$ irb
>> require 'drb'
=> true
>>
?> DRb.start_service
=> #@protocol=#@argc_limit=256, @load_limit=26214400>, @socket=#,  
@uri="druby://dev:50029", @acl=nil,  
@config 
= 
{:tcp_acl 
= 
> 
nil 
, :argc_limit 
= 
> 
256 
, :safe_level 
=>0, :load_limit=>26214400, :verbose=>false, :idconv=>#0x5d1060>}>, @thread=#,  
@idconv=#, @uri="druby://dev:50029",  
@front=nil, @grp=#,  
@config 
= 
{:tcp_acl 
= 
> 
nil 
, :argc_limit 
= 
> 
256 
, :safe_level 
=>0, :load_limit=>26214400, :verbose=>false, :idconv=>#0x5d1060>}>

>> obj = DRbObject.new(nil, 'druby://localhost:9000')
=> #
>> obj.var_a = 45
=> 45


#so far so good, now irb in another terminal:

dev:~ johnshea$ irb
>> require 'drb'
=> true
>>
?> DRb.start_service
=> #- same as above-->

>> obj = DRbObject.new(nil, 'druby://localhost:9000')
=> #
>> p obj.var_a
45
=> nil
>> obj.var_b = 45
=> 45

#yep thats fine, now another terminal

dev:~ johnshea$ irb
>> require 'drb'
=> true
>>
?> DRb.start_service
=> #- same as above-->

>> obj = DRbObject.new(nil, 'druby://localhost:9000')
=> #
>> obj.var_b = 100
=> 100

#all good, now for macirb terminal:

dev:~ johnshea$ macirb
>> require 'drb'
=> true
>>
?> DRb.start_service
=> ##-@config 
= 
{:tcp_acl 
= 
> 
nil 
, :load_limit=>26214400, :argc_limit=>256, :idconv=>#0x8007e9020>, :verbose=>false, :safe_level=>0}, @protocol=##- 
@socket=#,  
@config 
= 
{:tcp_acl 
= 
> 
nil 
, :load_limit=>26214400, :argc_limit=>256, :idconv=>#0x8007e9020 
> 
, :verbose 
=>false, :tcp_port=>50042, :tcp_original_host=>"", :safe_level=>0},  
@acl=nil, @msg=##-@argc_limit=256>>, @uri="druby://dev:50042", @front=nil,  
@idconv=#, @safe_level=0,  
@grp=#, @thread=#>

>> obj = DRbObject.new(nil, 'druby://localhost:9000')
=> ##-@ref=nil>

>> p obj.var_b
100
=> 100
>> obj.var_b = 99
/Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/ 
drb/drb.rb:961: [BUG] destination 0x7fff5fbf7308 isn't in the auto zone

MacRuby version 0.4 (ruby 1.9.1) [universal-darwin9.5, x86_64]
-- stack frame 
 (0xc0860): 0004

--snip-- see the rest of the crash below

the crash log suggests that this is the problem line in drb.rb which is:
if IO.select([...@socket], nil, nil, 0)

#oops go back to a previous irb session
>> p obj.var_b
100
=> nil
>> obj.var_b = 99
=> 99
#hmm that works fine.


anyone got any ideas?

Cheers,
John

the crash:

/Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1/ 
drb/drb.rb:961: [BUG] destination 0x7fff5fbf7308 isn't in the auto zone

MacRuby version 0.4 (ruby 1.9.1) [universal-darwin9.5, x86_64]
-- stack frame 
 (0xc0860): 0004
0001 (0xc0868): 
0002 (0xc0870): 0004
0003 (0xc0878): 
0004 (0xc0880): 0004
0005 (0xc0888): 
0006 (0xc0890): 10039c630
0007 (0xc0898): 8003af520
0008 (0xc08a0): 8006883e0
0009 (0xc08a8): 0004
0010 (0xc08b0): 80078abe0
0011 (0xc08b8): 0004
0012 (0xc08c0): 100397b90
0013 (0xc08c8): 0004
0014 (0xc08d0): c080ffec8
0015 (0xc08d8): 0004
0016 (0xc08e0): 80078ac38
0017 (0xc08e8): 8006883e0
0018 (0xc08f0): 0004
0019 (0xc08f8): 80078ada0
0020 (0xc08000100): 800636380
0021 (0xc08000108): 0004
0022 (0xc08000110): c080ffd08
0023 (0xc08000118): 0004
0024 (0xc08000120): 1003a7dd0
0025 (0xc08000128): 0004
0026 (0xc08000130): c080ffc98
0027 (0xc08000138): 0004
0028 (0xc08000140): c08000110 (= 22)
0029 (0xc08000148): 0004
0030 (0xc08000150): 0004
0031 (0xc08000158): c080ffb48
0032 (0xc08000160): 800764fc0
0033 (0xc08000168): 0004
0034 (0xc08000170): c08000140 (= 28)
0035 (0xc08000178): 8005fb760
0036 (0xc08000180): 000d
0037 (0xc08000188): 0004
0038 (0xc08000190): 80078ade8
0039 (0xc08000198): 0004
0040 (0xc080001a0): 1003986e0
0041 (0xc080001a8): 100397ef0
0042 (0xc080001b0): 0004
0043 (0xc080001b8): c080ff988
0044 (0xc080001c0): 0004
0045 (0xc080001c8): 0004
0046 (0xc080001d0): 0004
0047 (0xc080001d8): 0004
0048 (0xc080001e0): 0004
0049 (0xc080001e8): 0004
0050 (0xc080001f0): 0004
0051 (0xc080001f8): c08000190 (= 38)
0052 (0xc08000200): 800670940
0053 (0xc08000208): 8005fb760
0054 (0xc08000210): 000d
0055 (0xc08000218): 0004
0056 (0xc08000220): 
0057 (0xc08000228): 0004
0058 (0xc08000230): 800670980
0059 (0xc08000238): 800670940
0060 (0xc08000240): 8005fb760
0061 (0xc08000248): 80074a820
0062 (0xc080

Re: [MacRuby-devel] 0.5 branch build failing

2009-06-22 Thread Keenan Brock

I wonder if setting LD_LIBRARY_PATH may help you?

(Sorry, not at a place that I can test this out right now)

--Keenan

On Jun 21, 2009, at 11:31 PM, Laurent Sansonetti wrote:


Hi Paul,

The problem here is that you seem to have installed a custom non- 
universal version of sqlite3 in your system, in /usr/local/lib, and  
MacRuby tries to link against this one and not the system one  
(because /usr/local/lib in before /usr/lib in the linker path).  
MacRuby does not directly depend on sqlite3 but I guess Foundation  
wants it for CoreData. It's definitely not a good idea to try using  
a version different than the system one in this scenario.


I don't really know how to fix this problem without removing the / 
usr/local/lib file(s), temporarily, and try to rebuild MacRuby again.


Good luck!

Laurent

On Jun 21, 2009, at 3:01 PM, Paul wrote:


Hi folks,

I am getting a build failure related to the sqlite dynamic lib file  
which is confusing me, is there a specific version of sqlite needed  
for compatibility?
I tried copying an older version of libsqlite3.0.dylib into /usr/ 
local/lib with the same result.


Here is my build output: http://gist.github.com/133671

Thanks folks!

Paul



___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel