Re: [gnome-db] libgda 3.0.4 and system sqlite





2008/10/3 Gustavo R. Montesino <grmontesino gmail com>
Hello,

In the past, Vivien has said it would be possible to backport some
patches from libgda 3.1 branch to 3.0 to make it work properly using the
system sqlite instead of the embedded one.

I've tried to dig the needed patches from svn to fix the libgda3-sqlite
debian packages (and consequently the Ubuntu ones) but haven't succeeded
so far. Does someone know exactly what patches/svn revisions must be
applied to make it work?

The configure script of V3.0 on purpose fails to detect  an SQLite system install and always falls back to the embedded one. The reason is that the embedded version has been patched to allow the library to get meta data about a database. You can force the configure script to use the system one (and the generated lib will depend on the system DLL) simply by modifying the configure.in script:
Index: configure.in
===================================================================
--- configure.in    (révision 3224)
+++ configure.in    (copie de travail)
@@ -927,7 +927,7 @@
         realvers=`sqlite3 -version`
         microvers=`sqlite3 -version | cut -d '.' -f 3`
         AC_MSG_CHECKING(for sqlite version)
-        if test $microvers -lt 100
+        if test $microvers -lt 1
         then
                 AC_MSG_RESULT(Version $realvers of SQLite does not implement required pragmas, using embedded SQLite)
                 have_sqlite=no

The problem will be that some meta data won't be fetched at all. Fixing this has been done for the upcoming V4 and is quite a lot of work.

Now, if it's for Anjuta (as I understand from https://bugs.launchpad.net/ubuntu/+source/libgda3/+bug/145361), then it's useless as Anjuta (latest version) uses a preversion of Libgda V4 (3.99.4 should be Ok). The V4 can be built using a system installed SQlite or an embedded version.

Also, please note that I'm not sure the "applications should use the system installed SQLite" policy can be applied in all cases anyway, so maybe it's a lost battle: SQLite being an embedded library, its configuration is very customizable, and for example Mozilla also embedds it but disables some features so it can't use a system installed SQLite.

Regards,

Vivien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]