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



Em Seg, 2008-10-06 às 17:48 +0200, Vivien Malerba escreveu:
>
> 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. 

Actually the Debian (and Ubuntu) packages have been building against the
system version of sqlite unpatched due to a bug on the configure script
which links against the system version if the sqlite library is present
but the sqlite executable not (which is quite common in a distributions
build environment). The logical fix would be to check for the existence
of the sqlite binary and fall back to the embedded copy if it isn't
found.

> 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.

The bug I would like to fix is the one in which libgda returns NULL on
the string fields instead of their real contents when using the system
sqlite. It can be observed on the Select example at tjhe gnome-db
site[1] and was reported against the Debian package as bug #500288 [2].

[1] http://www.gnome-db.org/CodeExampleGdaSelect
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500288 

> 
> 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.

I've replied to the Johannes e-mail with some reasons to not use the
embedded version if possible. I also don't think it's valid to compare
an web browser, which I suppose just use the embedded copy of sqlite to
keep its internal stuff such as bookmarks and favorites, with libgda
which is an database access library, intended to be used to manipulate
sqlite databases which might also be used by other applications

Regards,

-- 
Gustavo R. Montesino
http://grmontesino.blogspot.com



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