From Wikitech
Jump to navigation Jump to search

Recipe for Compiling Tcl that is Unicode-aware beyond the BMP on Toolforge

Create the needed directories

mkdir -p /data/project/shared/tcl/src
cd /data/project/shared/tcl/src

Replace /data/project/shared/tcl with /usr for WMCS installs.


fossil clone tcl.fossil
mkdir tcl
cd tcl
fossil open ../tcl.fossil 4ccc [a734; core-8-branch for VM]
generic/tcl.h:2145: #define TCL_UTF_MAX 6
cd unix
./configure --prefix=/data/project/shared/tcl
make all install


fossil clone tcllib.fossil
mkdir tcllib
cd tcllib
fossil open ../tcllib.fossil
./configure --prefix=/data/project/shared/tcl
make all install


fossil clone tdom.fossil
mkdir tdom
cd tdom
fossil open ../tdom.fossil
cd unix
../configure --prefix=/data/project/shared/tcl
make install


fossil clone tls.fossil
mkdir tls
cd tls
fossil open ../tls.fossil
./configure --prefix=/data/project/shared/tcl --disable-stubs --with-tcl=/data/project/shared/tcl/lib --with-openssl-dir=/usr/lib/x86_64-linux-gnu
make install


local: pacman -Sy mariadb

curl -o- > mysqltcl-3.052.tgz
tar xzf mysqltcl-3.052.tgz
cd mysqltcl-3.052
./configure --prefix=/data/project/shared/tcl --exec-prefix=/data/project/shared/tcl --with-mysql-lib=/usr/lib/x86_64-linux-gnu
make install


curl -o- > tclcurl-7.22.0.tgz
tar xzf tclcurl-7.22.0.tgz
cd TclCurl-7.22.0
./configure --prefix=/data/project/shared/tcl --exec-prefix=/data/project/shared/tcl
make install

trf2.1.4 (Trf/native sha1)

curl -o- > trf-2.1.4.tgz
tar xzf trf-2.1.4.tgz
cd trf2.1.4
./configure --prefix=/data/project/shared/tcl --exec-prefix=/data/project/shared/tcl
Makefile: delete -DHAVE_MD2_H=1
generic/registry.c: CONST84  CONST86
make install
/data/project/shared/tcl/lib/Trf2.1.4/pkgIndex.tcl:2: [list load -lazy [file join $dir]]


curl -o- > xmlgen-1.4.tgz
tar xzf xmlgen-1.4.tgz
cd xmlgen-1.4
/data/project/shared/tcl/bin/tclsh8.7 bras-sa prefix=/data/project/shared/tcl install


local: pacman -Sy fcgi

git clone
c-src/Makefile:4: LIB_INSTALL_DIR=/data/project/shared/tcl/lib/tcl8.7/tclfcgi$(LIB_VERSION)
c-src/Makefile:5: TCL_LIB=tcl8.7
c-src/Makefile:8: gcc -fPIC -c -Wall -I/data/project/shared/tcl/include tclFcgiCmd.c
c-src/Makefile:9: gcc -L/data/project/shared/tcl/lib -shared -Wl,-soname,$(LIB).so. -o $(LIB)$(LIB_VERSION).so tclFcgiCmd.o -l$(TCL_LIB) -l$(FCGI_LIB) -ltclstub8.7
tclFcgiCmd.c:76: CONST86 char *buf, int toWrite, int *errorCodePtr));
cd c-src
make all install


git clone git://
lib/critcl/critcl_c/tcl8.*/tcl.h: #define TCL_UTF_MAX 6
lib/critcl/critcl_c/tcl8.*/tcl.h: #define TCL_STUB_MAGIC ((int)0xFCA3BAD0) [on newer builds]
/data/project/shared/tcl/bin/tclsh8.7 build.tcl install /data/project/shared/tcl/lib

Set up environment on WMCS

sudo apt-get install fossil build-essential automake bc libssl-dev libmariadbclient-dev-compat libcurl4-gnutls-dev rlwrap joe poppler-utils

sqlite3 (cookiejar)

fossil clone sqlite.fossil
mkdir sqlite
cd sqlite
fossil open ../sqlite.fossil release
./configure --prefix=/usr
make all install


Security group: web

Redirect proxy

sudo apt-get install lighttpd
sudo chgrp www-data /var/log/lighttpd


server.document-root        = "/home/taxonbot/web/"
cgi.assign                  = ( ".tcl" => "" )
sudo systemctl enable --now lighttpd