[sqlite-dev] SQLite packaging, again

Jaroslaw Staniek staniek at kde.org
Thu Dec 15 23:52:25 GMT 2011


On 14 December 2011 18:56, Roger Binns <rogerb at rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 14/12/11 09:34, Jaroslaw Staniek wrote:
>> But I did not consider using Statically Linked Extensions via
>> sqlite3_auto_extension.
>
> They aren't statically linked in the conventional sense.
>
>> The issue arise from the fact that there is at least one
>> sqlite3IcuInit() call - in sqlite's main.c.
>
> The traditional distribution of SQLite is as an amalgamation - basically
> all the code joined together into one file.  The extensions including ICU
> are not built by default although the code is there and something would
> have to cause them to load hence that call.
>
> You can take the source for the ICU extension and include it with your app
> and register it at runtime if the system SQLite has not been compiled with
> ICU support.

Hi,
Now I found a reason for the crash in sqlite3_create_function() call.
SQLITE_CORE is not defined so icu.c [1] code expects I am using
sqlite3_api structure to redefining the API:

(in sqlite3ext.h:)
#define sqlite3_create_function        sqlite3_api->create_function

sqlite3_api is uninitialized, no reason it should be since I am not
using redefined API functions. I did as you recommended and compiled
the icu.c into my app without using extension. To avoid editing icu.c,
now I #defined SQLITE_CORE to 1 for this file and this helped.

I don't know if there is something to fix in the extension.

[1] http://www.sqlite.org/src/annotate?checkin=45f20261720dcd73&filename=ext/icu/icu.c

-- 
regards / pozdrawiam, Jaroslaw Staniek
 http://www.linkedin.com/in/jstaniek
 Kexi & Calligra (kexi-project.org, identi.ca/kexi, calligra-suite.org)
 KDE Software Development Platform on MS Windows (windows.kde.org)



More information about the calligra-devel mailing list