Place here the content of the page
This document explains how to compile the Thot Editor
environment (Thot Editor binary and Thot
schemas compilers) from the distributed source
We strongly recommend to use a GNU make and if possible GNU CC since these are
the tools used by theOpera Team, and very few testings have been done with
other flavours of make and C compilers.
You need the Thot library source code archive thot-src-xxx.tar.gz and the Thot
Editor source code archive thoteditor-src-yyy.tar.gz.
Having usual Unix development tools, at least
cpp should be available.
Thot Editor requires X-Windows (X11R5 or X11R6) and Motif (1.2.x or 2.0) or Lesstif (free Motif clone).
Here is a simple recipe explaining how to build using autoconf:
install your source code tree
Lauch configure to create the Makefile(s), it is cleaner to create a subtree
This creates all the Makefiles needed and generate an Options.orig file
containing all the variable which can be tuned. For example one can just
change the CFLAGS values. Be careful, autoconf usually set up the debug flag
"-g" which tends to generate very big library and binaries.
With -g the Target tree can grow up to 100 MBytes while without it it won't
use more than 20 MBytes.
It is strongly recommended to use GNU make, which may not be the default make
on your system. In this case try:
The compilation process can take a fair amount of time, 10 minutes at
Compile the document schemas:
The structure, presentation and translation schemas are compiled.
You can test the result immediately by lauching Thot Editor binary built in
the bin directory:
If thot binary seems fine you can install it:
By default, the binaries are installed in /usr/local/bin, libraries in
/usr/local/lib and all data are in /usr/local/share/thot. This can be
overrided by specifying different values for prefix(es) using configure
command line options in step 2.
Ultimately, if you're not satisfied with your current Thot Editor
installation, you can clean up with:
All the Makefile(s) build in the object tree are generated by configure script
and Makefile.in templates found in the source tree. It generates a main
Makefile at the top of the object tree and a set of Makefiles in most of the
directory of the object tree. The main Makefile accepts the following
make rebuild : rebuild all the Makefile(s) from the autoconf
and Makefile.in files.
make depend : rebuild all the dependencies in the object
make proto : rebuild all the prototype include files xxx_f.h
from their xxx.c counterpart.
make clean : removes all object files, but keep the binaries
make libjpeg : rebuild the libjpeg.a library from
make libpng : rebuild the libpng.a and libz.a libraries from
make schemas : compile the document schemas used by Thot
make without argument rebuild everything.
make thot rebuild Thot Editor binary.
One can also go to a specific sub-directory in the object tree and launch make
from that place. It will rebuild all the objects pertaining to this
Next section try to give some hint on debugging errors at compile-time.
Errors may append at diffferent stages in the compilation process. Here is a
Here is a few rules to check if the editor binary just produced does not
Check that the shared libraries needed by Thot editor are found on the system.
ldd bin/thot on
Suns or Linux
should print all the shared libraries needed by Thot Editor and the path to
the corresponding libraries in the system.
Verify that the main registry file
Thot/config/thot.ini is present.
If everything seems Ok, one can debug the problem by using a system call
tracer like truss on Solaris or strace on
Linux. Check for syscalls errors near the end of the system trace dump.
All the remaining technics to find out what's wrong are software debugging
methods, for this of course one need to recompile the binary with debug option
enabled, and use a debugger program to see what's happening exactly. Once a
bug has been identified, please report it to the Thot Editor
development Team, by sending the error to the
@imag.fr mailing-list. Please check first the archive, the error may
have been already reported. Of course, sending a contextual diff of the
modified files may help correcting the problem, and have it patched on next