This file describes various problems that have been encountered in compiling, installing and running groff. Suggestions for additions or other improvements to this file are welcome. * gcc 2.3.3 fails to compile pic/object.cc. Apply the following patch: Thu Apr 1 12:06:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com) * cp-init.c (expand_default_init): Don't clear DECL_REGISTER. *** cp-init.c.~2~ Mon Mar 29 21:48:36 1993 --- cp-init.c Thu Apr 1 12:00:33 1993 *************** expand_default_init (binfo, true_exp, ex *** 1141,1149 **** } - /* ARM $7.1.1: "[register] may be ignored and in most implementations - it will be ignored if the address of the variable is taken." - Since we're likely to do just that in the ctor call, clear this. */ - DECL_REGISTER (exp) = 0; - rval = build_method_call (exp, constructor_name (type), parms, binfo, flags|xxref_init_possible); --- 1141,1144 ---- * On a DECstation or other machine using a MIPS cpu, gcc/g++ 2.2.2 gets a fatal signal while compiling tbl/main.c and tbl/table.c. Upgrade to gcc 2.3 or compile those files without -O. * I get lots of `numeric overflow' error messages whenever I run groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler. Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level Makefile. If that doesn't solve the problem, define INT_MIN as -INT_MAX in libgroff/lib.h. * I get errors when I try to compile groff with Sun C++. Groff requires header files that are moderately compatible with AT&T C++ and ANSI C. With some versions of Sun C++, the supplied header files need some of the following changes to meet this requirement: must declare the mem* functions, (just add `#include ' to ); the first argument to fopen and freopen should be declared as `const char *'; the first argument to fread should be declared as `void *'; the first argument to fwrite should be declared as `const void *'; malloc should be declared to return `void *'; in , the declaration `extern "C" { void *__builtin_alloca(int); }' should be added; declarations of getopt(), optarg, optind and opterr should be added to ; in the return type and the second argument type of signal() should be changed to be `void (*)(int)'. You can either change them in place, or copy them to some other directory and include that directory with a -I option. * I get errors when I try to compile groff with DEC C++. Fix the declaration of write() in so that the second argument is a const char *. Fix the declaration of open() in so that the first argument is a const char *. * On Ultrix, the make stops with the message *** Error code 1 Stop. for no apparent reason. Use GNU make. * I'm having problems compiling groff on 386BSD 0.1. If you're using ash as /bin/sh, you'll need the following patch. *** gendef.sh.org Sun Jun 30 13:30:36 1991 --- gendef.sh Sun Feb 28 10:23:49 1993 *************** *** 3,9 **** file=$1 shift ! defs="#define $1" shift for def do --- 3,10 ---- file=$1 shift ! x=$1 ! defs="#define $x" shift for def do You'll also need to change dirnamemax.c so that it doesn't use pathconf(). * While compiling on Xenix, ranlib libgroff.a fails. The system ranlib can't handle externals longer than 40 characters. Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1 instead. * Groff can't handle my troff document. It works fine with AT&T troff. Read the section on incompatibilities in gtroff(1). Try using the -C option. Alternatively there's the sed script in tmac/fixmacros.sed which will attempt to edit a file of macros so that it can be used with groff without the -C flag. * groff -Tdvi produces dvi files that use fonts at weird magnifications. Yes, it does. You may need to compile fonts with Metafont at these magnifications. The CompileFonts script in the devdvi/generate directory may help you to do this. (It will take a *long* time.) * pic output is not centered horizontally; pictures sometimes run off the bottom of the page. The macro package you are using is not supplying appropriate definitions of PS and PE. Give groff a -mpic option. * I'm having problems including PostScript illustrations using the PSPIC macro. A PostScript document must meet three requirements in order to be included with the PSPIC macro: it must comply with the Adobe Document Structuring Conventions; it must contain a BoundingBox line; it must be ``well-behaved''. The BoundingBox line should be of the form: %%BoundingBox: llx lly urx ury where llx, lly, urx, ury are the coordinates of the lower left x, lower left y, upper right x, upper right y of the bounding box of marks on the page expressed as integers in the default PostScript coordinate system (72 units per inch, origin at bottom left corner). A useful tactic is to print out the illustration by itself (you may need to add a `showpage' at the end), and physically measure the bounding box. For more detail on these requirements, read the specification of Encapsulated PostScript format. (This is available from the Adobe file server; send a message with a body of `help' to ps-file-server@adobe.com.) * I've configured groff for A4 paper, but gtroff still seems to think that the length of a page (as returned by \n(.p) is 11 inches. This is intentional. The PAGE option is used only by grops. For compatibility with ditroff, the default page length in gtroff is always 11 inches. The page length can be changed with the `pl' request. * Groff doesn't use the font names I'm used to. Use the `ftr' request. See gtroff(1). * I get errors using the Unix -ms macros with groff -e -C. Apply this change: *** /usr/lib/ms/ms.eqn Tue Apr 25 02:14:28 1989 --- ms.eqn Sun Nov 11 10:33:59 1990 *************** *** 22,29 **** .. . \" EN - end of a displayed equation .de EN ! .if !\\*(10 .br .di .rm EZ .nr ZN \\n(dn .if \\n(ZN>0 .if \\n(YE=0 .LP --- 22,30 ---- .. . \" EN - end of a displayed equation .de EN ! .if \\n(.k>0 .br .di + .ds 10 \\*(EZ\\ .rm EZ .nr ZN \\n(dn .if \\n(ZN>0 .if \\n(YE=0 .LP * gpic doesn't accept the syntax `chop N M' for chopping both ends of a line. The correct syntax is `chop N chop M'. * With gpic -t, when I print `line ->; box' using a dvi to ps program, the arrow head sticks through into the inside of the box. The dvi to ps program should be modified to set the line cap and line join parameters to 1 while printing tpic specials. * When I print the output groff -Tps, the output is always shifted up by about 0.7 inches; I'm using 8.5x11 inch paper. Make sure that PAGE is defined to be `letter' in the top-level Makefile. * When I try to print the output of groff -Tps, I get no output at all from the printer, and the log file shows the error %%[ error: undefined; offendingcommand: BP ]%% I using TranScript spooling software. This is a bug in the page reversal filter in early versions of TranScript. Change the `broken' parameter in /usr/local/lib/groff/font/devps/DESC to 7. * When I preview groff -Tps output using the Sun OpenWindows 2.0 pageview program, all the pages are displayed on top of each other. This is a defect in pageview. Change the `broken' parameter in /usr/local/lib/groff/font/devps/DESC to 2. * With groff -TX75, -TX100or -X, I can only view the first page. The left mouse button brings up a menu that allows you to view other pages. * When I print the output of groff -Tdvi, I just get a black dot in upper left corner. Some dvi drivers (notably early versions of xtex) do not correctly handle dvi files that use a resolution different from that used by dvi files produced by TeX. Try getting a more up to date driver. * I get lots of errors when I use groff with the AT&T -mm macros. The AT&T -mm macros need a few changes to work with groff; `make install.dwbmm' will copy your -mm macros to groff's macro directory and make the necessary changes. You may need to edit the commands for the install.mm target in the Makefile. Alternatively use the groff -mm macros. * gtroff doesn't understand lines like `.ce99' with no space between the name of the request or macro and the arguments. Gtroff requires a space between macro or request and its arguments because it allows the use of long names for macros and requests. You can use the -C option or the `cp' request to put gtroff into a compatibility mode in which it is not possible to use long names for macros but in which no space is required between macros and their arguments. The use of compatibility mode is strongly discouraged. * gtroff gives warnings about lines like .ev \" a comment (with a tab after the .ev). A tab character cannot be used as a substitute for a space character (except in one case: between a control character at the beginning of a line and the name of a macro or request). For example, in Unix troff .ps \" restore the previous point size (with a tab after the .ps) will NOT restore the previous point-size; instead it will be silently ignored. Since this is very likely to be an error, gtroff can give a warning about it. If you want to align comments, you can do it like this: .ev\" \" a comment * I don't like the page headers and footers produced by groff -man. There seem to be many different styles of page header and footer produced by different versions of the -man macros. You will need to modify macros/tmac.an to suit your personal taste. For example, if you want the center of the page header to say UNIX Programmer's Manual you will need to change the line .el .ds an-extra3 \"UNIX Programmer's Manual to .el .ds an-extra3 UNIX Programmer's Manual * While formatting a manual page, groff complains about not being able to break lines. The problem seems to be caused by a line like: .TP \w'label'+2 The -man documentation says that the default scale indicator for TP macro is `n'. The groff -man macros implement this correctly, so that the argument will be evaluated as if it were \w'label'n+2n The Unix -man macros don't implement this correctly (probably because it's hard to do in Unix troff); they just append `n' to the entire argument, so that it will be evaluated as if it were \w'label'u+2n The solution is to fix the manual page: .TP \w'label'u+2 * I'm having problems formatting Ultrix man pages with groff -man. The Ultrix man pages use a number of non-standard extensions to the Unix man macros. One solution is to use the Ultrix -man macros with groff. Rename /usr/local/lib/groff/tmac/tmac.an to /usr/local/lib/groff/tmac/tmac.an.gnu, copy /usr/lib/tmac/tmac.an to /usr/local/lib/groff/tmac/tmac.an and apply the following patch (from Frank Wortner): *** /usr/local/lib/groff/tmac/tmac.an Wed Sep 9 12:29:28 1992 --- /usr/lib/tmac/tmac.an Fri Jul 24 19:58:19 1992 *************** *** 489,495 **** . \" make special case of shift out of italic .de }S .ds ]F ! .if \\$12 .if !\\$5 .ds ]F \^ .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" .el \\$3 .}f --- 489,495 ---- . \" make special case of shift out of italic .de }S .ds ]F ! .if \\$12 .if !\\$5 .ds ]F\^ .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" .el \\$3 .}f Another possible solution is to install tmac/man.ultrix as /usr/local/lib/groff/tmac/man.local. * I'm having problems formatting HP-UX 9.0 man pages with groff -man. Rename /usr/local/lib/groff/tmac/tmac.an to (for example) /usr/local/lib/groff/tmac/tmac.gan, copy HP's tmac.an into /usr/local/lib/groff/tmac/tmac.an, and either put `.cp 1' at the beginning or filter it (and any files it .so's) through tmac/fixmacros.sed. * I'm having problems formatting man pages produced by the perl wrapman script. Some versions of wrapman have a superfluous blank line before the .TH line. This must be deleted. Then either use groff -C, or apply the following patch: *** wrapman.~2~ Sun Jan 19 12:10:24 1992 --- wrapman Fri Apr 2 12:12:57 1993 *************** *** 35,41 **** $line1 .= if $line1 =~ /eval/; $line1 .= if $line1 =~ /argv/; $line2 = ; ! next if $line2 eq "'di';\n"; # Pull the old switcheroo. --- 35,41 ---- $line1 .= if $line1 =~ /eval/; $line1 .= if $line1 =~ /argv/; $line2 = ; ! next if $line2 eq "'di ';\n"; # Pull the old switcheroo. *************** *** 49,56 **** print OUT $line1; print OUT <