GNOME Bugzilla – Bug 620741
Error building sqlite in the gnome-3.0 moduleset
Last modified: 2010-06-07 10:41:43 UTC
When trying to build sqlite with jhbuild (via jhbuild build gnome-shell) I get: mkdir -p tsrc cp ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c ./src/backup.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c ./src/btree.h ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c ./src/ctime.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c ./src/fkey.c ./src/func.c ./src/global.c ./src/hash.c ./src/hash.h ./src/hwtime.h ./src/insert.c ./src/journal.c ./src/legacy.c ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem0.c ./src/mem1.c ./src/mem2.c ./src/mem3.c ./src/mem5.c ./src/memjournal.c ./src/mutex.c ./src/mutex.h ./src/mutex_noop.c ./src/mutex_os2.c ./src/mutex_unix.c ./src/mutex_w32.c ./src/notify.c ./src/os.c ./src/os.h ./src/os_common.h ./src/os_os2.c ./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pager.h ./src/parse.y ./src/pcache.c ./src/pcache.h ./src/pcache1.c ./src/pragma.c ./src/prepare.c ./src/printf.c ./src/random.c ./src/resolve.c ./src/rowset.c ./src/select.c ./src/status.c ./src/shell.c ./src/sqlite.h.in ./src/sqlite3ext.h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c ./src/vdbeblob.c ./src/vdbemem.c ./src/vdbetrace.c ./src/vdbeInt.h ./src/vtab.c ./src/walker.c ./src/where.c keywordhash.h opcodes.c opcodes.h parse.c parse.h config.h sqlite3.h ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c ./ext/fts3/fts3.c ./ext/fts3/fts3.h ./ext/fts3/fts3Int.h ./ext/fts3/fts3_expr.c ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_snippet.c ./ext/fts3/fts3_tokenizer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c ./ext/fts3/fts3_write.c ./ext/icu/sqliteicu.h ./ext/icu/icu.c ./ext/rtree/rtree.h ./ext/rtree/rtree.c tsrc rm tsrc/sqlite.h.in tsrc/parse.y tclsh8.4 ./tool/vdbe-compress.tcl <tsrc/vdbe.c >vdbe.new mv vdbe.new tsrc/vdbe.c touch .target_source tclsh8.4 ./tool/mksqlite3c.tcl ./libtool --mode=compile --tag=CC gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c libtool: compile: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -fPIC -DPIC -o .libs/sqlite3.o ./libtool --mode=link gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -L/opt/gnome2/lib64 -o libsqlite3.la sqlite3.lo -lpthread \ -rpath "/opt/gnome2/lib64" -version-info "8:6:8" libtool: link: gcc -shared .libs/sqlite3.o -L/opt/gnome2/lib64 -lpthread -Wl,-soname -Wl,libsqlite3.so.0 -o .libs/libsqlite3.so.0.8.6 libtool: link: (cd ".libs" && rm -f "libsqlite3.so.0" && ln -s "libsqlite3.so.0.8.6" "libsqlite3.so.0") libtool: link: (cd ".libs" && rm -f "libsqlite3.so" && ln -s "libsqlite3.so.0.8.6" "libsqlite3.so") libtool: link: ( cd ".libs" && rm -f "libsqlite3.la" && ln -s "../libsqlite3.la" "libsqlite3.la" ) ./libtool --mode=link gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -L/opt/gnome2/lib64 -DHAVE_READLINE=0 \ -o sqlite3 ./src/shell.c libsqlite3.la \ -lpthread -rpath "/opt/gnome2/lib64" libtool: link: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DHAVE_READLINE=0 -o .libs/sqlite3 ./src/shell.c -L/opt/gnome2/lib64 ./.libs/libsqlite3.so -lpthread -Wl,-rpath -Wl,/opt/gnome2/lib64 ./.libs/libsqlite3.so: undefined reference to `dlsym' ./.libs/libsqlite3.so: undefined reference to `dlerror' ./.libs/libsqlite3.so: undefined reference to `dlopen' ./.libs/libsqlite3.so: undefined reference to `dlclose' collect2: ld returned 1 exit status make: *** [sqlite3] Error 1 *** Error during phase build of sqlite3: ########## Error running make -j3 *** [30/53] Cleaning the build tree doesn't help.
I have had it too but it's not a jhbuild bug, instead it's an error in the Makefile they profile AFAIK. You have to add the -ldl parameter to the flags passed to $(CC). Should it be reported to the sqlite developers?
Created attachment 162909 [details] [review] sqlite ldl depends Can't we just put up a patch in jhbuild? It looks like this issue is there for ages. It looks like Ubuntu has a patch (attached)
Hmm, it looks like jhbuild already had a patch http://git.gnome.org/browse/jhbuild/tree/patches/sqlite-3.6.12.dlsym.patch but it has been dropped in http://git.gnome.org/browse/jhbuild/tree/modulesets/gnome-external-deps-3.0.modules. Will investigate and report back.
Created attachment 162911 [details] [review] Patch for jhbuild Patch for the moduleset, "stolen" from debian 10-520466-libsqlite3-depends-on-libdl.patch and updated to included the file "configure"
Comment on attachment 162911 [details] [review] Patch for jhbuild I wonder if the configure diff could have been made smaller; but anyway, thanks, go ahead and push.
Pushed as: commit 11f722803b3b8143c94a69e11b9c5de6741f62fb Author: Łukasz Jernaś <deejay1@srem.org> Date: Mon Jun 7 12:31:45 2010 +0200 [3.0] Fix building sqlite3 Add sqlite-3.6.22.dlsym.patch based on the Debian patch 10-520466-libsqlite3-depends-on-libdl.patch with and updated configure to fix linking the sqlite3 library. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=620741