Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!usc!apple!agate!ucbvax!fnala.fnal.gov!HERBER From: HERBER@fnala.fnal.gov ("Randolph J. Herber, CD/DCD/SP, x2966") Newsgroups: comp.sys.sgi Subject: Install of TeX 3.1, Metafont 2.7 and dvips 5.47 on IRIX 3.3.1 Message-ID: <910221164509.24e03709@FNALA.FNAL.GOV> Date: 21 Feb 91 22:45:09 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 831 % I used very similiar procedures to install TeX 3.0, Metafont 2.0 and % dvips 5.4 under IRIX 3.3.1. I also used these instructions as a guide % while installing these systems on an AT&T 3B1 running System 3.51. % % Randolph J. Herber % herber@fnalf.fnal.gov \documentstyle[11pt,fullpage]{article} \begin{document} \input logos \memohead \font\logo=logo10 \font\sllogo=logosl10 \font\bflogo=logobf10 \font\Bmff=logobf10 scaled 1577 \font\BMFF=logobf10 scaled 2272 \def\MF{\strut\hbox{\logo METAFONT}}\def\.\#1{\strut\hbox{\tt \#1}} \parskip .5cm \pagestyle{plain} \vspace{1in} \title{DCD Release Note 4.0 \\[1in] \underline{{\bf Installation notes for}} \\ \underline{{\bf \TeX\ 3.1, \MF\ 2.7, and dvips 5.4}} \\ \underline{{\bf under Silicon Graphics IRIX 3.3.1}}} \author{\sc Randolph J. Herber} \maketitle \vspace{0.5in} \parskip .5cm \indent {\it \TeX\ 3.1}, {\it \MF\ 2.7}, and {\it dvips 5.4} are freely distributable text processing systems. {\it \TeX\ 3.1} translates free-form input to a device independent typeset format. {\it \MF\ 2.7} generates bitmapped fonts from generalized descriptions. {\it dvips 5.4} generates PostScript from the device independent format input and the bitmapped fonts and available PostScript fonts. \section*{\bf\underline{Overview}} These notes cover my experiences installing {\it \TeX\ 3.1}, {\it \MF\ 2.7}, and {\it dvips 5.4} under Silicon Graphics IRIX 3.1.1 on fnsg01.fnal.gov. \TeX\ is one of the accepted text processing systems at Fermi National Accelerator Laboratory. UNIX operating systems are gaining acceptance rapidly at Fermilab. A desire to be able to do text processing with a familiar system on the computers running the UNIX operating system has been expressed. As I desired to know how to install \TeX\, \MF\ and dvips from the beginning, I undertook the task of locating the sources and installing these systems on fnsg01.fnal.gov. \newpage \section*{\bf\underline{Locating the sources}} The normal sources for \TeX\ and \MF\ are from {\it labrea.stanford.edu} and {\it june.cs.washington.edu} via ftp and from the University of Washington via tape. \TeX\ 3.0 and \MF\ 2.0 are available from {\it labrea.stanford.edu} in the /pub/tex/unix3.0 directory. I used \TeX\ 3.1 and \MF\ 2.7 obtained by Access Group via tape. I used dvips 5.47 obtained from {\it labrea.stanford.edu} via ftp from the /pub directory as dvips547.tar.Z, dvipslib.tar.Z and dvipsafm.tar.Z. The IP address of {\it labrea.stanford.edu} is \lbrack 36.8.0.47\rbrack . The IP address of {\it june.cs.washington.edu} is \lbrack 128.95.1.4\rbrack . Problems occurred in ``dvitype'' and ``pltotf'' in the texware directory and ``bibtex'' in the bibtex directory. The sources for these programs were replaced with sources obtained from University of Washington via e-mail. \section*{\bf\underline{Time estimate}} Assuming that the sources are available on the installation machine or by high speed electronic transfer and that no major problems occur, installation of these three systems combined can be done in about four hours. The first time with no experience and no detailed installation notes, I take about 4 days to install these three systems. There were major problems in compilation and execution of these systems. These notes implictly include my efforts to avoid these problems. \section*{\bf\underline{Description of installation}} \begin{enumerate} \item Make directories with {\it mkdir} to hold the working copies of the \TeX\ and \MF\ sources and of the dvips sources. \label{create} \begin{quote} \begin{verbatim} cd /usr/distribute mkdir TeX3.1 dvips54 \end{verbatim} \end{quote} \item Copy the compressed tar files into the appropriate /usr/distribute directories by various means. \item {\it uncompress} and un{\it tar} the sources in their respective directories. \begin{quote} \begin{verbatim} cd /usr/distribute/TeX3.1 zcat TeX3.1.tar.Z | tar -xvof - cd /usr/distribute/dvips54 zcat dvips54.tar.Z | tar -xvof - \end{verbatim} \end{quote} \item Write a csh script to be source'd to setup up some shell variables and add '.' to PATH. These paths should match the paths declared in site.h (see item \ref{site.h} on page \pageref{site.h}), \TeX{}'s master Makefile (see item \ref{TMake} on page \pageref{TMake}), \TeX{}'s Install\_INPUTS (see item \ref{INPUTS} on page \pageref{INPUTS}), dvips's Makefile (see item \ref{DMake} on page \pageref{DMake}), dvips's MakeTeXPK (see item \ref{DMTP} on page \pageref{DMTP}), dvips's config.ps (see item \ref{config} on page \pageref{config}), dvips's config.Black (see item \ref{configB} on page \pageref{configB}), and dvips's config.White (see item \ref{configW} on page \pageref{configW}). Add the current directory, ``.'', to the path variable only if it is needed. \label{paths} \begin{quote} \begin{verbatim} # should be set to match site.h (and Makefile) set bl=/usr/local/bin set ll=/usr/local/lib set tl=$ll/tex set ml=$ll/mf set wl=`pwd`/TeX3.1 set fl=$tl/fonts/tfm set dl=($bl $ll $tl $tl/formats $tl/fonts \ $tl/fonts/tfm $tl/inputs \ $tl/bib $ml $ml/bases $ml/inputs) set path=($path .) \end{verbatim} \end{quote} \item Change directory to \$wl \item Copy Makefile-dist to Makefile and edit Makefile \label{TMake} \begin{enumerate} \item Change CC to ``cc''. \item Change YACC to ``yacc''. \item Note: for this installation, CFLAGS did not need to be changed. \item Change wlib to \$(x11lib) \item Change formats to tex.fmt latex.fmt slitex.fmt \item Change bases to mf.base cmmf.base \item Change localmodes to ``fermi''. {\bf Note: the paths below must match those in item \ref{paths} on page \pageref{paths}.} \item Change INSTALL to ``\$(wl)/emplant'' from ``install -g tex''. Replace \$(wl) above with the full path specification. Make ``emplant'' executable, i.e.\ ``chmod 755 emplant''. Text of ``emplant'' shell script: \begin{quote} \begin{verbatim} #!/bin/sh cp $4 $5 chmod $1 $5 chgrp $3 $5 chown $2 $5 \end{verbatim} \end{quote} \item Change fileinstall to ``\$(INSTALL) 644 bin sys''. \item Change proginstall to ``\$(INSTALL) 755 bin sys''. \item Change bindir to /usr/local/bin \item Change mandir to /usr/local/man/man1 \item Change texlibdir to /usr/local/lib/tex \item Change texpooldir to \$(texlibdir) \item Change texinputdir to \$(texlibdir)/inputs \item Change texfontdir to \$(texlibdir)/fonts/tfm \item Change formatdir to \$(texlibdir)/formats \item Change mflibdir to /usr/local/lib/mf \item Change mfpooldir to \$(mflibdir) \item Change mfinputdir to \$(mflibdir)/inputs \item Change basedir to \$(mflibdir)/bases \item In the {\it install-formats} rule, change ``\$(formatdir)'' to ``\$(formatdir)/\$\$f''. \item In the {\it install-bases} rule, change ``\$(basedir)'' to ``\$(basedir)/\$\$f''. \end{enumerate} \item Copy site.h-dist to site.h and edit site.h \label{site.h} \begin{enumerate} \item Set define SYSV \item Set undef \_POSIX\_SOURCE {\bf Note: the paths below must match those in item \ref{paths} on page \pageref{paths}.} \item Set define TEXFONTS ``.:/usr/local/lib/tex/fonts/tfm'' \item Set define TEXFORMATS ``.:/usr/local/lib/tex/formats'' \item Set define TEXINPUTS ``.:/usr/local/lib/tex/inputs'' \item Set define TEXPOOL ``/usr/local/lib/tex'' \item Set define MFBASES ``.:/usr/local/lib/mf/bases'' \item Set define MFINPUTS ``.:/usr/local/lib/mf/inputs'' \item Set define MFPOOL ``/usr/local/lib/tex/mf'' \item Set define VFFONTS ``.:/usr/local/lib/tex/fonts/vf'' Note that it is necessary to uncomment this line. \item Set define TEXFONTS\_SUBDIR ``/usr/local/lib/tex/fonts/tfm'' \item Set define TEXINPUTS\_SUBDIR ``/usr/local/lib/tex/inputs'' \item Set define MFINPUTS\_SUBDIR ``/usr/local/lib/mf/inputs'' \item Set define BIBINPUTS ``.:/usr/local/lib/tex/bib'' \item Set define X11WIN /* X Version 11. */ \item Set define HAVE\_GETWD \item Set define SPRINTF\_RETURN\_TYPE int \item Set define REGFIX \item If not-AIX, set the second typedef schar to ``typedef signed char schar;''. Note, if ``signed char'' is not acceptable to your compiler, use ``char'' or ``short'' which ever gives a signed integer with at least 7 bits of magnitude. \item Set define EDITOR the full file name of the desired editor. \end{enumerate} \item Do ``mkdir \$dl''. \item Do ``chmod 755 \$dl''. \item Do ``chgrp sys \$dl''. \item Do ``chown bin \$dl''. \item Copy \$wl/TeXfonts/* to \$fl This copies all of the \TeX\ font metric files to the file system location they will be used from. \item Edit Install\_INPUTS to change environment variable definitions near the top of the shell script to match values in Makefile and site.h and to change ``cp -p'' commands to ``cp'' commands. Because some of the {\it chmod} argument lists may become too long, it is necessary to change, ``chmod 666 \verb+$MFINPUT/*.mf+'' to ``find \verb+$MFINPUTS+ -name \verb+'*.mf'+ \verb+|+ xargs chmod 666'' (near the top of the shell script) and ``chmod 444 \verb+$MFINPUT/*.mf+'' to ``find \verb+$MFINPUTS+ -name \verb+'*.mf'+ \verb+|+ xargs chmod 444'' (near the bottom of the shell script). \label{INPUTS} \item Do ``sh -x Install\_INPUTS''. This shell script copies the various program input files the directories they are to reside within. \item Do ``cp \$ml/inputs/U\_Wash.mf \$ml/inputs/fermi.mf''. \item Do ``chmod 644 \$ml/inputs/fermi.mf''. \item Edit \$ml/inputs/fermi.mf (see following) to add mode Black as shown below and to add White as a copy of RicohFourZeroEightZero changing the comments and the ``modedef'' line, and to modify base\_version and localfont. This is to establish \MF\ modes for driving the common types of laser print engine. Some types clear the image to black and write the white; other types clear the image to white and write the black. Because the pixels are round and bleed a little, the images formed by the different types of print engine need slightly different fonts to form the proper images. \begin{quote} \begin{verbatim} base_version:=base_version&"/fermi"; % Write Black (same as DEC LNO3 mode) % LNOthree mode: for the DEC LN03 printer (Ricoh LP) mode_def Black = proofing:=0; % no, we're not making proofs fontmaking:=1; % yes, we are making a font tracingtitles:=0; % no, don't show titles in the log pixels_per_inch:=300; % pixels per inch blacker:=0.65; % blacker pens %blacker:=0.3; % makes CMR5 "a" look better fillin:=-0.1; % compensate for light diagonals o_correction:=.5; % overshoot enddef; localfont:=Black; % the mode most commonly used to make fonts \end{verbatim} \end{quote} \item Remove or rename any ``makefile'' (note ``m'', not ``M''). \item Do ``make''. Note: any warning about statements not reachable may be safely ignored. Other errors and warning probably reflect trouble. If you need to cleanup after changing files to correct problems, do a ``make veryclean'' in the appropriate directory to remove any results of the compilation attempt. \item Do ``make install''. \item Do ``rehash'', if you are using {\it csh}. \item Edit the mf/Makefile to assure that localmodes is fermi.mf and to assure that the cmmf.base target is as follows: \begin{quote} \begin{verbatim} cmmf.base: mf.base ./inimf 'plain; input $(localmodes); input cmbase; dump' mv plain.base cmmf.base mv plain.log cmmf.log \end{verbatim} \end{quote} Note: if it is necessary to rerun inimf, it may be necessary to define a exported shell environment variable with a value that mfpooldir was set to in the main \TeX\ Makefile. It may be necessary to do a ``make veryclean''. If you are using the values suggested in this document, that value is /usr/local/lib/mf. \item Do ``make formats''. \item Do ``make install-formats''. \item Do ``make bases''. \item Do ``make install-bases''. Install of \TeX\ 3.1 and \MF\ 2.7 is complete at this point. \item Change to the dvips 5.4 directory This is the beginning of the install of dvips 5.4. This directory was created in item \ref{create} on page \pageref{create}. \item Edit the Makefile \label{DMake} \begin{enumerate} \item Uncomment SYS= -DSYSV \item Change all occurances of ``/usr/bin'' to ``/usr/local/bin''. \item Change all occurances of ``/usr/lib'' to ``/usr/local/lib''. \item Delete -DDEFRES=400 text \item Delete -Wall text \item Change FLIBS text to ``-lm''. \item Change the install procedure (the ``install:'' rule). \begin{enumerate} \item Make two copies of the ``install -c -m'' lines \item Change the first set of lines to ``chmod'' commands, using the indicated modes Replace ``install -c -m'' with ``chmod''. Remove `` \$'' and following text. \item Change the second set to ``cp'' the files to the indicated destinations. Replace ``install -c -m '' and the following three digits with ``cp''. \end{enumerate} \item Optionally remove the ``/LocalLibrary'' components from the path definitions. If these components are not used, they are not necessary in these definitions. If left in, they would cause a extremely minor slowing of dvips. \item Optionally, if you are maintaining dvips's inputs separate from \TeX{}'s inputs, add the path to dvips's inputs to FIGPATH. \end{enumerate} \item Edit config.ps \label{config} \begin{enumerate} \item Change default resolution to 300 \item Remove the default printer specification. \item Set the \MF\ mode. \item Set the path to the font directory. \end{enumerate} \begin{quote} \begin{verbatim} * * With a virtual machine, we can claim 1M of memory. * m 1000000 * * And send output by default to a PostScript file. * * o !flpr -q wh7x_ps * * Default resolution. * D 300 * * Last resort sizes. * R 100 120 144 300 360 400 432 480 * * Set Metafont mode to White (i.e. for write-white print engines) * M White * * Set pk subdirectory for White fonts * P /usr/local/lib/tex/fonts/pk/White \end{verbatim} \end{quote} \item Edit MakeTeXPK \label{DMTP} \begin{enumerate} \item Change DESTDIR (see item \ref{paths} on page \pageref{paths}). \item Change MODE for BDPI = 300 to White (for DEC LNO3). \item Change default resolution to 300 pixels per inch. \item Add code to save the tfm if needed. \end{enumerate} \begin{quote} \begin{verbatim} #!/bin/sh # # This script file makes a new TeX PK font, because one wasn't # found. Parameters are: # # name dpi bdpi magnification [mode] # # `name' is the name of the font, such as `cmr10'. `dpi' is # the resolution the font is needed at. `bdpi' is the base # resolution, useful for figuring out the mode to make the font # in. `magnification' is a string to pass to MF as the # magnification. `mode', if supplied, is the mode to use. # # Note that this file must execute Metafont, and then gftopk, # and place the result in the correct location for the PostScript # driver to find it subsequently. If this doesn't work, it will # be evident because MF will be invoked over and over again. # # Of course, it needs to be set up for your site. # # TEMPDIR needs to be unique for each process because of the possibility # of simultaneous processes running this script. # DESTDIR=/usr/local/lib/tex/fonts/pk TEMPDIR=/tmp/mtpk.$$ NAME=$1 DPI=$2 BDPI=$3 MAG=$4 MODE=$5 umask 0 if test "$MODE" = "" then if test $BDPI = 300 then MODE=White elif test $BDPI = 400 then MODE=nexthi elif test $BDPI = 100 then MODE=nextscreen elif test $BDPI = 635 then MODE=linolo elif test $BDPI = 1270 then MODE=linohi elif test $BDPI = 2540 then MODE=linosuper else echo "I don't know the mode for $BDPI" echo "Have your system admin update MakeTeXPK" exit 1 fi fi # Something like the following is useful at some sites. DESTDIR=/usr/local/lib/tex/fonts/pk/$MODE GFNAME=$NAME.$DPI'gf' PKNAME=$NAME.$DPI'pk' # Clean up on normal or abnormal exit trap "cd /; rm -rf $TEMPDIR $DESTDIR/pktmp.$$" 0 1 2 15 mkdir $TEMPDIR cd $TEMPDIR if test -r $DESTDIR/$PKNAME then echo "$DESTDIR/$PKNAME already exists!" exit 0 fi # check also in the standard place # if test -r /usr/local/lib/tex/fonts/pk/$PKNAME # then # echo /usr/local/lib/tex/fonts/pk/$PKNAME already exists! # exit 0 # fi echo mf "\mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" \\\