* src/devices/xditview/TODO, NEWS: Updated.
[s-roff.git] / PROBLEMS
blob9ff014049e0005c9e8628201d8f08a735638ec58
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 (this is, add `-P-c' to groff's command
30      line options).
32   3. Append the following fragment to the `troffrc' file:
35 --- start ---
36 .if n \{\
37 .  nr _C \n(.C
38 .  cp 0
40 .  \" The following code sets a top-of-page trap to disable grotty's TTY
41 .  \" mode.  Since neither \X nor .output can be used before the first
42 .  \" page has started, we must use a trap.  To make it work with troff's
43 .  \" -o option, we wait until the first printed page.
45 .  de sgr@dummy
46 .  .
48 .  rn wh wh@old
50 .  \" The stand-alone version.  If no other trap is set, we can safely
51 .  \" insert the truncated vertical space caused by the trap (if any).
52 .  \" Otherwise we assume that the document's main macro package takes
53 .  \" care of that.  As soon as the trap has been executed, it is removed.
54 .  de1 no@sgr
55 .    if \\n[.P] \{\
56 .      if (\\n[.t] == \\n[.p]) \{\
57 .        rn wh@old wh
58 .        rm no@sgr
59 .        wh 0
60 .        sp \\n[.trunc]
61 .        nop \X'tty: sgr 0'
62 .        sp -1
63 .    \}\}
64 .  .
66 .  wh@old 0 no@sgr
68 .  \" The piggyback version to be appended to macros planted with the
69 .  \" modified `wh' request.
70 .  de1 no@sgr1
71 .    if \\n[.P] \{\
72 .      rn wh@old wh
73 .      ds no@sgr1
74 .      nop \X'tty: sgr 0'
75 .      sp -1
76 .    \}
77 .  .
79 .  \" We redefine the `wh' request so that `no@sgr1' is appended to
80 .  \" the trap macro.
81 .  de1 wh
82 .    am1 \\$2 sgr@dummy
83 .      no@sgr1
84 .    sgr@dummy
85 .    wh@old \\$1 \\$2
86 .  .
88 .  cp \n[_C]
89 .\}
90 --- end ---
92 ----------------------------------------------------------------------
94 * The UTF-8 output of grotty has strange characters for the minus, the
95   hyphen, and the right quote.  Why?
97 The used Unicode characters (U+2212 for the minus sign and U+2010 for
98 the hyphen) are the correct ones, but many programs can't search them
99 properly.  The same is true for the right quote (U+201D).  To map those
100 characters back to the ASCII characters, insert the following code
101 snippet into the `troffrc' configuration file:
103 .if '\*[.T]'utf8' \{\
104 .  char \- \N'45'
105 .  char  - \N'45'
106 .  char  ' \N'39'
110 ----------------------------------------------------------------------
112 * My document says that the current year is 19100, not 2000.
114 In groff, as in traditional troff, the yr number register yields the
115 year minus 1900.  Unfortunately, there is a longstanding bug in the
116 Troff User's Manual <http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz>,
117 which incorrectly claims that yr is the last two digits of the year.
118 This claim was never true of either Unix troff or of groff.
120 If your text looks like this:
122         .\" Wrong:
123         This document was formatted in 19\n(yr.
125 you can correct it as follows:
127         This document was formatted in \n[year].
129 or, if you want to be portable to older troff versions, as follows:
131         .nr y4 1900+\n(yr
132         This document was formatted in \n(y4.
134 ----------------------------------------------------------------------
136 * groff can't handle my troff document.  It works fine with AT&T
137   troff.
139 Read the section on incompatibilities in groff_diff(7).  Try using
140 the -C option.  Alternatively there's the sed script
141 `tmac/fixmacros.sed' which attempts to edit a file of macros so
142 that it can be used with groff without the -C flag.
144 ----------------------------------------------------------------------
146 * gtroff doesn't understand lines like `.ce99' with no space between
147   the name of the request or macro and the arguments.
149 gtroff requires a space between macro or request and its arguments
150 because it allows the use of long names for macros and requests.  You
151 can use the -C option or the `cp' request to put gtroff into a
152 compatibility mode in which it is not possible to use long names for
153 macros but in which no space is required between macros and their
154 arguments.  The use of compatibility mode is strongly discouraged.
156 ----------------------------------------------------------------------
158 * groff -Tdvi produces dvi files that use fonts at weird
159   magnifications.
161 Yes, it does.  You may need to compile fonts with Metafont at these
162 magnifications.  The CompileFonts script in the devdvi/generate
163 directory may help you to do this.  (It takes a *long* time on
164 slow computers.)
166 ----------------------------------------------------------------------
168 * Groff doesn't use the font names I'm used to.
170 Use the `ftr' request.  See groff_diff(7).
172 ----------------------------------------------------------------------
174 * pic output is not centered horizontally; pictures sometimes run off
175   the bottom of the page.
177 The macro package you are using is not supplying appropriate
178 definitions of PS and PE.  Give groff a -mpic option.
180 ----------------------------------------------------------------------
182 * gpic doesn't accept the syntax `chop N M' for chopping both ends of
183   a line.
185 The correct syntax is `chop N chop M'.
187 ----------------------------------------------------------------------
189 * With gpic -t, when I print `line ->; box' using a dvi to ps program,
190   the arrow head sticks through into the inside of the box.
192 The dvi to ps program should be modified to set the line cap and line
193 join parameters to 1 while printing tpic specials.
195 ----------------------------------------------------------------------
197 * gtroff gives warnings about lines like
198   .ev   \" a comment
199   (with a tab after the .ev).
201 A tab character cannot be used as a substitute for a space character
202 (except in one case: between a control character at the beginning of a
203 line and the name of a macro or request).  For example, in Unix troff
205   .ps   \" restore the previous point size
207 (with a tab after the .ps) does NOT restore the previous point-size;
208 instead it is silently ignored.  Since this is very likely to be
209 an error, gtroff can give a warning about it.  If you want to align
210 comments, you can do it like this:
212   .ev\"                         \" a comment
214 ----------------------------------------------------------------------
216 * I don't like the page headers and footers produced by groff -man.
218 There seem to be many different styles of page header and footer
219 produced by different versions of the -man macros.  You need to
220 put modified macros from tmac/an-old.tmac into man.local.  More
221 information is available in groff_man(7).
223 ----------------------------------------------------------------------
225 * Where can I get grap?
227 Ted Faber <faber@lunabase.org> has written a freely available grap:
229   http://www.lunabase.org/~faber/Vault/software/grap/
231 ----------------------------------------------------------------------
233 * The \n(st and \n(sb registers don't seem to work.  I thought \w set
234   them to the height and depth of its argument, but the registers
235   always seem to be 0.
237 \n(st and \n(sb aren't supposed to give the height and depth of the
238 string rather they give the minimum and maximum vertical displacement
239 of the baseline.  For example for \v'2u'\v'-3u', \n(st is 1 and
240 \n(sb is -2.  The height and depth of the string is available in
241 the \n[rst] and \n[rsb] registers: these are groff extensions.
243 ----------------------------------------------------------------------
245 * While formatting a manual page, groff complains about not being able
246   to break lines.  The problem seems to be caused by a line like:
247   .TP \w'label'+2
249 The -man documentation says that the default scale indicator for TP
250 macro is `n'.  The groff -man macros implement this correctly, so that
251 the argument is evaluated as if it were
253   \w'label'n+2n
255 The Unix -man macros don't implement this correctly (probably because
256 it's hard to do in Unix troff); they just append `n' to the entire
257 argument, so that it is evaluated as if it were
259   \w'label'u+2n
261 The solution is to fix the manual page:
263   .TP \w'label'u+2
265 ----------------------------------------------------------------------
267 * I'm having problems formatting man pages produced by the perl
268   wrapman script.
270 Some versions of wrapman have a superfluous blank line before the .TH
271 line.  This must be deleted.  Then either use groff -C, or apply the
272 following patch:
274 *** wrapman.~2~ Sun Jan 19 12:10:24 1992
275 --- wrapman     Tue Aug 10 02:06:41 1993
276 ***************
277 *** 35,41 ****
278       $line1 .= <IN> if $line1 =~ /eval/;
279       $line1 .= <IN> if $line1 =~ /argv/;
280       $line2 = <IN>;
281 !     next if $line2 eq "'di';\n";
282   
283       # Pull the old switcheroo.
284   
285 --- 35,41 ----
286       $line1 .= <IN> if $line1 =~ /eval/;
287       $line1 .= <IN> if $line1 =~ /argv/;
288       $line2 = <IN>;
289 !     next if $line2 eq "'di ';\n" || $line2 eq "'di';\n";
290   
291       # Pull the old switcheroo.
292   
293 ***************
294 *** 49,56 ****
295   
296       print OUT $line1;
297       print OUT <<EOF;
298 ! 'di';
299 ! 'ig00';
300   #
301   # $header
302   #
303 --- 49,58 ----
304   
305       print OUT $line1;
306       print OUT <<EOF;
307 ! 'di ';
308 ! 'ds 00 \\"';
309 ! 'eo ';
310 ! 'ig 00 ';
311   #
312   # $header
313   #
314 ***************
315 *** 72,85 ****
316   
317       # These next few lines are legal in both Perl and nroff.
318   
319 ! $null.00;                       # finish .ig
320    
321   'di           \\" finish diversion--previous line must be blank
322   .nr nl 0-1    \\" fake up transition to first page again
323   .nr % 0         \\" start at page 1
324 ! '; __END__ ##### From here on it's a standard manual page #####
325   .TH $PROG 1 "$month $mday, 19$year"
326 - .AT 3
327   .SH NAME
328   $prog \\- whatever
329   .SH SYNOPSIS
330 --- 74,87 ----
331   
332       # These next few lines are legal in both Perl and nroff.
333   
334 ! $null.00 ;                      # finish .ig
335 ! 'ec \\';
336    
337   'di           \\" finish diversion--previous line must be blank
338   .nr nl 0-1    \\" fake up transition to first page again
339   .nr % 0         \\" start at page 1
340 ! .\\"'; __END__ ##### From here on it's a standard manual page #####
341   .TH $PROG 1 "$month $mday, 19$year"
342   .SH NAME
343   $prog \\- whatever
344   .SH SYNOPSIS
346 ----------------------------------------------------------------------
348 * groff uses up an enormous amount of memory processing large files.
349   I'm using 386BSD 0.1.
351 386BSD includes an old version of g++, 1.39, which has a bug that
352 causes a major memory leak in gtroff.  Apply the following fix to g++
353 and recompile groff:
355 *** cplus-decl.c.~1~    Mon Aug  6 05:28:59 1990
356 --- cplus-decl.c        Wed Jun  5 08:55:04 1991
357 ***************
358 *** 7951,7961 ****
359   
360         /* At the end, call delete if that's what's requested.  */
361         if (TREE_GETS_DELETE (current_class_type))
362         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
363                                       get_identifier (OPERATOR_DELETE_FORMAT),
364 !                                     build_tree_list (NULL_TREE, integer_zero_node),
365                                       NULL_TREE, LOOKUP_NORMAL);
366         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
367         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
368         else
369         exprstmt = 0;
370 --- 7951,7961 ----
371   
372         /* At the end, call delete if that's what's requested.  */
373         if (TREE_GETS_DELETE (current_class_type))
374         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
375                                       get_identifier (OPERATOR_DELETE_FORMAT),
376 !                                     build_tree_list (NULL_TREE, current_class_decl),
377                                       NULL_TREE, LOOKUP_NORMAL);
378         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
379         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
380         else
381         exprstmt = 0;
385 Printing and Display Problems
386 =============================
390 * I'm having problems including PostScript illustrations (EPS) using
391   the PSPIC macro and/or \X'ps: import ...'.
393 A PostScript document must meet three requirements in order to be
394 included with the PSPIC macro: it must comply with the Adobe Document
395 Structuring Conventions; it must contain a BoundingBox line; it must
396 be `well-behaved'.  The BoundingBox line should be of the form:
398   %%BoundingBox: llx lly urx ury
400 where llx, lly, urx, ury are the coordinates of the lower left x,
401 lower left y, upper right x, upper right y of the bounding box of
402 marks on the page expressed as integers in the default PostScript
403 coordinate system (72 units per inch, origin at bottom left corner).
405 The most convenient program to get the bounding box of a document is
406 the `ps2epsi' script coming with GhostScript.
408 If you can't use this program, another useful tactic is to print out
409 the illustration by itself (you may need to add a `showpage' at the
410 end), and physically measure the bounding box.  For more detail on
411 these requirements, read the specification of Encapsulated PostScript
412 format.  (This is available from the Adobe file server; send a message
413 with a body of `help' to ps-file-server@adobe.com.)
415 If an EPS file to be included via \X'ps: import' does not start with
416 `%!PS-Adobe-...', gtroff still includes the file, but grops does
417 not add any fonts to the generated output file that are listed in the
418 EPS file, even though the files are listed in the `download' file and
419 are available in the devps directory.
421 ----------------------------------------------------------------------
423 * I've configured groff for A4 paper, but gtroff still seems to think
424   that the length of a page (as returned by `\n(.p') is 11 inches.
426 This is intentional.  The PAGE option during configuration is used
427 only by grops.  For compatibility with ditroff, the default page
428 length in gtroff is always 11 inches.  The page length can be changed
429 with the `pl' request.
431 A convenient way to set paper dimensions is to use the -dpaper option
432 of groff, together with proper -P options for the postprocessor
433 (overriding the default).  For example, use the following for PS
434 output on A4 paper in landscape orientation:
436   groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps
438 See groff_tmac(5) for more information.
440 ----------------------------------------------------------------------
442 * When I print the output of groff -Tps, the output is always shifted
443   up by about 0.7 inches; I'm using 8.5x11 inch paper.
445 Make sure that the paper size is `letter'.  See groff_tmac(5).
447 ----------------------------------------------------------------------
449 * When I try to run gxditview, I get the error:
450   Error: Widget viewport has zero width and/or height
452 This error means you haven't correctly installed the application
453 defaults file, GXditview.ad; `make install' does this for you
454 automatically, so either you didn't do `make install', or you haven't
455 passed a good `--appresdir=<DIR>' argument to groff's configure script.
457 See the X(7) man page for information how and where application resource
458 files have to be located.  Look for the XAPPLRESDIR and XUSERFILESEARCHPATH
459 environment variables.
461 ----------------------------------------------------------------------
463 * When I preview documents using -TX75 or -TX100, the layout is not
464   the same as when I print the document with -Tps: the line and page
465   breaks come in different places.
467 Use `groff -X -Tps'.
469 ----------------------------------------------------------------------
471 * When I try to print the output of groff -Tps, I get no output at all
472   from the printer, and the log file shows the error
473   %%[ error: undefined; offendingcommand: BP ]%%
474   I'm using TranScript spooling software.
476 This is a bug in the page reversal filter in early versions of
477 TranScript.  Change the `broken' parameter in
478 /usr/local/lib/groff/font/devps/DESC to 7.
480 ----------------------------------------------------------------------
482 * When I preview groff -Tps output using the Sun OpenWindows 2.0
483   pageview program, all the pages are displayed on top of each other.
485 This is a defect in pageview.  Change the `broken' parameter in
486 /usr/local/lib/groff/font/devps/DESC to 2.
488 ----------------------------------------------------------------------
490 * With groff -TX75, -TX100 or -X, I can only view the first page.
492 The left mouse button brings up a menu that allows you to view other
493 pages.
495 ----------------------------------------------------------------------
497 * When I print the output of groff -Tdvi, I just get a black dot in
498   upper left corner.
500 Some dvi drivers (notably early versions of xtex) do not correctly
501 handle dvi files that use a resolution different from that used by dvi
502 files produced by TeX.  Try getting a more up to date driver.
504 ----------------------------------------------------------------------
506 * How can I use groff with an old LaserJet printer that doesn't work
507   with groff -Tlj4?
509 You have at least 3 options:
511 - use groff -Tps with GNU Ghostscript;
513 - use groff -Tdvi with a TeX .dvi to Laserjet driver;
515 - use groff with the LaserJet driver in Chris Lewis' psroff package
516   (available for ftp from:
517   ftp.uunet.ca:/distrib/chris_lewis/psroff3.0pl17).
519 ----------------------------------------------------------------------
521 * Groff seems to generate level 3 Postscript, but my printer is only a
522   level 1 or 2 PostScript printer.
524 In fact groff generates only level 2 PostScript (or rather level 1
525 with some extensions; see grops(1) for more information how to disable
526 them).  The `%!PS-Adobe-3.0' comment at the beginning of PostScript
527 output generated by groff indicates that the file conforms to
528 version 3.0 of the Adobe Document Structuring Conventions.  The output
529 generated by groff should be printable on any PostScript printer.
530 Problems with groff output's not printing are most often caused by the
531 spooling system.
535 Platform-Dependent Macro Problems
536 =================================
540 * I get lots of errors when I use groff with the AT&T -mm macros.
542 Use the groff -mm macros.
544 ----------------------------------------------------------------------
546 * groff produces wrapper macros for `ms' and friends which call the
547   system's original macros.  Then, to get groff's ms macro package I
548   have to use `-mgs' instead `-ms'.  Can I avoid this?
550 Yes.  Configure and compile groff as usual, but install it with
552   make install tmac_wrap=""
554 Then no wrapper files are produced, and `-ms' uses groff's `ms'
555 macros.
557 ----------------------------------------------------------------------
559 * I'm having problems formatting HP-UX 9.0 man pages with groff -man.
561 Copy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and
562 either put `.cp 1' at the beginning or filter it (and any files it
563 .so's) through tmac/fixmacros.sed.
565 ----------------------------------------------------------------------
567 * I get errors using the Unix -ms macros with groff -e -C.
569 Apply this change:
571 *** /usr/lib/ms/ms.eqn  Tue Apr 25 02:14:28 1989
572 --- ms.eqn      Sun Nov 11 10:33:59 1990
573 ***************
574 *** 22,29 ****
575   ..
576   .     \" EN - end of a displayed equation
577   .de EN
578 ! .if !\a\\*(10\a\a .br
579   .di
580   .rm EZ
581   .nr ZN \\n(dn
582   .if \\n(ZN>0 .if \\n(YE=0 .LP
583 --- 22,30 ----
584   ..
585   .     \" EN - end of a displayed equation
586   .de EN
587 ! .if \\n(.k>0 .br
588   .di
589 + .ds 10 \\*(EZ\\
590   .rm EZ
591   .nr ZN \\n(dn
592   .if \\n(ZN>0 .if \\n(YE=0 .LP
594 ----------------------------------------------------------------------
596 * I'm having problems formatting Ultrix man pages with groff -man.
598 The Ultrix man pages use a number of non-standard extensions to the
599 Unix man macros.  One solution is to use the Ultrix -man macros with
600 groff.  Copy /usr/lib/tmac/tmac.an to
601 /usr/local/share/groff/site-tmac/an.tmac and apply the following patch
602 (from Frank Wortner):
604 *** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
605 --- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
606 ***************
607 *** 489,495 ****
608   .     \" make special case of shift out of italic
609   .de }S
610   .ds ]F
611 ! .if \\$12 .if !\\$5 .ds ]F \^
612   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
613   .el \\$3
614   .}f
615 --- 489,495 ----
616   .     \" make special case of shift out of italic
617   .de }S
618   .ds ]F
619 ! .if \\$12 .if !\\$5 .ds ]F\^
620   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
621   .el \\$3
622   .}f
624 Another possible solution is to install tmac/man.ultrix as
625 /usr/local/share/groff/site-tmac/man.local.
627 ----------------------------------------------------------------------
629 * On an SGI system, how can I make the man command use groff?
631 From David Hinds <dhinds@allegro.stanford.edu> (some of these steps
632 are unnecessary if you install with the `g' Makefile variable defined
633 as empty):
635 Create a script called 'eqn':
637  > #! /bin/sh
638  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
639  > geqn $*
641 and a script called 'neqn':
643  > #! /bin/sh
644  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
645  > geqn -Tascii $*
647 and do:
649  > ln -s gnroff nroff
651 and edit the end of the gnroff script to be:
653  > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
654  > exec groff -Wall -mtty-char $T $opts $rest
656 To get PostScript output from 'man -t', you also need to create a
657 'psroff' script similar to 'nroff'.  Here are the context diffs:
659 *** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
660 --- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
661 ***************
662 *** 1,8 ****
663   #! /bin/sh
664 ! # Emulate nroff with groff.
666   prog="$0"
667 ! T=-Tascii
668   opts=
670   for i
671 --- 1,8 ----
672   #! /bin/sh
673 ! # Emulate psroff with groff.
675   prog="$0"
676 ! T=-Tps
677   opts=
679   for i
680 ***************
681 *** 25,30 ****
682 --- 25,33 ----
683         -Tascii|-Tlatin1)
684                 T=$1
685                 ;;
686 +       -t)
687 +               # ignore -- default is send to stdout
688 +               ;;
689         -T*)
690                 # ignore other devices
691                 ;;
692 ***************
693 *** 49,53 ****
694   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
696   # This shell script is intended for use with man, so warnings are
697   # probably not wanted.  Also load nroff-style character definitions.
698 ! exec groff -Wall -mtty-char $T $opts $rest
699 --- 52,56 ----
700   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
702   # This shell script is intended for use with man, so warnings are
703 ! # probably not wanted.
704 ! exec groff -Wall $T $opts $rest
708 Compilation Problems
709 ====================
713 * Compilation dies with
715     y.tab.c: In function `int yyparse()':
716     y.tab.c: `size_t' undeclared in namespace `std'
718 * bison reports conflicts (either on stderr or in the `pic.output'
719   file) while processing `pic.y', and the produced pic binary doesn't
720   work at all.
722 You need bison version 1.875b or greater.  Alternatively, use yacc or
723 byacc.
725 ----------------------------------------------------------------------
727 * There are many empty `Makefile.dep' files.  Is this a bug?
729 No.  Real dependency files are created with a `make depend' call.
731 ----------------------------------------------------------------------
733 * On HP-UX, the compiler complains about missing symbol `alloca'.
737   export LDFLAGS=-lPW
739 before starting the configure script.
741 ----------------------------------------------------------------------
743 * The configure script fails on OS/390 (z/OS) Unix.
745 [This has been fixed in z/OS V1R3 (aka OS/390 R13).]
747 There is a bug in the Language Environment (LE) whereby the test
748 program for static destructors fails.  You see the message
749 `configure: error: a working C++ compiler is required'.
751 Applying PTF UQ42006 is supposed to fix this, but the test program is
752 still returning the wrong value (1).  To work around this problem, you
753 can comment out the following in the configure script (near line 2029).
754 This effectively bypasses the test (static constructors and
755 destructors do actually work properly):
757 #if { (eval echo "$as_me:2029: \"$ac_link\"") >&5
758 #  (eval $ac_link) 2>&5
759 #  ac_status=$?
760 #  echo "$as_me:2032: \$? = $ac_status" >&5
761 #  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
762 #  { (eval echo "$as_me:2034: \"$ac_try\"") >&5
763 #  (eval $ac_try) 2>&5
764 #  ac_status=$?
765 #  echo "$as_me:2037: \$? = $ac_status" >&5
766 #  (exit $ac_status); }; }; then
767 #  echo "$as_me:2039: result: yes" >&5
768 #echo "${ECHO_T}yes" >&6
769 #else
770 #  echo "$as_me: program exited with status $ac_status" >&5
771 #echo "$as_me: failed program was:" >&5
772 #cat conftest.$ac_ext >&5
773 #echo "$as_me:2045: result: no" >&5
774 #echo "${ECHO_T}no" >&6;{ { echo "$as_me:2046: error: a working C++ compiler is required" >&5
775 #echo "$as_me: error: a working C++ compiler is required" >&2;}
776 #   { (exit 1); exit 1; }; }
779 ----------------------------------------------------------------------
781 * I get errors when I try to compile groff with DEC C++.
783 Fix the declaration of write() in <unistd.h> so that the second
784 argument is a const char *.  Fix the declaration of open() in
785 <sys/file.h> so that the first argument is a const char *.
787 ----------------------------------------------------------------------
789 * On a host using Unix make (e.g. Solaris), if you are compiling for
790   multiple architectures by building in a subdirectory, the make stops
791   with a message like this:
793     make: Fatal error: Don't know how to make target `assert.o'
795   or like this:
797     make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory
799 This occurs because GNU make and Unix make handle VPATH differently,
800 and the groff build relies on GNU make's VPATH handling.
802 Use GNU make <http://www.gnu.org/software/make/> to work around this.
803 In Solaris 8 and 9, GNU make is on the Software Companion CD in
804 package SFWgmake and is installed as /opt/sfw/bin/gmake.  Prebuilt
805 versions of GNU make for Solaris are also available from
806 sunfreeware.com.
808 ----------------------------------------------------------------------
810 * On Ultrix, the make program stops with the message
812     *** Error code 1
814     Stop.
816   for no apparent reason.
818 Use GNU make.
820 ----------------------------------------------------------------------
822 * I'm having problems compiling groff on 386BSD 0.1.
824 If you're using ash as /bin/sh, you'll need the following patch.
826 *** gendef.sh.org       Sun Jun 30 13:30:36 1991
827 --- gendef.sh   Sun Feb 28 10:23:49 1993
828 ***************
829 *** 3,9 ****
830   file=$1
831   shift
832   
833 ! defs="#define $1"
834   shift
835   for def
836   do
837 --- 3,10 ----
838   file=$1
839   shift
840   
841 ! x=$1
842 ! defs="#define $x"
843   shift
844   for def
845   do
847 You'll also need to change dirnamemax.c so that it doesn't use
848 pathconf().
850 ----------------------------------------------------------------------
852 * While compiling on Xenix, ranlib libgroff.a fails.
854 The system ranlib can't handle externals longer than 40 characters.
855 Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1
856 instead.
858 ----------------------------------------------------------------------
860 * I get errors when I try to compile groff with Sun C++ version 3 or
861   earlier.
863 Groff requires header files that are moderately compatible with AT&T
864 C++ and ANSI C.  With some versions of Sun C++, the supplied header
865 files need some of the following changes to meet this requirement:
866 <string.h> must declare the mem* functions, (just add `#include
867 <memory.h>' to <string.h>); the first argument to fopen and freopen
868 should be declared as `const char *'; the first argument to fread
869 should be declared as `void *'; the first argument to fwrite should be
870 declared as `const void *'; malloc should be declared to return
871 `void *'; in <alloca.h>, the declaration `extern "C" { void
872 *__builtin_alloca(int); }' should be added; in <sys/signal.h> the
873 return type and the second argument type of signal() should be changed
874 to be `void (*)(int)'.
876 You can either change them in place, or copy them to some other
877 directory and include that directory with a -I option.
879 ----------------------------------------------------------------------
881 * I get errors when I try to compile groff with Forte Development 6
882   or 6u1, or Sun C++ version 5.0 through 5.2.
884 This is a known problem; see Sun bug #4301919.  See Sun patches
885 109482, 109490, 109508, and 109509 for fixes.
887 ----------------------------------------------------------------------
889 * I get warnings from the Sun linker while using gcc 3.4.0:
891   ld: warning: relocation error: R_SPARC_UA32:
892       file groff/src/libs/libgroff/libgroff.a(getopt.o): symbol optarg:
893       external symbolic relocation against non-allocatable
894       section .debug_info; cannot be processed at runtime:
895       relocation ignored
897 This seems to be a known problem (Sun bugs #4910101 and #4910810,
898 filed in September 2003; gcc bug #15599, filed May 2004) without a
899 public fix as of this writing.  A work-around is to use option
900 `-gstabs+' instead of `-g' (and a high probability that the output is
901 only debuggable with gdb but not with Sun's debuggers).
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.