Projects
Wiki     Timeline     Browse Source     View Tickets     Search     New Ticket

Ticket #1 (new defect)

Opened 2 years ago

Last modified 5 weeks ago

mysterious error when processing keychain framework

Reported by: wez@… Owned by:
Priority: blocker Component: BridgeSupport
Version: Keywords:
Cc:

Description

I encounter the following error message while attempting to process the open source keychain framework:

Obtain it for yourself from here: svn co https://keychain.svn.sourceforge.net/svnroot/keychain/trunk keychain

build and install it, then:

$ gen_bridge_metadata -f /Library/Frameworks/Keychain.framework -o Keychain.bridgesupport 

undefined local variable or method `trans' for <UNDEFINED> ... </>:REXML::Document
Usage: gen_bridge_metadata [options] <headers...>
Use the `-h' flag or consult gen_bridge_metadata(1) for help.

I have the same problem with the gen_bridge_metadata.rb from trunk here on macosforge too.

Attachments

rexml_workaround.patch Download (418 bytes) - added by me@… 2 years ago.
Fix for REXML bug
rexml_fix.patch Download (420 bytes) - added by me@… 2 years ago.
directly patches REXML for alternate fix

Change History

Changed 2 years ago by me@…

confirmed x2

Someone commented on a post reporting this error, and I can confirm I get the same thing. We are trying to run it against the Security.framework , not Keychain.framework

 http://be-genius.net/post/31305332/rubycocoa-and-keychain-access#disqus_thread

API Change in REXML?

Changed 2 years ago by popepancho@…

confirm - first found error running against IOKit.framework

Changed 2 years ago by me@…

Well I found a workaround. The problem is to do with a typo in REXML in ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] (maybe others)

Two ways to fix it: fix one line in REXML (which I've done anyway, and it's fixed in later versions), and fix two lines in gen_bridge_metadata.

I am attaching a patch to fix it but basically it changes the generate_xml method to not specify indentation level of 0 (-1 should be used anyway, but it's default).

Changed 2 years ago by me@…

Fix for REXML bug

Changed 2 years ago by lsansonetti@…

This is an unfortunate regression that shipped in 10.5.4 :(

Hopefully it will be addressed in 10.5.5, which will be soonly delivered. In the meantime, manually patching REXML is the way to go.

I will keep this ticket open until 10.5.5 is publicly available.

Changed 2 years ago by me@…

Ok well in that case I'm also attaching a patch for REXML in case anyone wants to take that route and stumble upon this page.

Run the patch against /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rexml/document.rb

Changed 2 years ago by me@…

directly patches REXML for alternate fix

Changed 5 weeks ago by mackyle@…

This ticket should be closed as the rexml_fix.patch has apparently already been applied to the version of Ruby that ships with 10.5.8.

Note: See TracTickets for help on using tickets.