Loading...

sqlite-dev@sqlite.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

[sqlite-dev] minor build bug / undefined UNUSED_PARAMETER / make test / ext/fts3/fts3_test.c / SQLITE_ENABLE_FTS3 Benjamin Lee Tue Apr 03 10:03:13 2012

Dear all,

Yesterday, I attempted

 fossil clone http://www.sqlite.org/src private-project.fossil
 fossil open private-project.fossil

 # configure defaults / build and host = i686-pc-linux-gnu

 ./configure && make clean all test

but, during

 make test

it appears that UNUSED_PARAMETER is undefined in

 ./ext/fts3/fts3_test.c

because UNUSED_PARAMETER is wrapped in

 #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)

inside the header

 ./ext/fts3/fts3Int.h

and in my default build

 SQLITE_CORE is defined, and
 SQLITE_CORE is '''not''' defined

See libtool gcc / build log below.

So, I just went for an almost random stab in the dark, and changed
@[EMAIL PROTECTED] See diff below. This is probably not the correct
logic... maybe UNUSED_PARAMETER should be moved outside the #if (?)
... but I just wanted to bring the build error to people's attention.

Have a nice day! ;-)


--- Makefile.in
+++ Makefile.in
@@ -870,11 +870,11 @@
 # necessary because the test fixture requires non-API symbols which are
 # hidden when the library is built via the amalgamation).
 #
 TESTFIXTURE_FLAGS  = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
 TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE
-TESTFIXTURE_FLAGS += -DBUILD_sqlite
+TESTFIXTURE_FLAGS += -DBUILD_sqlite -DSQLITE_ENABLE_FTS3=1
 
 TESTFIXTURE_SRC0 = $(TESTSRC2) libsqlite3.la
 TESTFIXTURE_SRC1 = sqlite3.c
 TESTFIXTURE_SRC = $(TESTSRC) $(TOP)/src/tclsqlite.c 
$(TESTFIXTURE_SRC$(USE_AMALGAMATION))
 



=== build log === 

<pre>
./libtool --mode=link gcc   -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -I./ext/rtree 
-D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG  -I/usr/include/tcl8.5 
-DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1     -DSQLITE_NO_SYNC=1 
-DSQLITE_TEMP_STORE=1 -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 
-DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE  -DBUILD_sqlite \
        -o testfixture ./src/test1.c ./src/test2.c ./src/test3.c ./src/test4.c 
./src/test5.c ./src/test6.c ./src/test7.c ./src/test8.c ./src/test9.c 
./src/test_autoext.c ./src/test_async.c ./src/test_backup.c ./src/test_btree.c 
./src/test_config.c ./src/test_demovfs.c ./src/test_devsym.c ./src/test_func.c 
./src/test_fuzzer.c ./src/test_hexio.c ./src/test_init.c ./src/test_intarray.c 
./src/test_journal.c ./src/test_malloc.c ./src/test_multiplex.c 
./src/test_mutex.c ./src/test_onefile.c ./src/test_osinst.c ./src/test_pcache.c 
./src/test_quota.c ./src/test_rtree.c ./src/test_schema.c ./src/test_server.c 
./src/test_superlock.c ./src/test_syscall.c ./src/test_stat.c 
./src/test_tclvar.c ./src/test_thread.c ./src/test_vfs.c 
./src/test_wholenumber.c ./src/test_wsd.c ./ext/fts3/fts3_term.c 
./ext/fts3/fts3_test.c  ./src/tclsqlite.c sqlite3.c -L/usr/lib -ltcl8.5 -ldl  
-lpthread -lieee -lm -lpthread 
libtool: link: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I./src -I./ext/rtree 
-D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include/tcl8.5 
-DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_NO_SYNC=1 
-DSQLITE_TEMP_STORE=1 -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 
-DSQLITE_SERVER=1 -DSQLITE_PRIVATE= -DSQLITE_CORE -DBUILD_sqlite -o testfixture 
./src/test1.c ./src/test2.c ./src/test3.c ./src/test4.c ./src/test5.c 
./src/test6.c ./src/test7.c ./src/test8.c ./src/test9.c ./src/test_autoext.c 
./src/test_async.c ./src/test_backup.c ./src/test_btree.c ./src/test_config.c 
./src/test_demovfs.c ./src/test_devsym.c ./src/test_func.c ./src/test_fuzzer.c 
./src/test_hexio.c ./src/test_init.c ./src/test_intarray.c ./src/test_journal.c 
./src/test_malloc.c ./src/test_multiplex.c ./src/test_mutex.c 
./src/test_onefile.c ./src/test_osinst.c ./src/test_pcache.c ./src/test_quota.c 
./src/test_rtree.c ./src/test_schema.c ./src/test_server.c 
./src/test_superlock.c ./src/test_syscall.
 c ./src/test_stat.c ./src/test_tclvar.c ./src/test_thread.c ./src/test_vfs.c 
./src/test_wholenumber.c ./src/test_wsd.c ./ext/fts3/fts3_term.c 
./ext/fts3/fts3_test.c ./src/tclsqlite.c sqlite3.c  -L/usr/lib -ltcl8.5 -ldl 
-lieee -lm -lpthread
/tmp/ccYeHGK1.o: In function `fts3_test_tokenizer_cmd':
/mnt/backup/ben/code/fossil/./ext/fts3/fts3_test.c:515: undefined reference to 
`UNUSED_PARAMETER'
/tmp/ccYeHGK1.o: In function `fts3_configure_incr_load_cmd':
/mnt/backup/ben/code/fossil/./ext/fts3/fts3_test.c:319: undefined reference to 
`UNUSED_PARAMETER'
/tmp/ccYeHGK1.o: In function `fts3_near_match_cmd':
/mnt/backup/ben/code/fossil/./ext/fts3/fts3_test.c:164: undefined reference to 
`UNUSED_PARAMETER'
collect2: ld returned 1 exit status
make: *** [testfixture] Error 1
</pre>

-- 
Benjamin Lee                           mailto:[EMAIL PROTECTED]
Melbourne, Australia                            http://www.realthought.net
Linux / BSD / GNU                                     tel:+61 4 16 BEN LEE

Open Source               "invest in your world"
__________________________________________________________________________
It's later than you think, the joint Russian-American space mission has
already begun.
_______________________________________________
sqlite-dev mailing list
[EMAIL PROTECTED]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-dev