On 06/19/2015 04:48 PM, Thomas Mager wrote:
> Hi,
>
> I have to develop an application under uclinux which should use a 
> SQLite database. Since it is running finally on an embedded system it 
> should not use much memory. So, I wanted to build SQLite with my cross 
> compiler and omit some options to reduce the library size and get a 
> very small footprint. My problem is that when I run configure and put 
> some -DSQLITE_OMIT_xxx entries to CFLAGS I get an error when I want to 
> build the SQLite library. See the following what I configure and what 
> I get as result when linking. The switch -DSQLITE_OMIT_TRIGGER 
> produces the error in this case, all other -DSQLITE_OMIT_xxx switches 
> you see in the configure command below are running fine.
>
> This is my configure command:
>
> CC="/home/lantronix/linuxsdk/toolchains/freescale-coldfire-4.4/bin/m68k-uclinux-gcc"
>  
> CFLAGS="-Os -fpic -Wall -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_WAL 
> -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_PROGRESS_CALLBACK 
> -DSQLITE_OMIT_TEMPDB -DSQLITE_OMIT_UTF16 
> -DSQLITE_OMIT_XFER_OPT-DSQLITE_OMIT_TRIGGER" ./configure 
> --host=m68k-uclinux --disable-threadsafe --disable-shared 
> --disable-libtool-lock
>
> Here is the output when building the library:
>
> /bin/bash ./libtool --tag=CC   --mode=link 
> /home/lantronix/linuxsdk/toolchains/freescale-coldfire-4.4/bin/m68k-uclinux-gcc
>  
> -DSQLITE_THREADSAFE=0  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -Os 
> -fpic -Wall -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_WAL 
> -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_PROGRESS_CALLBACK 
> -DSQLITE_OMIT_TEMPDB -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_XFER_OPT 
> -DSQLITE_OMIT_TRIGGER   -o sqlite3 shell.o sqlite3.o
> libtool: link: 
> /home/lantronix/linuxsdk/toolchains/freescale-coldfire-4.4/bin/m68k-uclinux-gcc
>  
> -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -Os 
> -fpic -Wall -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_WAL 
> -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_PROGRESS_CALLBACK 
> -DSQLITE_OMIT_TEMPDB -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_XFER_OPT 
> -DSQLITE_OMIT_TRIGGER -o sqlite3 shell.o sqlite3.o
> sqlite3.o: In function `dotlockLock':
> sqlite3.c:(.text+0x378ae): warning: the use of LEGACY `utimes' is 
> discouraged, use `utime'
> sqlite3.o: In function `yy_destructor':
> sqlite3.c:(.text+0x35afa): undefined reference to 
> `sqlite3DeleteTriggerStep'
> sqlite3.o: In function `sqlite3Parser':
> sqlite3.c:(.text+0x48ce0): undefined reference to `sqlite3FinishTrigger'
> sqlite3.c:(.text+0x48d2c): undefined reference to `sqlite3BeginTrigger'
> sqlite3.c:(.text+0x48e62): undefined reference to 
> `sqlite3TriggerUpdateStep'
> sqlite3.c:(.text+0x48e8e): undefined reference to 
> `sqlite3TriggerInsertStep'
> sqlite3.c:(.text+0x48eb2): undefined reference to 
> `sqlite3TriggerDeleteStep'
> sqlite3.c:(.text+0x48ed2): undefined reference to 
> `sqlite3TriggerSelectStep'
> sqlite3.c:(.text+0x48f84): undefined reference to `sqlite3DropTrigger'
> collect2: ld returned 1 exit status
> make: *** [sqlite3] Error 1
>
>
> It would be nice if you have some hints for me?

In order to use some of the SQLITE_OMIT_* options, including 
SQLITE_OMIT_TRIGGER, you need to build SQLite from the canonical source 
files, not the amalgamation package. The first zip file under 
"Alternative Source Code Formats" here:

   http://www.sqlite.org/download.html

Dan.


Reply via email to