1
This directory includes files required to build TeX and related
2
programs with the DJGPP port of GNU tools for MS-DOS and MS-Windows.
3
DJGPP produces 32-bit protected-mode programs which run on all
4
Microsoft platforms. On plain MS-DOS they need a DPMI server (a free
5
server is available as v2misc/csdpmiNb.zip that can be downloaded from
6
DJGPP archives on SimTel.NET mirrors). MS-Windows have DPMI services
7
built into them. When run on Windows 9X, the DJGPP-compiled programs
8
support long file names.
11
Building the package from sources
12
---------------------------------
14
- The following tools are REQUIRED to build and install Web2c
15
programs (the parentheses list filenames of binary distributions
16
you can download from DJGPP archives if you don't have a
20
Fileutils (fil316b.zip)
21
Textutils (txt122b.zip)
24
Sh-utils (shl112b.zip)
26
Diffutils (dif2721b.zip)
27
Findutils (find41b.zip)
33
All of these are available from the v2gnu directory on the usual
34
DJGPP sites, e.g. ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/.
36
The above tools are IN ADDITION to the basic DJGPP development
37
environment that is required to compile and link C programs.
38
Consult the file v2/readme.1st and the DJGPP FAQ list in
39
v2/faqNNNb.zip, for details about the basic package.
41
- Unzip the downloaded Web2c and Texmflib distributions from the
42
root of your DJGPP installation tree. If you are doing this on
43
Windows 9x, use an unzip program that supports long filenames.
45
This will create the top directory and unpack the sources
46
into the relevant subdirectories. It will also create the
47
`share/texmf' directory and unpack the contents of Texmflib
50
- At this point, I suggest you to read the file
51
`kpathsea/INSTALL.txt'. It includes a detailed yet very
52
readable description of the various options available to you at
53
build and installation time.
55
- Make sure your TMPDIR environment variable points to a drive
56
with enough free space. Many DJGPP installations set this
57
variable to a RAM disk for performance reasons. Since RAM disks
58
tend to be small (a few Megabytes), a complex shell script may
59
fill it with temporary files, typically from pipes and `command`
60
expansions, after which point programs run by that shell will
61
start to fail. The TeX build process runs some very long and
62
complicated shell scripts which require around 4MB of free space
63
on TMPDIR filesystem (it failed for me when I had only 2.5MB).
64
If you cannot enlarge your RAM disk, point TMPDIR to a real disk
65
(the effect on the overall build time is insignificant, since
66
GCC will have hard time compiling some of the larger programs
67
with -O2 switch). TMPDIR is usually set on the DJGPP.ENV file,
68
but you can override it by setting TMPDIR from the DOS prompt.
70
- The default 256KB stack size limit of DJGPP programs is too
71
small for compiling some of the TeX programs. Make sure your
72
cc1.exe program has at least 768KB of stack. Here's how:
74
stubedit cc1.exe minstack=768k
76
(`stubedit' is part of the basic DJGPP development
79
- To configure the package for DJGPP, run the `config.bat' batch
80
file in the djgpp subdirectory. This sets some environment
81
variables and then invokes Bash to run the configuration script
82
with necessary arguments. (You can edit the batch file if you
83
want to run the script with different arguments.) The command
88
- It is possible to configure and build Web2c from a directory
89
other than where the sources reside (useful when you cannot
90
write to that directory, like if it's on a CD-ROM). In that
91
case, you need to invoke `config.bat' with a single argument
92
which is the full pathname of the source directory. For
95
f:\gnu\web2c-7.2\djgpp\config f:/gnu/web2c-7.2
97
Note that you MUST use Unix-style forward slashes in the
98
argument you pass to `config.bat', or else it will fail.
100
- The configure script will run for a while and recursively
101
configure the programs in subdirectories.
103
- After running `config', just say "make".
105
Building the full Web2c package takes a while (about 2 hours
106
on a 486/DX2-66, 35 minutes on a Pentium-166), so you might go
107
for a cup of coffee while it compiles.
109
- To build the emulation programs in the `contrib' directory,
110
chdir into that directory and say "make". Compiling `regex.c'
111
triggers several warning messages about variables that ``might
112
be used uninitialized''; you can safely disregard these
115
- If you are building Texk more than 18 months since it was
116
released, you might see a warning message while LaTeX is built
117
which complains about old sources. In general, you can press
118
[Enter] in response to that message and let the build continue,
119
since the message is just a precaution. However, if you do care
120
to have the latest stuff, you will need to download the
121
latex/base directory from one of the CTAN mirrors and replace
122
with it the files in latex/base which come with tmflib74.zip.
124
- If you have changed some of the programs in the package, it is a
125
good idea to run tests on them. The Makefile in the web2c
126
directory has a large number of xxx-check targets, where xxx is
127
the name of a program; you can run these one by one by going
128
into web2c and saying like so:
132
You can also run all of them together by saying "make check" in
133
the top-level directory.
135
Some of the tests appear to fail (`diff' prints some actual
136
differences between the test results and the reference files
137
that come with the package. In most cases, this is normal
138
behavior (the programs were changed since the canonical results
139
were computed); the file `web2c/tests/check.log' includes the
140
output you should see for each test. If your results coincide
141
with `check.log' (except for the version of the package that the
142
programs print), you are doing fine.
144
- Before installing, if you already have a previous version of
145
Texk installed, review your `texmf.cnf' configuration file (in
146
%TEXMF%/web2c directory). If you have changed it from the
147
original, you might want the installation process to leave it
148
alone and not overwrite it with the fresh copy from the
149
distribution. In that case, edit `texmf.cnf' and remove the
150
word "original" from its first line. This tells the
151
installation process to refrain from replacing that file.
153
- To install the programs, say "make install" in the top
154
directory. This will create missing directories and copy the
155
programs and auxiliary files to their places. The programs
156
inside `contrib' need to be installed manually (typically, into
157
the same directory where the executable programs go).
163
I do NOT intend here to replace the various chapters in the docs
164
which explain how to solve problems and report bugs. Please read
165
the docs whenever you see any seemingly abnormal behavior. What's
166
below is intended to mention a few DOS- and DJGPP-specific
167
problems that you might see, and how to get around them.
169
First, a word of warning. Web2c is a tremendously large and
170
complex package, with dozens of different programs, some of them
171
with many different options. While porting it, I've made a good-
172
faith effort to test everything I could, including using it to
173
generate printed versions of various TeX and Texinfo documents.
174
However, some bugs might still be there. Please treat this port
175
accordingly and report possible bugs to the DJGPP news group
176
(comp.os.msdos.djgpp) first.
178
One possible problem you could see is due to insufficient number
179
of available file handles. `Dvilj' is particularly prone to this
180
problem. If you ever see an error message to the effect that a
181
program has no more handles, edit your CONFIG.SYS and enlarge the
182
FILES= setting there. (Don't forget to reboot so the new setting
185
Another related problem manifests itself by an error message like
188
c:\djgpp\bin/mf.exe: cannot open
190
This usually happens when a DVI driver finds a missing font and
191
invokes the MetaFont program to generate them on the fly. Due to
192
peculiarities of file handles inheritance from parent to child
193
processes, the child process can sometimes fail to start because
194
the stub cannot open the .exe file. I think I've fixed these
195
problems, so you shouldn't see such messages, but if you do,
196
please report the details.
198
If the font-creation fails, a file named `missfont.log' is created
199
in the current directory, with the commands you should issue to
200
make these fonts. Many times, invoking that file as a batch file
201
will create the missing fonts, so you could then invoke the DVI
202
driver again and it will work.
207
Eli Zaretskii <eliz@is.elta.co.il>