SQLite Forum

building with tcl 8.7 alpha
Login

building with tcl 8.7 alpha

(1) By anticrisis on 2021-01-10 21:30:36 [link] [source]

In case anyone runs into this, building the current 'release' branch on a system that has tcl 8.7a4 installed (the core-8-branch of tcl) fails due to the way sqlite's configure script determines the value of TCLLIBDIR:

if test "x${TCLLIBDIR+set}" != "xset" ; then
  TCLLIBDIR='$(libdir)'
  for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do
    TCLLIBDIR=$i
    break
  done
  TCLLIBDIR="${TCLLIBDIR}/sqlite3"
fi

Under tcl 8.7 this will return a '//zipfs:/...' path, which is a virtual filesystem. Running 'sudo make install' with the generated sqlite Makefile will happily install a few files to /zipfs:/... at the root of the filesystem.

To avoid this, provide --with-tcl to configure, pointing to a directory with a tclConfig.sh file for tcl 8.6.

(2) By anticrisis on 2021-01-10 23:40:35 in reply to 1 [source]

To follow up, in order to successfully build sqlite on a machine with multiple versions of Tcl installed, including the alpha version of Tlc8.7, I had to do the following:

  1. Install tcl8.6 to its own prefix, /usr/local/tcl86 in my case.
  2. Override TCLSH_CMD in configure, to prevent it from finding another version on the path.
  3. Provide --with-tcl option to configure.

Command line:

TCLSH_CMD=/usr/local/tcl86/bin/tclsh8.6 ../configure --with-tcl=/usr/local/tcl86/lib

To recap, if tclsh8.7 exists on your path, sqlite will fail to install the Tcl bindings correctly unless you override TCLSH_CMD to point to an 8.6 version.