Option --disable-static-shell breaks .dbinfo command

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Option --disable-static-shell breaks .dbinfo command

Nate Case
Hello,

When building with the --disable-static-shell configure option from
the autoconf release package, it looks like the sqlite default CFLAGS
only get passed into direct gcc invocations and not the libtool
invocations.

One consequence of this is that ".dbinfo" doesn't work because
SQLITE_ENABLE_DBPAGE_VTAB didn't get enabled.

To reproduce:

    $ tar -xf sqlite-autoconf-3290000.tar.gz
    $ cd sqlite-autoconf-3290000 ; ./configure --disable-static-shell
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    ---[snip]---
    config.status: creating Makefile
    config.status: creating sqlite3.pc
    config.status: executing depfiles commands
    config.status: executing libtool commands

    $ make
    /bin/sh ./libtool  --tag=CC   --mode=compile gcc
    -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\"
    -DPACKAGE_VERSION=\"3.29.0\" -DPACKAGE_STRING=\"sqlite\ 3.29.0\"
    ---[snip]---
    -DHAVE_POSIX_FALLOCATE=1 -DHAVE_ZLIB_H=1 -I.    -D_REENTRANT=1
    -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
    -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_HAVE_ZLIB
    -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c -o sqlite3.lo
    sqlite3.c
    ---[snip]--
    gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\"
    -DPACKAGE_VERSION=\"3.29.0\" -DPACKAGE_STRING=\"sqlite\ 3.29.0\"
    ---[snip]---
    -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
    -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_RTREE -DSQLITE_HAVE_ZLIB
    -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBPAGE_VTAB
    -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_DBSTAT_VTAB  -g -O2 -MT
    sqlite3-shell.o -MD -MP -MF .deps/sqlite3-shell.Tpo -c -o
    sqlite3-shell.o `test -f 'shell.c' || echo './'`shell.c
    ---[snip]---

    $ ./sqlite3 path/to/test.db .dbinfo
    the ".dbinfo" command requires the -DSQLITE_ENABLE_DBPAGE_VTAB compile-time options

Older versions would simply report "unable to read database header"

Repeating this without --disable-static-shell works fine.

This *seems* like a bug to me.  The broken .dbinfo command issue has
been present since version 3.21.0 with the introduction of the
sqlite_dbpage virtual table.  I can work around this easily enough
by forcing the CFLAGS back in, but I thought I'd report this so it could
potentially be addressed upstream.

Thanks,

Nate Case <[hidden email]>

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users