ruby 1.9 issue on Mac (MacPorts) : [BUG] unknown type 0x22 (oxc given)
At least using the MacPorts ruby 1.9 install there is a very odd issue related to this. You get a crash, under some circumstances, when a gem loads into ruby 1.9 and the MacOS linker decides it's a good idea to link against the standard OS installed version 1.8 libruby.
What's especially odd is that the stack trace doesn't show it, but i did track it down by running lsof in a while /bin/true loop as I caused the crash:
...
ruby1.9 41978 aufflick txt REG 14,2 3148976 67264 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib
...
ruby1.9 41978 aufflick txt REG 14,2 1906476 3915360 /opt/local/lib/libruby1.9.1.9.1.dylib
...
Now to find a way around it!
Update: I may have found the culprit. The ruby core .dylib files (the Mac equivalent of .so files) are correctly linked to the ruby1.9 library, but the thin library (installed via gem1.9) is not:
bash-3.2$ otool -L /opt/local/lib/ruby1.9/gems/1.9.1/gems/thin-1.2.1/lib/thin_parser.bundle
/opt/local/lib/ruby1.9/gems/1.9.1/gems/thin-1.2.1/lib/thin_parser.bundle:
/usr/local/lib/libruby.dylib (compatibility version 1.8.0, current version 1.8.6)
...
Now I can manually tweak this with install_name_tool, but the gem build process must be broken somehow...
Update 2: That wasn't the problem. I fixed the linking path in the thin_parser.bundle:
sudo install_name_tool -change /usr/local/lib/libruby.dylib /opt/local/lib/libruby1.9.dylib /opt/local/lib/ruby1.9/gems/1.9.1/gems/thin-1.2.1/lib/thin_parser.bundle
but it still crashes...
Update 3: It's something to do with the MacPorts build. I did a compile from source of runby 1.9.1 into a new prefix and ruby/rack/thin work fine. Sweet!
05:19 PM, 10 May 2009 by Mark Aufflick Permalink | Short Link







