Hi,
The problem:
==========
When cross-compiling sqlite-3.4.0, I encounter this linkage error:
./.libs/libsqlite3.so: undefined reference to `dlclose'
./.libs/libsqlite3.so: undefined reference to `dlopen'
./.libs/libsqlite3.so: undefined reference to `dlsym'
The solution:
===========
I added in Makefile.in the "-ldl" at the end of the line.
----
sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
$(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \
-o $@ $(TOP)/src/shell.c libsqlite3.la \
$(LIBREADLINE) $(TLIBS) -ldl
----
It seems to fix the problem, but I'm sure this is not the appropriate
way.
The question:
==========
Any idea what a propper solution would be?
More details:
=========
I'm compiling on Linux, for target PPC.
The full compilation line (before the fix) is:
------------------------------------------------------------
/home/lira/toolchain/gnu/3.4.4-wrlinux-1.2/x86-linux2/bin/powerpc-wrs-li
nux-gnu-powerpc-gpp-gcc
-O3
-mcpu=603e
-mtune=603e
-mfull-toc
-mcall-linux
-fomit-frame-pointer
-funroll-loops
-DOS_UNIX=1
-DHAVE_USLEEP=1
-I.
-I./src
-I/export/target/root/usr/local/include
-DHAVE_READLINE=0
-o .libs/sqlite3
./src/shell.c
-L/export/target/root/usr/local/lib
-L/home/cfi/export_for_linkage/target/root/lib
-L/home/cfi/export_for_linkage/target/root/usr/lib
-L/home/cfi/export_for_linkage/target/root/usr/local/lib
./.libs/libsqlite3.so
-lpthread
-Wl,--rpath
-Wl,/usr/local/lib
My configure command is:
--------------------------------------
./configure
'--build=i686-linux' \
--host=powerpc-wrs-linux-gnu \
--prefix=/usr/local \
'--disable-tcl' \
'--disable-debug' \
'--with-gnu-ld' \
'--enable-threadsafe' \
'--enable-releasemode' \
--disable-static
Thanks,
Erez