Petr Ferdus wrote:
>
> Does it mean, that to build "chrooted" version of fossil one must
> omit FOSSIL_TCL_SOURCE (that would be my misundestandin)?
> With unix build, will "chrooted" version containg TCL start-up code?
> (I can't test it)
> Should not the same happen for windows build? 
> I would like to try it later this evening.  
> 

No.  There are three primary concerns in order to build Fossil with Tcl
integration enabled and make use of it at runtime:

1. Locating the necessary Tcl header file(s) at compile-time.

Currently, this is handled several different ways, depending on the
platform.  On Unix-like systems, it is handled via searching for an
installed Tcl and using those header files.  This behavior can be
overridden via the configure script; however, I have not needed to
do this for my non-Windows uses of Fossil.

2. Locating the necessary Tcl library file(s) at compile-time.

This is handled largely the same as #1.  The configure script (really
autosetup) should be capable of automatically locating the necessary
library on most Unix-like systems.

3. Locating the necessary Tcl library at runtime (which must be
   "installed" in order to locate its "init.tcl", more on this
   later).

When Fossil is compiled with "stubs-enabled", it will attempt to
dynamically load the Tcl library (i.e. via dlopen) and then call
the necessary exported functions to get everything going; otherwise,
it will just use the exported functions it was linked against.
Either way, the instance of Tcl being used needs to be able to locate
its script library (e.g. "init.tcl").  Typically, this means it must
be "installed" via "make install" or similar mechanism so that all
the files are located in the right places.

Here is the sequence of commands that I use to compile and install
Fossil on Unix-like systems with a locally installed Tcl enabled:

##################################################################
# PHASE 1: Download and install Tcl 8.6.1.
##################################################################

mv tcl tcl.old
wget http://prdownloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz
tar -zxvf tcl8.6.1-src.tar.gz
cd tcl8.6.1/unix
./configure --prefix=/home/yourusername/tcl
make all
make install

##################################################################
# PHASE 2: Download and install TclLib 1.15 (optional).
##################################################################

wget http://prdownloads.sourceforge.net/tcllib/tcllib-1.15.tar.gz
tar -zxvf tcllib-1.15.tar.gz
cd tcllib-1.15
export LD_LIBRARY_PATH=/home/yourusername/tcl/lib
/home/yourusername/tcl/bin/tclsh8.6 installer.tcl

##################################################################
# PHASE 3: Download and install Fossil.
##################################################################

wget --no-check-certificate --output-document=Fossil-trunk.tar.gz
https://www.fossil-scm.org/index.html/tarball/Fossil-trunk.tar.gz?name=trunk
tar -zxvf Fossil-trunk.tar.gz
cd trunk
./configure --with-zlib=/home/yourusername/trunk/compat/zlib
--with-openssl=auto --with-tcl=/home/yourusername/tcl --with-th1-hooks=1
--json=1
make
cp fossil /home/yourusername/bin/fossil

##################################################################
# PHASE 4: Setup integration with web server (Apache).
##################################################################

In the ".htaccess" file, you'll most likely need the following two lines:

SetEnv LD_LIBRARY_PATH /home/yourusername/tcl/lib
SetEnv HOME /home/yourusername

--
Joe Mistachkin

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to