#905 ✓resolved
Ben Lovell

do_sqlite3-0.9.12 fails to load on OSX 10.6 (x64)

Reported by Ben Lovell | June 15th, 2009 @ 02:50 PM

The following code fails:

require "rubygems"
require "dm-core"
DataMapper.setup(:default, "sqlite3:///#{Dir.pwd}/test.db")

With:

/Library/Ruby/Gems/1.8/gems/do_sqlite3-0.9.12/lib/do_sqlite3_ext.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/do_sqlite3-0.9.12/lib/do_sqlite3_ext.bundle, 9): no suitable image found. Did find: (LoadError)

/Library/Ruby/Gems/1.8/gems/do_sqlite3-0.9.12/lib/do_sqlite3_ext.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.9.12/lib/do_sqlite3_ext.bundle
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.9.12/lib/do_sqlite3.rb:18
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.11/lib/dm-core/adapters/sqlite3_adapter.rb:2
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.11/lib/dm-core.rb:146:in `setup'
from test.rb:4

I assume this is down to bitness?

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) June 16th, 2009 @ 11:02 PM

    • Assigned user set to “Dirkjan Bussink”
  • Dirkjan Bussink

    Dirkjan Bussink June 16th, 2009 @ 11:56 PM

    • State changed from “new” to “resolved”

    Already resolved after Ben asked about it on irc

  • Dirkjan Bussink

    Dirkjan Bussink June 17th, 2009 @ 03:56 AM

    • State changed from “resolved” to “confirmed”

    Turns out my change did break stuff for Leopard. Ben, do you have time to come online on irc and test some changes to see whether they don't rebreak Snow Leopard?

  • Ben Lovell

    Ben Lovell June 17th, 2009 @ 10:47 AM

    The latest change is OK specs-wise but gives the same problem as before after installing the updated gem (locally of course)

  • Dirkjan Bussink

    Dirkjan Bussink June 21st, 2009 @ 09:06 AM

    Hmm, I've been testing with it a bit more. I have a Snow Leopard up and running now, only problem is that it's on a 32-bit system. On this system, it still needs the RC_ARCHS stuff.

    Is there a way to determine whether it's a 32 or 64 bit system using a tool like uname? If you can give me the answer to that question, I can probably get it to work :).

  • ash.gti

    ash.gti June 21st, 2009 @ 10:25 AM

    What about checking what ruby was compiled with and setting it to that? Like reading the rbconfig stuff?

    require 'rbconfig'
    Config::CONFIG['arch'] #=> "i686-darwin9" on my system

    or any of the other ruby configuration should be in there.

  • Ben Lovell

    Ben Lovell June 21st, 2009 @ 01:44 PM

    I'm seeing this on my 64bit snow leopard install:

    Config::CONFIG['arch'] => "universal-darwin10.0"

    If this is any help?

  • Dirkjan Bussink

    Dirkjan Bussink June 21st, 2009 @ 02:49 PM

    You just left on IRC right before we might have the final solution. Could you test with explicitly setting ENV["RC_ARCHS"] = "" in extconf.rb?

  • Dirkjan Bussink

    Dirkjan Bussink June 22nd, 2009 @ 12:02 AM

    • State changed from “confirmed” to “resolved”
  • Botanicus

    Botanicus November 23rd, 2009 @ 07:42 PM

    It doesn't work for me on OS X Snow Leopard:

    /Users/botanicus/Desktop/blog/gems/gems/do_sqlite3-0.10.0/lib/do_sqlite3.rb:21:in `require': dlopen(/Users/botanicus/Desktop/blog/gems/gems/do_sqlite3-0.10.0/lib/do_sqlite3_ext.bundle, 9): no suitable image found.  Did find: (LoadError)
        /Users/botanicus/Desktop/blog/gems/gems/do_sqlite3-0.10.0/lib/do_sqlite3_ext.bundle: mach-o, but wrong architecture - /Users/botanicus/Desktop/blog/gems/gems/do_sqlite3-0.10.0/lib/do_sqlite3_ext.bundle
        from /Users/botanicus/Desktop/blog/gems/gems/do_sqlite3-0.10.0/lib/do_sqlite3.rb:21:in `'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters/sqlite3_adapter.rb:3:in `require'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters/sqlite3_adapter.rb:3:in `'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters.rb:121:in `require'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters.rb:121:in `load_adapter'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters.rb:101:in `adapter_class'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core/adapters.rb:13:in `new'
        from /Users/botanicus/Desktop/blog/gems/gems/dm-core-0.10.1/lib/dm-core.rb:171:in `setup'
        from ./init.rb:31:in `'
    
  • Botanicus

    Botanicus November 24th, 2009 @ 09:45 AM

    Sorry, my fault, I had 32bit Ruby with 64bit DB.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Pages