google
yahoo
bing

sqlite3 on Mac OS X — trials and tribulations

August 9th, 2005

For an upcoming Rails project, the plan is to use the sqlite database. On Windows, the whole process of getting this installed was easy. Download the DLL, do a gem install sqlite3& and be done.

Not so on OS X, where I plan to develop.

sqlite3 is installed by default, but trying to install the gem, I get a complaint about a missing sqlite.h file. Fair enough, it’s probably not there. So I download the tarball and do the “./configure && make && make install” dance.

I end up with this error message:

/usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystem is not an object file (not allowed in a library)

some googling later, it seems to be related to wrong file permissions, so I repair the volumes file permissions (using the Mac Disc Utility). Re-running “make” yields the same error message.

Incidentally, this is the same error message I got, when I tried to use the Darwin Ports to install sqlite. So I guess, something in my system is hosed.

Update 1: The fix for compiling & linking was as easy as installing the Tiger version of the XCode Tools from the Tiger CD. Back when I upgraded to Tiger, I didn’t install them.

Update 2: When installing sqlite3, also install the sqlite3 gem: sudo gem install sqlite3-ruby

To be continued

Technorati Tags: , ,

Entry Filed under: Mac,Ruby

1 Comment Add your own

  • 1. dave  |  December 14th, 2005 at 20:08

    hey thanks for posting this! i was having the same problem building things with ports and the solution was the same.

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to the comments via RSS Feed


Most Recent Posts

I wrote the book