Update to groffer 0.9.7.
[s-roff.git] / PROBLEMS
blob144ff076d3a63bbe0da05d55c8e13b8950490ed2
1 This file describes various problems that have been encountered in
2 compiling, installing and running groff.  Suggestions for additions or
3 other improvements to this file are welcome.
5 ----------------------------------------------------------------------
9 Generic Problems
10 ================
14 * Displaying a man page on a terminal with/without my favourite pager
15   only gives garbage.
17 groff by default now uses SGR escape sequences (`ANSI color') to
18 control the display attributes (bold, underlined, colour) on TTYs. 
19 Some terminals (e.g. `kterm') don't understand SGR, and some pagers
20 (e.g. older versions of `less' or `less' without the -R option) don't
21 understand SGR either.  There are three solutions to fix this, in order
22 of preference; please read the grotty man page for more details.
24 The fourth and probably best option is to update your terminal program
25 and pager to versions which can handle SGR.
27   1. Set the GROFF_NO_SGR environment variable.
29   2. Pass option -c to grotty.
31   3. Append the following fragment to the `troffrc' file:
34 --- start ---
35 .if n \{\
36 .  nr _C \n(.C
37 .  cp 0
39 .  \" The following code sets a top-of-page trap to disable grotty's TTY
40 .  \" mode.  Since neither \X nor .output can be used before the first
41 .  \" page has started, we must use a trap.  To make it work with troff's
42 .  \" -o option, we wait until the first printed page.
44 .  de sgr@dummy
45 .  .
47 .  rn wh wh@old
49 .  \" The stand-alone version.  If no other trap is set, we can safely
50 .  \" insert the truncated vertical space caused by the trap (if any).
51 .  \" Otherwise we assume that the document's main macro package takes
52 .  \" care of that.  As soon as the trap has been executed, it is removed.
53 .  de1 no@sgr
54 .    if \\n[.P] \{\
55 .      if (\\n[.t] == \\n[.p]) \{\
56 .        rn wh@old wh
57 .        rm no@sgr
58 .        wh 0
59 .        sp \\n[.trunc]
60 .        nop \X'tty: sgr 0'
61 .        sp -1
62 .    \}\}
63 .  .
65 .  wh@old 0 no@sgr
67 .  \" The piggyback version to be appended to macros planted with the
68 .  \" modified \x17h' request.
69 .  de1 no@sgr1
70 .    if \\n[.P] \{\
71 .      rn wh@old wh
72 .      ds no@sgr1
73 .      nop \X'tty: sgr 0'
74 .      sp -1
75 .    \}
76 .  .
78 .  \" We redefine the \x17h' request so that \x0eo@sgr1' is appended to
79 .  \" the trap macro.
80 .  de1 wh
81 .    am1 \\$2 sgr@dummy
82 .      no@sgr1
83 .    sgr@dummy
84 .    wh@old \\$1 \\$2
85 .  .
87 .  cp \n[_C]
88 .\}
89 --- end ---
91 ----------------------------------------------------------------------
93 * The UTF-8 output of grotty has strange characters for the minus, the
94   hyphen, and the right quote.  Why?
96 The used Unicode characters (U+2212 for the minus sign and U+2010 for
97 the hyphen) are the correct ones, but many programs can't search them
98 properly.  The same is true for the right quote (U+201D).  To map those
99 characters back to the ASCII characters, insert the following code
100 snippet into the `troffrc' configuration file:
102 .if '\*[.T]'utf8' \{\
103 .  char \- \N'45'
104 .  char  - \N'45'
105 .  char  ' \N'39'
109 ----------------------------------------------------------------------
111 * My document says that the current year is 19100, not 2000.
113 In groff, as in traditional troff, the yr number register yields the
114 year minus 1900.  Unfortunately, there is a longstanding bug in the
115 Troff User's Manual <http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz>,
116 which incorrectly claims that yr is the last two digits of the year.
117 This claim was never true of either Unix troff or of groff.
119 If your text looks like this:
121         .\" Wrong:
122         This document was formatted in 19\n(yr.
124 you can correct it as follows:
126         This document was formatted in \n[year].
128 or, if you want to be portable to older troff versions, as follows:
130         .nr y4 1900+\n(yr
131         This document was formatted in \n(y4.
133 ----------------------------------------------------------------------
135 * groff can't handle my troff document.  It works fine with AT&T
136   troff.
138 Read the section on incompatibilities in groff_diff(7).  Try using
139 the -C option.  Alternatively there's the sed script
140 `tmac/fixmacros.sed' which will attempt to edit a file of macros so
141 that it can be used with groff without the -C flag.
143 ----------------------------------------------------------------------
145 * gtroff doesn't understand lines like `.ce99' with no space between
146   the name of the request or macro and the arguments.
148 gtroff requires a space between macro or request and its arguments
149 because it allows the use of long names for macros and requests.  You
150 can use the -C option or the `cp' request to put gtroff into a
151 compatibility mode in which it is not possible to use long names for
152 macros but in which no space is required between macros and their
153 arguments.  The use of compatibility mode is strongly discouraged.
155 ----------------------------------------------------------------------
157 * groff -Tdvi produces dvi files that use fonts at weird
158   magnifications.
160 Yes, it does.  You may need to compile fonts with Metafont at these
161 magnifications.  The CompileFonts script in the devdvi/generate
162 directory may help you to do this.  (It will take a *long* time on
163 slow computers.)
165 ----------------------------------------------------------------------
167 * Groff doesn't use the font names I'm used to.
169 Use the `ftr' request.  See groff_diff(7).
171 ----------------------------------------------------------------------
173 * pic output is not centered horizontally; pictures sometimes run off
174   the bottom of the page.
176 The macro package you are using is not supplying appropriate
177 definitions of PS and PE.  Give groff a -mpic option.
179 ----------------------------------------------------------------------
181 * gpic doesn't accept the syntax `chop N M' for chopping both ends of
182   a line.
184 The correct syntax is `chop N chop M'.
186 ----------------------------------------------------------------------
188 * With gpic -t, when I print `line ->; box' using a dvi to ps program,
189   the arrow head sticks through into the inside of the box.
191 The dvi to ps program should be modified to set the line cap and line
192 join parameters to 1 while printing tpic specials.
194 ----------------------------------------------------------------------
196 * gtroff gives warnings about lines like
197   .ev   \" a comment
198   (with a tab after the .ev).
200 A tab character cannot be used as a substitute for a space character
201 (except in one case: between a control character at the beginning of a
202 line and the name of a macro or request).  For example, in Unix troff
204   .ps   \" restore the previous point size
206 (with a tab after the .ps) will NOT restore the previous point-size;
207 instead it will be silently ignored.  Since this is very likely to be
208 an error, gtroff can give a warning about it.  If you want to align
209 comments, you can do it like this:
211   .ev\"                         \" a comment
213 ----------------------------------------------------------------------
215 * I don't like the page headers and footers produced by groff -man.
217 There seem to be many different styles of page header and footer
218 produced by different versions of the -man macros.  You will need to
219 put modified macros from tmac/an-old.tmac into man.local.  More
220 information is available in groff_man(7).
222 ----------------------------------------------------------------------
224 * Where can I get grap?
226 Ted Faber <faber@lunabase.org> has written a freely available grap:
228   http://www.lunabase.org/~faber/Vault/software/grap/
230 ----------------------------------------------------------------------
232 * The \n(st and \n(sb registers don't seem to work.  I thought \w set
233   them to the height and depth of its argument, but the registers
234   always seem to be 0.
236 \n(st and \n(sb aren't supposed to give the height and depth of the
237 string rather they give the minimum and maximum vertical displacement
238 of the baseline.  For example for \v'2u'\v'-3u', \n(st will be 1 and
239 \n(sb will be -2.  The height and depth of the string is available in
240 the \n[rst] and \n[rsb] registers: these are groff extensions.
242 ----------------------------------------------------------------------
244 * While formatting a manual page, groff complains about not being able
245   to break lines.  The problem seems to be caused by a line like:
246   .TP \w'label'+2
248 The -man documentation says that the default scale indicator for TP
249 macro is `n'.  The groff -man macros implement this correctly, so that
250 the argument will be evaluated as if it were
252   \w'label'n+2n
254 The Unix -man macros don't implement this correctly (probably because
255 it's hard to do in Unix troff); they just append `n' to the entire
256 argument, so that it will be evaluated as if it were
258   \w'label'u+2n
260 The solution is to fix the manual page:
262   .TP \w'label'u+2
264 ----------------------------------------------------------------------
266 * I'm having problems formatting man pages produced by the perl
267   wrapman script.
269 Some versions of wrapman have a superfluous blank line before the .TH
270 line.  This must be deleted.  Then either use groff -C, or apply the
271 following patch:
273 *** wrapman.~2~ Sun Jan 19 12:10:24 1992
274 --- wrapman     Tue Aug 10 02:06:41 1993
275 ***************
276 *** 35,41 ****
277       $line1 .= <IN> if $line1 =~ /eval/;
278       $line1 .= <IN> if $line1 =~ /argv/;
279       $line2 = <IN>;
280 !     next if $line2 eq "'di';\n";
281   
282       # Pull the old switcheroo.
283   
284 --- 35,41 ----
285       $line1 .= <IN> if $line1 =~ /eval/;
286       $line1 .= <IN> if $line1 =~ /argv/;
287       $line2 = <IN>;
288 !     next if $line2 eq "'di ';\n" || $line2 eq "'di';\n";
289   
290       # Pull the old switcheroo.
291   
292 ***************
293 *** 49,56 ****
294   
295       print OUT $line1;
296       print OUT <<EOF;
297 ! 'di';
298 ! 'ig00';
299   #
300   # $header
301   #
302 --- 49,58 ----
303   
304       print OUT $line1;
305       print OUT <<EOF;
306 ! 'di ';
307 ! 'ds 00 \\"';
308 ! 'eo ';
309 ! 'ig 00 ';
310   #
311   # $header
312   #
313 ***************
314 *** 72,85 ****
315   
316       # These next few lines are legal in both Perl and nroff.
317   
318 ! $null.00;                       # finish .ig
319    
320   'di           \\" finish diversion--previous line must be blank
321   .nr nl 0-1    \\" fake up transition to first page again
322   .nr % 0         \\" start at page 1
323 ! '; __END__ ##### From here on it's a standard manual page #####
324   .TH $PROG 1 "$month $mday, 19$year"
325 - .AT 3
326   .SH NAME
327   $prog \\- whatever
328   .SH SYNOPSIS
329 --- 74,87 ----
330   
331       # These next few lines are legal in both Perl and nroff.
332   
333 ! $null.00 ;                      # finish .ig
334 ! 'ec \\';
335    
336   'di           \\" finish diversion--previous line must be blank
337   .nr nl 0-1    \\" fake up transition to first page again
338   .nr % 0         \\" start at page 1
339 ! .\\"'; __END__ ##### From here on it's a standard manual page #####
340   .TH $PROG 1 "$month $mday, 19$year"
341   .SH NAME
342   $prog \\- whatever
343   .SH SYNOPSIS
345 ----------------------------------------------------------------------
347 * groff uses up an enormous amount of memory processing large files.
348   I'm using 386BSD 0.1.
350 386BSD includes an old version of g++, 1.39, which has a bug that
351 causes a major memory leak in gtroff.  Apply the following fix to g++
352 and recompile groff:
354 *** cplus-decl.c.~1~    Mon Aug  6 05:28:59 1990
355 --- cplus-decl.c        Wed Jun  5 08:55:04 1991
356 ***************
357 *** 7951,7961 ****
358   
359         /* At the end, call delete if that's what's requested.  */
360         if (TREE_GETS_DELETE (current_class_type))
361         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
362                                       get_identifier (OPERATOR_DELETE_FORMAT),
363 !                                     build_tree_list (NULL_TREE, integer_zero_node),
364                                       NULL_TREE, LOOKUP_NORMAL);
365         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
366         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
367         else
368         exprstmt = 0;
369 --- 7951,7961 ----
370   
371         /* At the end, call delete if that's what's requested.  */
372         if (TREE_GETS_DELETE (current_class_type))
373         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
374                                       get_identifier (OPERATOR_DELETE_FORMAT),
375 !                                     build_tree_list (NULL_TREE, current_class_decl),
376                                       NULL_TREE, LOOKUP_NORMAL);
377         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
378         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
379         else
380         exprstmt = 0;
384 Printing and Display Problems
385 =============================
389 * I'm having problems including PostScript illustrations (EPS) using
390   the PSPIC macro and/or \X'ps: import ...'.
392 A PostScript document must meet three requirements in order to be
393 included with the PSPIC macro: it must comply with the Adobe Document
394 Structuring Conventions; it must contain a BoundingBox line; it must
395 be ``well-behaved''.  The BoundingBox line should be of the form:
397   %%BoundingBox: llx lly urx ury
399 where llx, lly, urx, ury are the coordinates of the lower left x,
400 lower left y, upper right x, upper right y of the bounding box of
401 marks on the page expressed as integers in the default PostScript
402 coordinate system (72 units per inch, origin at bottom left corner).
404 The most convenient program to get the bounding box of a document is
405 the `ps2epsi' script coming with GhostScript.
407 If you can't use this program, another useful tactic is to print out
408 the illustration by itself (you may need to add a `showpage' at the
409 end), and physically measure the bounding box.  For more detail on
410 these requirements, read the specification of Encapsulated PostScript
411 format.  (This is available from the Adobe file server; send a message
412 with a body of `help' to ps-file-server@adobe.com.)
414 If an EPS file to be included via \X'ps: import' does not start with
415 %!PS-Adobe-...', gtroff will still include the file, but grops will
416 not add any fonts to the generated output file that are listed in the
417 EPS file, even though the files are listed in the `download' file and
418 are available in the devps directory.
420 ----------------------------------------------------------------------
422 * I've configured groff for A4 paper, but gtroff still seems to think
423   that the length of a page (as returned by `\n(.p') is 11 inches.
425 This is intentional.  The PAGE option during configuration is used
426 only by grops.  For compatibility with ditroff, the default page
427 length in gtroff is always 11 inches.  The page length can be changed
428 with the `pl' request.
430 A convenient way to set paper dimensions is to use the -dpaper option
431 of groff, together with proper -P options for the postprocessor
432 (overriding the default).  For example, use the following for PS
433 output on A4 paper in landscape orientation:
435   groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps
437 See groff_tmac(5) for more information.
439 ----------------------------------------------------------------------
441 * When I print the output of groff -Tps, the output is always shifted
442   up by about 0.7 inches; I'm using 8.5x11 inch paper.
444 Make sure that the paper size is `letter'.  See groff_tmac(5).
446 ----------------------------------------------------------------------
448 * When I try to run gxditview, I get the error:
449   Error: Widget viewport has zero width and/or height
451 This error means you haven't correctly installed the application
452 defaults file, GXditview.ad; ``make install'' does this for you
453 automatically, so either you didn't do ``make install'', or you don't
454 have imake configured correctly.
456 ----------------------------------------------------------------------
458 * When I preview documents using -TX75 or -TX100, the layout is not
459   the same as when I print the document with -Tps: the line and page
460   breaks come in different places.
462 Use groff -X -Tps.
464 ----------------------------------------------------------------------
466 * When I try to print the output of groff -Tps, I get no output at all
467   from the printer, and the log file shows the error
468   %%[ error: undefined; offendingcommand: BP ]%%
469   I'm using TranScript spooling software.
471 This is a bug in the page reversal filter in early versions of
472 TranScript.  Change the `broken' parameter in
473 /usr/local/lib/groff/font/devps/DESC to 7.
475 ----------------------------------------------------------------------
477 * When I preview groff -Tps output using the Sun OpenWindows 2.0
478   pageview program, all the pages are displayed on top of each other.
480 This is a defect in pageview.  Change the `broken' parameter in
481 /usr/local/lib/groff/font/devps/DESC to 2.
483 ----------------------------------------------------------------------
485 * With groff -TX75, -TX100 or -X, I can only view the first page.
487 The left mouse button brings up a menu that allows you to view other
488 pages.
490 ----------------------------------------------------------------------
492 * When I print the output of groff -Tdvi, I just get a black dot in
493   upper left corner.
495 Some dvi drivers (notably early versions of xtex) do not correctly
496 handle dvi files that use a resolution different from that used by dvi
497 files produced by TeX.  Try getting a more up to date driver.
499 ----------------------------------------------------------------------
501 * How can I use groff with an old LaserJet printer that doesn't work
502   with groff -Tlj4?
504 You have at least 3 options:
506 - use groff -Tps with GNU Ghostscript;
508 - use groff -Tdvi with a TeX .dvi to Laserjet driver;
510 - use groff with the LaserJet driver in Chris Lewis' psroff package
511   (available for ftp from:
512   ftp.uunet.ca:/distrib/chris_lewis/psroff3.0pl17).
514 ----------------------------------------------------------------------
516 * Groff seems to generate level 3 Postscript, but my printer is only a
517   level 1 or 2 PostScript printer.
519 In fact groff generates only level 2 PostScript (or rather level 1
520 with some extensions; see grops(1) for more information how to disable
521 them).  The `%!PS-Adobe-3.0' comment at the beginning of PostScript
522 output generated by groff indicates that the file conforms to
523 version 3.0 of the Adobe Document Structuring Conventions.  The output
524 generated by groff should be printable on any PostScript printer.
525 Problems with groff output's not printing are most often caused by the
526 spooling system.
530 Platform-Dependent Macro Problems
531 =================================
535 * I get lots of errors when I use groff with the AT&T -mm macros.
537 Use the groff -mm macros.
539 ----------------------------------------------------------------------
541 * groff produces wrapper macros for `ms' and friends which call the
542   system's original macros.  Then, to get groff's ms macro package I
543   have to use `-mgs' instead `-ms'.  Can I avoid this?
545 Yes.  Configure and compile groff as usual, but install it with
547   make install tmac_wrap=""
549 Then no wrapper files are produced, and `-ms' will use groff's `ms'
550 macros.
552 ----------------------------------------------------------------------
554 * I'm having problems formatting HP-UX 9.0 man pages with groff -man.
556 Copy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and
557 either put `.cp 1' at the beginning or filter it (and any files it
558 .so's) through tmac/fixmacros.sed.
560 ----------------------------------------------------------------------
562 * I get errors using the Unix -ms macros with groff -e -C.
564 Apply this change:
566 *** /usr/lib/ms/ms.eqn  Tue Apr 25 02:14:28 1989
567 --- ms.eqn      Sun Nov 11 10:33:59 1990
568 ***************
569 *** 22,29 ****
570   ..
571   .     \" EN - end of a displayed equation
572   .de EN
573 ! .if !\a\\*(10\a\a .br
574   .di
575   .rm EZ
576   .nr ZN \\n(dn
577   .if \\n(ZN>0 .if \\n(YE=0 .LP
578 --- 22,30 ----
579   ..
580   .     \" EN - end of a displayed equation
581   .de EN
582 ! .if \\n(.k>0 .br
583   .di
584 + .ds 10 \\*(EZ\\
585   .rm EZ
586   .nr ZN \\n(dn
587   .if \\n(ZN>0 .if \\n(YE=0 .LP
589 ----------------------------------------------------------------------
591 * I'm having problems formatting Ultrix man pages with groff -man.
593 The Ultrix man pages use a number of non-standard extensions to the
594 Unix man macros.  One solution is to use the Ultrix -man macros with
595 groff.  Copy /usr/lib/tmac/tmac.an to
596 /usr/local/share/groff/site-tmac/an.tmac and apply the following patch
597 (from Frank Wortner):
599 *** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
600 --- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
601 ***************
602 *** 489,495 ****
603   .     \" make special case of shift out of italic
604   .de }S
605   .ds ]F
606 ! .if \\$12 .if !\\$5 .ds ]F \^
607   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
608   .el \\$3
609   .}f
610 --- 489,495 ----
611   .     \" make special case of shift out of italic
612   .de }S
613   .ds ]F
614 ! .if \\$12 .if !\\$5 .ds ]F\^
615   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
616   .el \\$3
617   .}f
619 Another possible solution is to install tmac/man.ultrix as
620 /usr/local/share/groff/site-tmac/man.local.
622 ----------------------------------------------------------------------
624 * On an SGI system, how can I make the man command use groff?
626 From David Hinds <dhinds@allegro.stanford.edu> (some of these steps
627 are unnecessary if you install with the `g' Makefile variable defined
628 as empty):
630 Create a script called 'eqn':
632  > #!/bin/sh
633  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
634  > geqn $*
636 and a script called 'neqn':
638  > #!/bin/sh
639  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
640  > geqn -Tascii $*
642 and do:
644  > ln -s gnroff nroff
646 and edit the end of the gnroff script to be:
648  > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
649  > exec groff -Wall -mtty-char $T $opts $rest
651 To get PostScript output from 'man -t', you also need to create a
652 'psroff' script similar to 'nroff'.  Here are the context diffs:
654 *** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
655 --- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
656 ***************
657 *** 1,8 ****
658   #!/bin/sh
659 ! # Emulate nroff with groff.
661   prog="$0"
662 ! T=-Tascii
663   opts=
665   for i
666 --- 1,8 ----
667   #!/bin/sh
668 ! # Emulate psroff with groff.
670   prog="$0"
671 ! T=-Tps
672   opts=
674   for i
675 ***************
676 *** 25,30 ****
677 --- 25,33 ----
678         -Tascii|-Tlatin1)
679                 T=$1
680                 ;;
681 +       -t)
682 +               # ignore -- default is send to stdout
683 +               ;;
684         -T*)
685                 # ignore other devices
686                 ;;
687 ***************
688 *** 49,53 ****
689   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
691   # This shell script is intended for use with man, so warnings are
692   # probably not wanted.  Also load nroff-style character definitions.
693 ! exec groff -Wall -mtty-char $T $opts $rest
694 --- 52,56 ----
695   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
697   # This shell script is intended for use with man, so warnings are
698 ! # probably not wanted.
699 ! exec groff -Wall $T $opts $rest
703 Compilation Problems
704 ====================
708 * Compilation dies with
710     y.tab.c: In function `int yyparse()':
711     y.tab.c: `size_t' undeclared in namespace `std'
713 * bison reports conflicts (either on stderr or in the `pic.output'
714   file) while processing `pic.y', and the produced pic binary doesn't
715   work at all.
717 You need bison version 1.875b or greater.  Alternatively, use yacc or
718 byacc.
720 ----------------------------------------------------------------------
722 * My compiler fails to build src/utils/indxbib/signal.c, giving
723   messages like
725     signal.c: cannot convert `int (*)(int)' to `void (*)(int)'
726     for argument `2' to `void (* signal(int, void (*)(int)))(int)'
728   I use a C++ compiler for compiling C programs.
730 The current version of the configure script doesn't handle C++ very
731 well if used as a substitute for a C compiler.  In this particular
732 case, it failed to recognize the proper return type of signal handlers.
733 An easy fix is to manually edit the file `src/include/config.h'
734 (created by configure), changing the line
736   #define RETSIGTYPE int
740   #define RETSIGTYPE void
742 Say `make clean' before restarting compilation.
744 ----------------------------------------------------------------------
746 * There are many empty `Makefile.dep' files.  Is this a bug?
748 No.  Real dependency files are created with a `make depend' call.
750 ----------------------------------------------------------------------
752 * On HP-UX, the compiler complains about missing symbol `alloca'.
756   export LDFLAGS=-lPW
758 before starting the configure script.
760 ----------------------------------------------------------------------
762 * The configure script fails on OS/390 (z/OS) Unix.
764 [This has been fixed in z/OS V1R3 (aka OS/390 R13).]
766 There is a bug in the Language Environment (LE) whereby the test
767 program for static destructors fails.  You will see the message
768 `configure: error: a working C++ compiler is required'
770 Applying PTF UQ42006 is supposed to fix this, but the test program is
771 still returning the wrong value (1).  To work around this problem, you
772 can comment out the following in the configure script (near line 2029).
773 This will effectively bypass the test (static constructors and
774 destructors do actually work properly):
776 #if { (eval echo "$as_me:2029: \"$ac_link\"") >&5
777 #  (eval $ac_link) 2>&5
778 #  ac_status=$?
779 #  echo "$as_me:2032: \$? = $ac_status" >&5
780 #  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
781 #  { (eval echo "$as_me:2034: \"$ac_try\"") >&5
782 #  (eval $ac_try) 2>&5
783 #  ac_status=$?
784 #  echo "$as_me:2037: \$? = $ac_status" >&5
785 #  (exit $ac_status); }; }; then
786 #  echo "$as_me:2039: result: yes" >&5
787 #echo "${ECHO_T}yes" >&6
788 #else
789 #  echo "$as_me: program exited with status $ac_status" >&5
790 #echo "$as_me: failed program was:" >&5
791 #cat conftest.$ac_ext >&5
792 #echo "$as_me:2045: result: no" >&5
793 #echo "${ECHO_T}no" >&6;{ { echo "$as_me:2046: error: a working C++ compiler is required" >&5
794 #echo "$as_me: error: a working C++ compiler is required" >&2;}
795 #   { (exit 1); exit 1; }; }
798 ----------------------------------------------------------------------
800 * I get errors when I try to compile groff with DEC C++.
802 Fix the declaration of write() in <unistd.h> so that the second
803 argument is a const char *.  Fix the declaration of open() in
804 <sys/file.h> so that the first argument is a const char *.
806 ----------------------------------------------------------------------
808 * On a host using Unix make (e.g. Solaris), if you are compiling for
809   multiple architectures by building in a subdirectory, the make stops
810   with a message like this:
812     make: Fatal error: Don't know how to make target `assert.o'
814   or like this:
816     make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory
818 This occurs because GNU make and Unix make handle VPATH differently,
819 and the groff build relies on GNU make's VPATH handling.
821 Use GNU make to work around the problem.  In Solaris 8, GNU make is
822 on the Software Companion CD and is installed as /opt/sfw/bin/gmake.
824 ----------------------------------------------------------------------
826 * On Ultrix, the make stops with the message
828     *** Error code 1
830     Stop.
832   for no apparent reason.
834 Use GNU make.
836 ----------------------------------------------------------------------
838 * I'm having problems compiling groff on 386BSD 0.1.
840 If you're using ash as /bin/sh, you'll need the following patch.
842 *** gendef.sh.org       Sun Jun 30 13:30:36 1991
843 --- gendef.sh   Sun Feb 28 10:23:49 1993
844 ***************
845 *** 3,9 ****
846   file=$1
847   shift
848   
849 ! defs="#define $1"
850   shift
851   for def
852   do
853 --- 3,10 ----
854   file=$1
855   shift
856   
857 ! x=$1
858 ! defs="#define $x"
859   shift
860   for def
861   do
863 You'll also need to change dirnamemax.c so that it doesn't use
864 pathconf().
866 ----------------------------------------------------------------------
868 * While compiling on Xenix, ranlib libgroff.a fails.
870 The system ranlib can't handle externals longer than 40 characters.
871 Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1
872 instead.
874 ----------------------------------------------------------------------
876 * I get errors when I try to compile groff with Sun C++ version 3 or
877   earlier.
879 Groff requires header files that are moderately compatible with AT&T
880 C++ and ANSI C.  With some versions of Sun C++, the supplied header
881 files need some of the following changes to meet this requirement:
882 <string.h> must declare the mem* functions, (just add `#include
883 <memory.h>' to <string.h>); the first argument to fopen and freopen
884 should be declared as `const char *'; the first argument to fread
885 should be declared as `void *'; the first argument to fwrite should be
886 declared as `const void *'; malloc should be declared to return
887 `void *'; in <alloca.h>, the declaration `extern "C" { void
888 *__builtin_alloca(int); }' should be added; in <sys/signal.h> the
889 return type and the second argument type of signal() should be changed
890 to be `void (*)(int)'.
892 You can either change them in place, or copy them to some other
893 directory and include that directory with a -I option.
895 ----------------------------------------------------------------------
897 * I get errors when I try to compile groff with Sun C++ version 5.0
898   or 5.1.
900 This is a known problem; see Sun bug #4301919.  As of this writing, no
901 patch is available.  Use GCC 2.95.2 or later instead.
903 ----------------------------------------------------------------------
905 * I get lots of `numeric overflow' error messages whenever I run
906   groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler.
908 Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level
909 Makefile.  If that doesn't solve the problem, define INT_MIN as
910 -INT_MAX in libgroff/lib.h.
912 ----------------------------------------------------------------------
914 * When compiling on MacOS X, groff compiles but does not run well,
915   especially `eqn', causing many `can't break line' messages.
917 Use  ./configure CXX=g++2  then make as usual.