geocommons / geocoder

Modular Street Address Geocoder
http:///www.geocommons.com
GNU Lesser General Public License v3.0
395 stars 89 forks source link

Undefined _sqlite3_malloc compiling on OS X #1

Closed semprebon closed 15 years ago

semprebon commented 15 years ago

I'm trying to compile this on OS X, I have the dependencies, but when I run make I get:

make -C src install make -C libsqlite3_geocoder cc -shared extension.o wkb_compress.o util.o metaphon.o -o libsqlite3_geocoder.so Undefined symbols: "_sqlite3_malloc", referenced from: _metaphone in metaphon.o "_main", referenced from: start in crt1.10.5.o "_sqlite3_free", referenced from: _metaphone in metaphon.o _metaphone in metaphon.o ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: * [libsqlite3_geocoder.so] Error 1 make[1]: * [all] Error 2 make: *\ [all] Error 2

wonderchook commented 15 years ago

Works with version 4.2 of the GCC compiler.

dblue commented 15 years ago

In the event anyone else encounters this problem, it is a path issue with the linker. In my case, I installed sqlite3 via MacPorts which placed the library in the /opt/local/lib directory (which does not appear to be standard). I resolved the issue by including -L/opt/local/lib when linking the compiled C files into a library.

wonderchook commented 15 years ago

dblue: Thanks. In the future we will have a configure file where someone can put that information but have not created one as of yet.