Specifying an alternate location for sqlite3?

100 views
Skip to first unread message

Jeff Hunter

unread,
May 27, 2010, 4:37:08 PM5/27/10
to GeoCommons Geocoder
I'm running on Mac OS X Snow Leopard. It appears that the default
install of sqlite3 doesn't support extensions, as required by the
geocoder, so I built my own copy of sqlite3 via the MacPorts sqlite3
port. This installs sqlite3 in /opt/local/include and /opt/local/lib.
How can I get the geocoder to look at this copy of sqlite3 when I run
"make"? Normally this sort of configuration information would be
passed as arguments to ./configure, but the geocoder doesn't seem to
use configure.

Any advice from people who have successfully used the geocoder on Snow
Leopard is appreciated.

Thanks,
Jeff

Peter

unread,
May 28, 2010, 12:00:56 PM5/28/10
to GeoCommons Geocoder
Hi Jeff,
I don't have an immediate suggestion (I built on Ubuntu), but could
you post a log of the problem you're having? It may be helpful in
offering suggestions.

Peter

Jeff Hunter

unread,
May 28, 2010, 4:48:33 PM5/28/10
to geocommon...@googlegroups.com
Hi Peter,

I've made some progress, but now I'm running into trouble during the import. The problem I was having before was due to an architecture mismatch between my locally built copy of sqlite and the sqlite extension used by the geocoder. My local sqlite is built for x86_64, but src/libsqlite3_geocoder/Makefile explicitly passes "-arch i386" to the C compiler. After changing that Makefile to pass x86_64 instead, sqlite was able to load the extension.

Now, when I attempt to build the database, this happens:

~/Code/geocoder $ bin/tiger_import /opt/tiger/geocoder.db /opt/tiger
--- /opt/tiger/06_CALIFORNIA/06001_Alameda_County
memory
bin/tiger_import: line 57: 85977 Done                    ( echo ".load $HELPER_LIB" && cat ${SQL}/setup.sql && for file in $SHPS;
do
    shp2sqlite -aS ${TMP}/*_${file}.shp tiger_${file};
done && for file in $DBFS;
do
    shp2sqlite -an ${TMP}/*_${file}.dbf tiger_${file};
done && cat ${SQL}/convert.sql )
     85978 Segmentation fault      | sqlite3 $DATABASE
--- /opt/tiger/06_CALIFORNIA/06003_Alpine_County
memory
bin/tiger_import: line 57: 86001 Done                    ( echo ".load $HELPER_LIB" && cat ${SQL}/setup.sql && for file in $SHPS;
do
    shp2sqlite -aS ${TMP}/*_${file}.shp tiger_${file};
done && for file in $DBFS;
do
    shp2sqlite -an ${TMP}/*_${file}.dbf tiger_${file};
done && cat ${SQL}/convert.sql )
     86002 Segmentation fault      | sqlite3 $DATABASE

I have not been able to track down the cause of the segfault yet. I'll keep looking, but if you have any ideas, let me know.

Thanks!

Jeff

Kate Chapman

unread,
May 28, 2010, 4:55:30 PM5/28/10
to geocommon...@googlegroups.com
Hey Jeff,

I haven't run this on Snow Leopard so I can't be much help. If you
could get the specifics of the segfault info that would help.

-Kate

Jeff Hunter

unread,
May 28, 2010, 5:06:14 PM5/28/10
to geocommon...@googlegroups.com
Here's a stack trace of the crash. Looks like a metaphone problem?

Process: sqlite3 [85062]
Path: /opt/local/bin/sqlite3
Identifier: sqlite3
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [84856]

Date/Time: 2010-05-28 13:17:07.802 -0700
OS Version: Mac OS X 10.6.3 (10D573)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000204e89
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 sqlite3.so 0x0000000100123a61 metaphone + 181
1 sqlite3.so 0x0000000100122e25 sqlite3_metaphone + 201
2 libsqlite3.0.dylib 0x000000010005c451 sqlite3Step + 5713
3 libsqlite3.0.dylib 0x000000010005a268 sqlite3_step + 120
4 sqlite3 0x00000001000028ad shell_exec + 205
5 sqlite3 0x0000000100002e5d process_input + 861
6 sqlite3 0x0000000100005bbf main + 1807
7 sqlite3 0x0000000100000854 start + 52

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000204e89 rbx: 0x000000000000001c rcx: 0x0000000000000009 rdx: 0x0000000000000038
rdi: 0x000000000000000a rsi: 0x0000000000000500 rbp: 0x00007fff5fbfe5d0 rsp: 0x00007fff5fbfe560
r8: 0x0000000000000100 r9: 0x00000000100204e8 r10: 0x0000000000000000 r11: 0x00007fff864d8940
r12: 0x0000000102ebb110 r13: 0x0000000100206508 r14: 0x00000001002000a8 r15: 0x0000000102eb9ea8
rip: 0x0000000100123a61 rfl: 0x0000000000010206 cr2: 0x0000000000204e89

Jeff

Reply all
Reply to author
Forward
0 new messages