[MacRuby-devel] framework cannot be loaded

Laurent Sansonetti lsansonetti at apple.com
Thu May 15 12:12:48 PDT 2008


Hi Eric,

On May 15, 2008, at 11:52 AM, Eric Johnson wrote:

> I was specifically interested in tinkering with the BackRow  
> framework - I thought it would be cool to do something like http://code.google.com/p/pyetv/ 
>  only using ruby. I've used rubycocoa, but I really like the syntax  
> of MacRuby. Once I discovered that importing the BackRow framework  
> into MacRuby caused problems, I was curious to see just how many  
> frameworks there were that would cause problems.
>
> I'm not sure how open apple would be to bringing BackRow in to the  
> GC world, especially since it is in PrivateFrameworks. But if it  
> would be at all possible, I think it would be awesome.

In theory frameworks in PrivateFrameworks are not meant to be used by  
external developers, as you probably imagine, but you can still try to  
ask for GC support, though I don't think this will be accepted.

> I'm not sure what you mean exactly about filing a radar. Perhaps  
> that is some internal apple process for a feature request?

Radar is our bug tracker, you can file new bugs using http://bugreporter.apple.com

> Thanks again (to everyone) for taking the time to explain this to  
> me. I really like the MacRuby syntax!

Cool, I'm glad you like it :)

Laurent

> On Thu, May 15, 2008 at 1:43 PM, Jordan K. Hubbard <jkh at apple.com>  
> wrote:
> Ruby has always relied on garbage collection, of course, and has  
> shipped with its own collector from day one.  MacRuby simply uses  
> the system's collector (libauto) instead given that the underlying  
> objects are Objective-C ones (and for obvious reasons, you want all  
> your objects managed by the same collector).
>
> When you find frameworks that do not support the system GC like  
> this, it's worth filing a radar against them if you genuinely need  
> to use them from a collected environment (either ObjC or MacRuby) so  
> that the developers can properly appreciate the need for bringing  
> them into the GC world.  Merely iterating over every framework like  
> you're doing would not meet the standard for such radars, however,  
> since there are a LOT of frameworks in /System/Library/Frameworks, a  
> non-trivial number of which represent legacy, backwards- 
> compatibility interfaces for which more modern (and recommended)  
> alternatives exist.   In other words, it's not worth retrofitting  
> such frameworks to meet modern coding standards since anyone writing  
> new code is discouraged from using them in the first place.
>
> - Jordan
>
>
> On May 15, 2008, at 11:25 AM, Eric Johnson wrote:
>
>> Thank you for the explanation.
>>
>> Is there any reason why the implementation of MacRuby would require  
>> garbage collection? I haven't taken a look into the source yet, and  
>> am just curious if it is something simple to remove, or whether the  
>> project heavily depends on it.
>>
>> Thanks again,
>> Eric
>>
>> On Thu, May 15, 2008 at 1:08 PM, Ernest Prabhakar  
>> <prabhaka at apple.com> wrote:
>> Hi Eric,
>>
>> I think MacRuby requires Garbage Collection, and some of the  
>> frameworks don't support that.
>>
>> -enp
>>
>>
>> On May 15, 2008, at 10:53 AM, Eric Johnson wrote:
>>
>> Hi -
>>
>> I'm excited about the macruby project. I just started playing with  
>> it. It's a great tool to get to know the frameworks on OS X.
>>
>> I created a quick script that imports all frameworks in /System/ 
>> Library/Frameworks - however, it fails on some of the frameworks.  
>> I'm not sure what exactly is going on. Here is some sample code:
>>
>> frameworks = `ls /System/Library/Frameworks/`
>> frameworks.chomp!
>> frameworks = frameworks.split
>> frameworks.each do |f|
>>  f.gsub!('.framework', '')
>> end
>> frameworks.each do |f|
>>   framework f
>> end
>>
>> It dies with this error:
>>
>> 2008-05-15 12:32:25.564 macruby[2894:10b] Error loading /System/ 
>> Library/Frameworks/ICADevices.framework/ICADevices:  dlopen(/System/ 
>> Library/Frameworks/ICADevices.framework/ICADevices, 265): no  
>> suitable image found.  Did find:
>>        /System/Library/Frameworks/ICADevices.framework/ICADevices:  
>> GC capability mismatch
>>        /System/Library/Frameworks/ICADevices.framework/ICADevices:  
>> GC capability mismatch
>> RuntimeError: framework at path `/System/Library/Frameworks/ 
>> ICADevices.framework' cannot be loaded: Error  
>> Domain=NSCocoaErrorDomain Code=3586 UserInfo=0x19f47b0 "The bundle  
>> "ICADevices" could not be loaded because it is not compatible with  
>> the current application." (dlopen_preflight(/System/Library/ 
>> Frameworks/ICADevices.framework/ICADevices): no suitable image  
>> found.  Did find:
>>        /System/Library/Frameworks/ICADevices.framework/ICADevices:  
>> GC capability mismatch
>>        /System/Library/Frameworks/ICADevices.framework/ICADevices:  
>> GC capability mismatch)
>>        from (irb):46:in `framework'
>>        from (irb):46:in `block (4 levels) in irb_binding'
>>        from (irb):46:in `each'
>>        from (irb):46
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:149:in `block (2 levels) in eval_input'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:262:in `signal_status'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:146:in `block in eval_input'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:145:in `eval_input'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:69:in `block in start'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:68:in `catch'
>>        from /Library/Frameworks/MacRuby.framework/Versions/0.1/usr/ 
>> lib/ruby/1.9.0/irb.rb:68:in `start'
>>        from /usr/local/bin/macirb:12:in `<main>'
>>
>> Any idea what is going on?
>>
>> Thanks in advance for any help.
>>
>> - Eric
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-devel/attachments/20080515/3b9d1030/attachment-0001.htm 


More information about the MacRuby-devel mailing list