Building without TCL is broken
(1.1) Originally by anonymous with edits by Richard Hipp (drh) on 2024-08-15 14:22:18 from 1.0 [source]
Commit 91db27aff576f818bd8be078494fed3feb341f0d removed recognition for `./configure --disable-tcl` (AC_ARG_ENABLE), and replaced it with --with-tcl (AC_ARG_WITH). So far so normal. But no attention was paid to make --without-tcl (= "--with-tcl=no") work. ./configure --without-tcl checking for pwrite... yes checking for pwrite64... yes configure: error: no tclConfig.sh file found under no (Edit by moderator: Change formatting from "Markdown" to "Plain Text")
(2) By Richard Hipp (drh) on 2024-08-15 14:23:47 in reply to 1.1 [link] [source]
A valid "tclsh" is required in order to build SQLite from sources. The tclsh command is used to build some of the machine-generated C-code that goes into the SQLite.
What were you hoping that --disable-tcl was going to do?
(3) By anonymous on 2024-08-15 14:57:20 in reply to 2 [link] [source]
Hm. The last "good" version was the 3.46 release. It may have required tcl, but tcl-devel (/usr/bin/tclConfig.sh) was optional, and that has changed in master.
(3.46)
# rpm -e tcl-devel
$ ./configure CFLAGS=-ggdb3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-suse-linux/bin/ld
checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... yes
checking for strchrnul... yes
checking for usleep... yes
checking for utime... yes
checking for pread... yes
checking for pread64... yes
checking for pwrite... yes
checking for pwrite64... yes
checking for tclsh8.7... no
checking for tclsh8.6... tclsh8.6
configure: Version set to 3.46
configure: Release set to 3.46.0
checking for WASI SDK directory... no
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... none required
checking for library containing pthread_mutexattr_init... none required
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking for Tcl configuration... configure: WARNING: Can't find Tcl configuration definitions
configure: WARNING: *** Without Tcl the regression tests cannot be executed ***
configure: WARNING: *** Consider using --with-tcl=... to define location of Tcl ***
checking for library containing readline... -ledit
not using linenoise
checking for library containing fdatasync... none required
checking build type... release
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing deflate... -lz
checking for library containing dlopen... none required
checking whether to support math functions... yes
checking for library containing ceil... -lm
checking whether to support JSON functions... yes
checking whether to support MEMSYS5... no
checking whether to support MEMSYS3... no
checking whether to support FTS3... no
checking whether to support FTS4... no
checking whether to support FTS5... no
checking whether to support LIMIT on UPDATE and DELETE statements... no
checking whether to support GEOPOLY... no
checking whether to support RTREE... no
checking whether to support SESSION... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: creating sqlite_cfg.h
config.status: executing libtool commands
$
(master without tcl-devel)
checking for pwrite64... yes
checking for tclsh8.6... tclsh8.6
using tclsh at "tclsh8.6"
cannot find tclConfig.sh in either /usr/lib64 or /usr/lib64/tcl8.6
configure: WARNING: tclsh8.6 is unable to recommend a tclConfig.sh
configure: error: cannot find a usable tclConfig.sh file.
Use --with-tcl=DIR to specify a directory where tclConfig.sh can be found.
SQLite does not use TCL internally, but TCL is required to build SQLite
from canonical sources and TCL is required for testing.
(4) By Richard Hipp (drh) on 2024-08-15 15:05:37 in reply to 3 [link] [source]
OK. I'll see if I can rig the new configure so that:
The build works even if tclConfig.sh cannot be located, as long as a working tclsh is found.
The --disable-tcl flag works (and is silently ignored).
(5) By Richard Hipp (drh) on 2024-08-15 15:26:51 in reply to 4 [link] [source]
Please try again with check-in de927016aadd7ee5 or later. Report success or failure in a following forum post so that we know. (I don't have a machine easily at hand that does not have TCL dev libraries installed.)
(6.4) By Nuno Cruces (ncruces) on 2024-08-17 14:23:00 edited from 6.3 in reply to 1.1 [link] [source]
I received an email asking to test the new configure
script, and I have an issue related to this one.
This build script, which is working fine from the bedrock-3.46
branch, fails when run from the main
branch, on the macOS and Ubuntu GitHub runners with (a variation of):
checking for tclsh... tclsh
using tclsh at "tclsh"
tclsh reported library directory "/AppleInternal/Library/BuildRoots/4ff29661-3588-11ef-9513-e2437461156c/Library/Caches/com.apple.xbs/Binaries/tcl/install/TempContent/Objects/OBJROOT1/tcl/Deployment//System/Library/Frameworks/Tcl.framework/Versions/8.5" does not exist
configure: WARNING: tclsh is unable to recommend a tclConfig.sh
configure: error: cannot find a usable tclConfig.sh file.
Use --with-tcl=DIR to specify a directory where tclConfig.sh can be found.
SQLite does not use TCL internally, but TCL is required to build SQLite
from canonical sources and TCL is required for testing.
For now, the build succeeds with --disable-tcl
, which is fine by me if it's the recommended solution?
Happy to test any variations you'd like.
(7) By Richard Hipp (drh) on 2024-08-17 15:52:47 in reply to 6.4 [link] [source]
Please try again using the latest trunk check-in and let us know how that works.
(8) By Nuno Cruces (ncruces) on 2024-08-17 20:09:23 in reply to 7 [link] [source]
I think it's fixed, thanks!