From Wikitech
Jump to navigation Jump to search

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

Creating the needed directories

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

Build dependency: fossil

local: pacman -Sy fossil


curl -o- > fossil-bin-2.7.tgz
tar xzf fossil-bin-2.7.tgz
mkdir ../bin
mv fossil ../bin
echo alias fossil=/data/project/shared/tcl/bin/fossil >> ~/.bash_aliases
. ~/.bash_aliases


fossil clone tcl.fossil
mkdir tcl
cd tcl
fossil open ../tcl.fossil core-8-branch
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 tcllib-1-19
./configure --prefix=/data/project/shared/tcl
make all install
/data/project/shared/tcl/lib/tcllib1.19/oauth/oauth.tcl:286: fix spurious brace
/data/project/shared/tcl/lib/tcllib1.19/oauth/oauth.tcl:275: change $header to $params


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
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
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)

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
./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

WMF Labs extras

sudo mkdir -p /data/project/shared
sudo chmod o+w /data/project/shared
sudo apt-get install rlwrap joe poppler-utils automake gcc make libcurl4-gnutls-dev bc libmariadbclient-dev-compat libssl-dev tclsh
mysqltcl: --with-mysql-lib=/usr/lib/x86_64-linux-gnu
tls: --with-tcl=/data/project/shared/tcl/lib --with-openssl-dir=/usr/lib/x86_64-linux-gnu