Hi Charlie,
> Undefined symbols for architecture x86_64:
> "_sqlite3_enable_load_extension", referenced from:
> _open_db in shell.o
> OK so I got rid of the sqlite linker errors by downloading and
> making/installing a new version of sqlite.
>
all right; this is because the standard (aka system) libsqlite
shipped is Mac Os X always disables dynamic extensions loading.
in other words, if you absolutely need a libsqlite supporting
dynamic extension (an absolute pre-requisite for spatialite)
then you absolutely need to build libsqlite by yourself.
(or you can install it from MacPorts, HomeBrew and alike)
> Looking into the iconv linker issue, but if anyone has any thoughts I
> would be grateful.
>
> libtool: link: gcc -g -O2 -o spatialite shell.o -L/usr/local/lib
> /usr/local/lib/libspatialite.dylib -L/opt/local/lib -lpthread -ldl
> /opt/local/lib/libiconv.dylib /usr/local/lib/libgeos_c.dylib
> /usr/local/lib/libgeos.dylib -lsqlite3
> /usr/local/lib/libfreexl.dylib /usr/local/lib/libiconv.dylib
> -lreadline -lcurses /usr/local/lib/libproj.dylib -lm
> /opt/local/lib/libexpat.dylib
> Undefined symbols for architecture x86_64:
> "_iconv", referenced from:
> _convert_from_utf8 in shell.o
> _process_input in shell.o
> "_iconv_close", referenced from:
> _do_meta_command in shell.o
> _process_input in shell.o
> "_iconv_open", referenced from:
> _do_meta_command in shell.o
> _process_input in shell.o
>
this is a little bit harder to explain; few useful hints:
- libiconv comes in a lot of different "flavors"
- actual API symbols widely vary from one flavor to the other
- e.g. on my own Windows libiconv.a there is no "_iconv_open"
symbol at all; there is a "_libiconv_open" instead
- any magical name translation is performed by few conditional
macros defined in the "iconv.h" header file. e.g.
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
conclusion: you are probably including an iconv.h header not
corresponding to the library you are effectively attempting
to link; or there is some mismatching definition in your own
configuration.
-----------------
last but not least: be warned.
as several users have already reported, the Mac Os X Lion
C compiler is buggish; it's very probable that you'll experience
some "crazy" behavior when using any R*Tree Spatial Index.
Building libspatialite and libsqlite disabling at all any
code optimization "-O0" seems to effectively resolve this
unpleasant issue.
bye Sandro
--
Il messaggio e' stato analizzato alla ricerca di virus o
contenuti pericolosi da MailScanner, ed e'
risultato non infetto.