0

I'm trying to get Schuyler Erle's Ruby-based geocoder (https://github.com/geocommons/geocoder) up and running locally on Mac OS 10.6. Upon calling lib/tiger_import (available at above link) to import Tiger shapefiles into a sqlite db, I get the following error message:

Error: dlopen(bin/../lib/geocoder/us/sqlite3.so, 10): no suitable image found.  
Did find: bin/../lib/geocoder/us/sqlite3.so: mach-o, but wrong architecture

Running file lib/geocoder/us/sqlite3.so does indeed reveal:

lib/geocoder/us/sqlite3.so: Mach-O dynamically linked shared library i386

After plenty of searching, I haven't been able to track down a suitable 64-bit sqlite3.so build. Is this likely to be the cause of my problem? If so, any suggested workarounds? I'm a Ruby/sqlite novice, so I'm sure I'm missing something. Any clues would be appreciated.

danpelota
  • 2,245
  • 1
  • 20
  • 17
  • 2
    .so files are shared/dynamic libraries for Linux (and other ELF based unixen) systems, AFAIK OSX uses .dylib for such things. Did you build that file yourself or did it come as part of the package? The way it is used in `tiger_import` indicates that it is an SQLite extension library. – mu is too short Nov 24 '10 at 06:35
  • Good point. I dug around the source code a little more and solved the problem. Thanks for the help. – danpelota Nov 24 '10 at 14:52

1 Answers1

2

After digging around the source code a little, I realized the makefile was explicitly passing "-arch i386" to the C compiler. (Another user independently stumbled on to the same problem and resolution here.) I simply changed the makefile to pass x86_64 instead and it worked like a charm.

danpelota
  • 2,245
  • 1
  • 20
  • 17