In message <[EMAIL PROTECTED]>,
"John P. Rouillard" writes:
>I am trying to compile sqlite-2.8.15 on a Solaris 8 machine using
>gcc-3.4.1 and tcl-8.4.9. The compile goes cleanly, but when I run
>"make test" (with the appropriate LD_LIBRARY_PATH), I get a
>segmentation fault in the attach2-3.1. Since the testfixture isn't
>compiled with debugging symbols, gdb's backtrace is kind of useless.
I have narrowed it down a bit more. The crash occurs at:
set rc [catch {sqlite_compile $DB "ATTACH 'test2.db' AS t2" TAIL} VM]
in attach2-3.1 since the puts before is printed, but not the puts
after. I tried to replicate it using sqlite using the following
sequence of commands:
sqlite test.db .exit
sqlite test2.db .exit
sqlite test.db
attach "test2.db" as t2
no core dump or other indication of a problem after the attach.
Is this a valid test?
>The tcl install passed all regressions tests. The same compiler was
>used for both builds.
Tcl was compiled with -O2 to turn on some optimizations.
>I did have to modify the sqlite configure generated Makefile because the
>ifeq preprocessors weren't being executed. I turned
>
> ifeq (${INMEMORYDB},0)
> INCOREFLAGS += -DSQLITE_OMIT_INMEMORYDB=1
> endif
> and
>
> # Only build the in-core DB if it is required.
> ifeq (${INMEMORYDB},1)
> LIBOBJ += btree_rb.lo
> endif
>
>into
>
> LIBOBJ += btree_rb.lo
>
>since INMEMORYDB = 1.
Also, I forgot to mention that configure didn't set up the tcl library
info correctly. I ran configure with:
configure --prefix=/tools/sqlite-2.8.15 --with-tcl=/tools/tcl-8.4.9
and got:
TCL_FLAGS = -I/tools/tcl-8.4.9/generic -I/tools/tcl-8.4.9/unix
and
LIBTCL = /tools/tcl-8.4.9/unix/libtcl8*.a -ldl -lm
which don't exist. So I changed them to
TCL_FLAGS = -I/tools/tcl-8.4.9/include -L/tools/tcl-8.4.9/lib \
-R/tools/tcl-8.4.9/lib
and
LIBTCL = -ltcl8.4 -ldl -lm
Could the dynamic linking of libtcl be causing the crash?
Also at this point I am compiling sqlite without optimization (no -O
flag), and also using -DSQLITE_TEST=1 to try to detect memory issues.
>Also as soon as the segfault occurs, all tests stop running. How do I
>disable just one test when running the testsuite? I assume I have to
>run the testfixture manually rather then through the Makefile.
I have been adding modules to the EXCLUDE list in all.tests. At this
point I have coredumps in the following tests:
attach2-3.1...
bind-1.1
capi2-1.1
format3-10.1
func-8.1
pragma-2.1
The bind-1.1 crash occurs at the line:
set VM [sqlite_compile $DB {INSERT INTO t1 VALUES(?,?,?)} TAIL]
Does this series of crashes ring any bells for people? Anything in
common that these share that may give me a clue as to what to fix?
Sqlite version 3 compiles and tests fine under this environment. Sadly
the tool I am trying to build (bacula) needs version 2 of sqlite.
>So has anybody seen this before on Solaris? Any idea where to start debugging?
I know that sqlite is developed on linux, has anybody actually gotten
a full passing test suite on Solaris? If so what were your tcl
version and compiler?
-- rouilj
John Rouillard
===
My employers don't acknowledge my existence much less my opinions.