3.49.0 - How to configure --disable-static-shell as with autoconf
(1) By Lonnie Abelbeck (abelbeck) on 2025-02-16 17:03:10 [source]
In 3.47.2 and before, via autoconf, the sqlite3 shell can be configured to dynamically link to libsqlite3.so.0 In my testing of 3.49.0, via autosetup, the sqlite3 shell more than triples in size since it is statically linked. Not ideal. I see there is a --dynlink-tools option, which looks similar to --disable-static-shell, but does not pass the auto.def sanity check. -- Error: Unknown option --dynlink-tools -- Question, In 3.49.0 with autosetup, how to configure as previously with autoconf using --disable-static-shell?
(2) By Stephan Beal (stephan) on 2025-02-16 17:50:16 in reply to 1 [link] [source]
In 3.47.2 and before, via autoconf, the sqlite3 shell can be configured to dynamically link to libsqlite3.so.0
That capability was lost in the port to autosetup for the simple reason that it's not part of the canonical tree build and is thus was "off of my radar" (we don't actually use the "autoconf" bundle ourselves - it's provided as a convenience for downstream users).
We will get that flag re-added but i cannot promise that it will be part of 3.49.1 because that build is already being prepared for release.
In my testing of 3.49.0, via autosetup, the sqlite3 shell more than triples in size since it is statically linked. Not ideal.
FWIW, that's the only way the canonical source tree has ever built the shell, up until the recent addition of...
Error: Unknown option --dynlink-tools
That flag is only usable from the full/canonical build tree, not the "autoconf" bundle, and it's only intended for certain testing purposes.
(3) By Stephan Beal (stephan) on 2025-02-16 18:21:56 in reply to 2 [link] [source]
We will get that flag re-added but i cannot promise that it will be part of 3.49.1 because that build is already being prepared for release.
That's now in the trunk and the pending 3.49.1 patch release:
$ ~/f/s/349/sqlite-autoconf-3490100/configure --help | grep shell --disable-static-shell Link the sqlite3 shell app against the DLL instead of embedding sqlite3.c $ ~/f/s/349/sqlite-autoconf-3490100/configure --disable-static-shell --prefix=$HOME CFLAGS=-O0 $ make sqlite3 ... $ ldd sqlite3 ... libsqlite3.so => ./libsqlite3.so (0x000073183f691000) ... $ make install ... $ rm libsqlite3.so $ ldd ~/bin/sqlite3 ... libsqlite3.so => /home/stephan/lib/libsqlite3.so (0x00007f7f257ee000) ...
Thank you for the report!
(4) By Lonnie Abelbeck (abelbeck) on 2025-02-16 19:34:58 in reply to 3 [link] [source]
Stephan, Fantastic! Great work. I tried to add the patches and test, but it appears I need to wait for the 3.49.1 amalgamation. Again, thanks very much. Lonnie
(5) By Lonnie Abelbeck (abelbeck) on 2025-02-18 16:35:58 in reply to 4 [link] [source]
Closing the loop ... I tested the 3.49.1 amalgamation with --disable-static-shell and it worked perfectly. Without --disable-static-shell /usr/bin/sqlite3 is 1074152 B in size. With --disable-static-shell /usr/bin/sqlite3 is 275512 B in size.