* tmac/groff_tmac.man: Moved to...
[s-roff.git] / PROBLEMS
blobc9a541fe9187dcb29d4ee48ae31a4f17cf2c3709
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 * My document says that the current year is 19100, not 2000.
16 In groff, as in traditional troff, the yr number register yields the
17 year minus 1900.  Unfortunately, there is a longstanding bug in the
18 Troff User's Manual <http://cm.bell-labs.com/cm/cs/cstr/54.ps.gz>,
19 which incorrectly claims that yr is the last two digits of the year.
20 This claim was never true of either Unix troff or of groff.
22 If your text looks like this:
24         .\" Wrong:
25         This document was formatted in 19\n(yr.
27 you can correct it as follows:
29         This document was formatted in \n[year].
31 or, if you want to be portable to older troff versions, as follows:
33         .nr y4 1900+\n(yr
34         This document was formatted in \n(y4.
36 ----------------------------------------------------------------------
38 * groff can't handle my troff document.  It works fine with AT&T
39   troff.
41 Read the section on incompatibilities in gtroff(1).  Try using the -C
42 option.  Alternatively there's the sed script `tmac/fixmacros.sed'
43 which will attempt to edit a file of macros so that it can be used
44 with groff without the -C flag.
46 ----------------------------------------------------------------------
48 * gtroff doesn't understand lines like `.ce99' with no space between
49   the name of the request or macro and the arguments.
51 gtroff requires a space between macro or request and its arguments
52 because it allows the use of long names for macros and requests.  You
53 can use the -C option or the `cp' request to put gtroff into a
54 compatibility mode in which it is not possible to use long names for
55 macros but in which no space is required between macros and their
56 arguments.  The use of compatibility mode is strongly discouraged.
58 ----------------------------------------------------------------------
60 * groff -Tdvi produces dvi files that use fonts at weird
61   magnifications.
63 Yes, it does.  You may need to compile fonts with Metafont at these
64 magnifications.  The CompileFonts script in the devdvi/generate
65 directory may help you to do this.  (It will take a *long* time on
66 slow computers.)
68 ----------------------------------------------------------------------
70 * Groff doesn't use the font names I'm used to.
72 Use the `ftr' request.  See (g)troff(1).
74 ----------------------------------------------------------------------
76 * pic output is not centered horizontally; pictures sometimes run off
77   the bottom of the page.
79 The macro package you are using is not supplying appropriate
80 definitions of PS and PE.  Give groff a -mpic option.
82 ----------------------------------------------------------------------
84 * gpic doesn't accept the syntax `chop N M' for chopping both ends of
85   a line.
87 The correct syntax is `chop N chop M'.
89 ----------------------------------------------------------------------
91 * With gpic -t, when I print `line ->; box' using a dvi to ps program,
92   the arrow head sticks through into the inside of the box.
94 The dvi to ps program should be modified to set the line cap and line
95 join parameters to 1 while printing tpic specials.
97 ----------------------------------------------------------------------
99 * gtroff gives warnings about lines like
100   .ev   \" a comment
101   (with a tab after the .ev).
103 A tab character cannot be used as a substitute for a space character
104 (except in one case: between a control character at the beginning of a
105 line and the name of a macro or request).  For example, in Unix troff
107   .ps   \" restore the previous point size
109 (with a tab after the .ps) will NOT restore the previous point-size;
110 instead it will be silently ignored.  Since this is very likely to be
111 an error, gtroff can give a warning about it.  If you want to align
112 comments, you can do it like this:
114   .ev\"                         \" a comment
116 ----------------------------------------------------------------------
118 * I don't like the page headers and footers produced by groff -man.
120 There seem to be many different styles of page header and footer
121 produced by different versions of the -man macros.  You will need to
122 modify tmac/an-old.tmac to suit your personal taste.  For example, if
123 you want the center of the page header to say
125   System Programmer's Manual
127 you will need to change the line
129   .el .ds an-extra3 \"System Programmer's Manual
133   .el .ds an-extra3 System Programmer's Manual
135 ----------------------------------------------------------------------
137 * Where can I get grap?
139 Ted Faber <faber@lunabase.org> has written a freely available grap:
141   http://www.lunabase.org/~faber/Vault/software/grap/
143 ----------------------------------------------------------------------
145 * The \n(st and \n(sb registers don't seem to work.  I thought \w set
146   them to the height and depth of its argument, but the registers
147   always seem to be 0.
149 \n(st and \n(sb aren't supposed to give the height and depth of the
150 string rather they give the minimum and maximum vertical displacement
151 of the baseline.  For example for \v'2u'\v'-3u', \n(st will be 1 and
152 \n(sb will be -2.  The height and depth of the string is available in
153 the \n[rst] and \n[rsb] registers: these are groff extensions.
155 ----------------------------------------------------------------------
157 * While formatting a manual page, groff complains about not being able
158   to break lines.  The problem seems to be caused by a line like:
159   .TP \w'label'+2
161 The -man documentation says that the default scale indicator for TP
162 macro is `n'.  The groff -man macros implement this correctly, so that
163 the argument will be evaluated as if it were
165   \w'label'n+2n
167 The Unix -man macros don't implement this correctly (probably because
168 it's hard to do in Unix troff); they just append `n' to the entire
169 argument, so that it will be evaluated as if it were
171   \w'label'u+2n
173 The solution is to fix the manual page:
175   .TP \w'label'u+2
177 ----------------------------------------------------------------------
179 * I'm having problems formatting man pages produced by the perl
180   wrapman script.
182 Some versions of wrapman have a superfluous blank line before the .TH
183 line.  This must be deleted.  Then either use groff -C, or apply the
184 following patch:
186 *** wrapman.~2~ Sun Jan 19 12:10:24 1992
187 --- wrapman     Tue Aug 10 02:06:41 1993
188 ***************
189 *** 35,41 ****
190       $line1 .= <IN> if $line1 =~ /eval/;
191       $line1 .= <IN> if $line1 =~ /argv/;
192       $line2 = <IN>;
193 !     next if $line2 eq "'di';\n";
194   
195       # Pull the old switcheroo.
196   
197 --- 35,41 ----
198       $line1 .= <IN> if $line1 =~ /eval/;
199       $line1 .= <IN> if $line1 =~ /argv/;
200       $line2 = <IN>;
201 !     next if $line2 eq "'di ';\n" || $line2 eq "'di';\n";
202   
203       # Pull the old switcheroo.
204   
205 ***************
206 *** 49,56 ****
207   
208       print OUT $line1;
209       print OUT <<EOF;
210 ! 'di';
211 ! 'ig00';
212   #
213   # $header
214   #
215 --- 49,58 ----
216   
217       print OUT $line1;
218       print OUT <<EOF;
219 ! 'di ';
220 ! 'ds 00 \\"';
221 ! 'eo ';
222 ! 'ig 00 ';
223   #
224   # $header
225   #
226 ***************
227 *** 72,85 ****
228   
229       # These next few lines are legal in both Perl and nroff.
230   
231 ! $null.00;                       # finish .ig
232    
233   'di           \\" finish diversion--previous line must be blank
234   .nr nl 0-1    \\" fake up transition to first page again
235   .nr % 0         \\" start at page 1
236 ! '; __END__ ##### From here on it's a standard manual page #####
237   .TH $PROG 1 "$month $mday, 19$year"
238 - .AT 3
239   .SH NAME
240   $prog \\- whatever
241   .SH SYNOPSIS
242 --- 74,87 ----
243   
244       # These next few lines are legal in both Perl and nroff.
245   
246 ! $null.00 ;                      # finish .ig
247 ! 'ec \\';
248    
249   'di           \\" finish diversion--previous line must be blank
250   .nr nl 0-1    \\" fake up transition to first page again
251   .nr % 0         \\" start at page 1
252 ! .\\"'; __END__ ##### From here on it's a standard manual page #####
253   .TH $PROG 1 "$month $mday, 19$year"
254   .SH NAME
255   $prog \\- whatever
256   .SH SYNOPSIS
258 ----------------------------------------------------------------------
260 * groff uses up an enormous amount of memory processing large files.
261   I'm using 386BSD 0.1.
263 386BSD includes an old version of g++, 1.39, which has a bug that
264 causes a major memory leak in gtroff.  Apply the following fix to g++
265 and recompile groff:
267 *** cplus-decl.c.~1~    Mon Aug  6 05:28:59 1990
268 --- cplus-decl.c        Wed Jun  5 08:55:04 1991
269 ***************
270 *** 7951,7961 ****
271   
272         /* At the end, call delete if that's what's requested.  */
273         if (TREE_GETS_DELETE (current_class_type))
274         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
275                                       get_identifier (OPERATOR_DELETE_FORMAT),
276 !                                     build_tree_list (NULL_TREE, integer_zero_node),
277                                       NULL_TREE, LOOKUP_NORMAL);
278         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
279         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
280         else
281         exprstmt = 0;
282 --- 7951,7961 ----
283   
284         /* At the end, call delete if that's what's requested.  */
285         if (TREE_GETS_DELETE (current_class_type))
286         exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node),
287                                       get_identifier (OPERATOR_DELETE_FORMAT),
288 !                                     build_tree_list (NULL_TREE, current_class_decl),
289                                       NULL_TREE, LOOKUP_NORMAL);
290         else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type))
291         exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0);
292         else
293         exprstmt = 0;
297 Printing and Display Problems
298 =============================
302 * I'm having problems including PostScript illustrations (EPS) using
303   the PSPIC macro and/or \X'ps: import ...'.
305 A PostScript document must meet three requirements in order to be
306 included with the PSPIC macro: it must comply with the Adobe Document
307 Structuring Conventions; it must contain a BoundingBox line; it must
308 be ``well-behaved''.  The BoundingBox line should be of the form:
310   %%BoundingBox: llx lly urx ury
312 where llx, lly, urx, ury are the coordinates of the lower left x,
313 lower left y, upper right x, upper right y of the bounding box of
314 marks on the page expressed as integers in the default PostScript
315 coordinate system (72 units per inch, origin at bottom left corner).
317 The most convenient program to get the bounding box of a document is
318 the `ps2epsi' script coming with GhostScript.
320 If you can't use this program, another useful tactic is to print out
321 the illustration by itself (you may need to add a `showpage' at the
322 end), and physically measure the bounding box.  For more detail on
323 these requirements, read the specification of Encapsulated PostScript
324 format.  (This is available from the Adobe file server; send a message
325 with a body of `help' to ps-file-server@adobe.com.)
327 If an EPS file to be included via \X'ps: import' does not start with
328 %!PS-Adobe-...', gtroff will still include the file, but grops will
329 not add any fonts to the generated output file that are listed in the
330 EPS file, even though the files are listed in the `download' file and
331 are available in the devps directory.
333 ----------------------------------------------------------------------
335 * I've configured groff for A4 paper, but gtroff still seems to think
336   that the length of a page (as returned by `\n(.p') is 11 inches.
338 This is intentional.  The PAGE option is used only by grops.  For
339 compatibility with ditroff, the default page length in gtroff is
340 always 11 inches.  The page length can be changed with the `pl'
341 request.
343 ----------------------------------------------------------------------
345 * When I print the output groff -Tps, the output is always shifted up
346   by about 0.7 inches; I'm using 8.5x11 inch paper.
348 Make sure that PAGE is defined to be `letter' in the top-level
349 Makefile.
351 ----------------------------------------------------------------------
353 * When I try to run gxditview, I get the error:
354   Error: Widget viewport has zero width and/or height
356 This error means you haven't correctly installed the application
357 defaults file, GXditview.ad; ``make install'' does this for you
358 automatically, so either you didn't do ``make install'', or you don't
359 have imake configured correctly.
361 ----------------------------------------------------------------------
363 * When I preview documents using -TX75 or -TX100, the layout is not
364   the same as when I print the document with -Tps: the line and page
365   breaks come in different places.
367 Use groff -X -Tps.
369 ----------------------------------------------------------------------
371 * When I try to print the output of groff -Tps, I get no output at all
372   from the printer, and the log file shows the error
373   %%[ error: undefined; offendingcommand: BP ]%%
374   I'm using TranScript spooling software.
376 This is a bug in the page reversal filter in early versions of
377 TranScript.  Change the `broken' parameter in
378 /usr/local/lib/groff/font/devps/DESC to 7.
380 ----------------------------------------------------------------------
382 * When I preview groff -Tps output using the Sun OpenWindows 2.0
383   pageview program, all the pages are displayed on top of each other.
385 This is a defect in pageview.  Change the `broken' parameter in
386 /usr/local/lib/groff/font/devps/DESC to 2.
388 ----------------------------------------------------------------------
390 * With groff -TX75, -TX100 or -X, I can only view the first page.
392 The left mouse button brings up a menu that allows you to view other
393 pages.
395 ----------------------------------------------------------------------
397 * When I print the output of groff -Tdvi, I just get a black dot in
398   upper left corner.
400 Some dvi drivers (notably early versions of xtex) do not correctly
401 handle dvi files that use a resolution different from that used by dvi
402 files produced by TeX.  Try getting a more up to date driver.
404 ----------------------------------------------------------------------
406 * How can I use groff with an old LaserJet printer that doesn't work
407   with groff -Tlj4?
409 You have at least 3 options:
411 - use groff -Tps with GNU Ghostscript;
413 - use groff -Tdvi with a TeX .dvi to Laserjet driver;
415 - use groff with the LaserJet driver in Chris Lewis' psroff package
416   (available for ftp from:
417   ftp.uunet.ca:/distrib/chris_lewis/psroff3.0pl17).
419 ----------------------------------------------------------------------
421 * Groff seems to generate level 3 Postscript, but my printer is only a
422   level 1 or 2 PostScript printer.
424 In fact groff generates only level 1 PostScript.  The `%!PS-Adobe-3.0'
425 comment at the beginning of PostScript output generated by groff
426 indicates that the file conforms to version 3.0 of the Adobe Document
427 Structuring Conventions.  The output generated by groff should be
428 printable on any PostScript printer.  Problems with groff output's not
429 printing are most often caused by the spooling system.
433 Platform-Dependent Macro Problems
434 =================================
438 * I get lots of errors when I use groff with the AT&T -mm macros.
440 Use the groff -mm macros.
442 ----------------------------------------------------------------------
444 * groff produces wrapper macros for `ms' and friends which call the
445   system's original macros.  Then, to get groff's ms macro package I
446   have to use `-mgs' instead `-ms'.  Can I avoid this?
448 Yes.  Configure and compile groff as usual, but install it with
450   make install tmac_wrap=""
452 Then no wrapper files are produced, and `-ms' will use groff's `ms'
453 macros.
455 ----------------------------------------------------------------------
457 * I'm having problems formatting HP-UX 9.0 man pages with groff -man.
459 Copy HP's tmac.an into /usr/local/share/groff/site-tmac/an.tmac, and
460 either put `.cp 1' at the beginning or filter it (and any files it
461 .so's) through tmac/fixmacros.sed.
463 ----------------------------------------------------------------------
465 * I get errors using the Unix -ms macros with groff -e -C.
467 Apply this change:
469 *** /usr/lib/ms/ms.eqn  Tue Apr 25 02:14:28 1989
470 --- ms.eqn      Sun Nov 11 10:33:59 1990
471 ***************
472 *** 22,29 ****
473   ..
474   .     \" EN - end of a displayed equation
475   .de EN
476 ! .if !\a\\*(10\a\a .br
477   .di
478   .rm EZ
479   .nr ZN \\n(dn
480   .if \\n(ZN>0 .if \\n(YE=0 .LP
481 --- 22,30 ----
482   ..
483   .     \" EN - end of a displayed equation
484   .de EN
485 ! .if \\n(.k>0 .br
486   .di
487 + .ds 10 \\*(EZ\\
488   .rm EZ
489   .nr ZN \\n(dn
490   .if \\n(ZN>0 .if \\n(YE=0 .LP
492 ----------------------------------------------------------------------
494 * I'm having problems formatting Ultrix man pages with groff -man.
496 The Ultrix man pages use a number of non-standard extensions to the
497 Unix man macros.  One solution is to use the Ultrix -man macros with
498 groff.  Copy /usr/lib/tmac/tmac.an to
499 /usr/local/share/groff/site-tmac/an.tmac and apply the following patch
500 (from Frank Wortner):
502 *** /usr/local/lib/groff/tmac/tmac.an     Wed Sep  9 12:29:28 1992
503 --- /usr/lib/tmac/tmac.an       Fri Jul 24 19:58:19 1992
504 ***************
505 *** 489,495 ****
506   .     \" make special case of shift out of italic
507   .de }S
508   .ds ]F
509 ! .if \\$12 .if !\\$5 .ds ]F \^
510   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
511   .el \\$3
512   .}f
513 --- 489,495 ----
514   .     \" make special case of shift out of italic
515   .de }S
516   .ds ]F
517 ! .if \\$12 .if !\\$5 .ds ]F\^
518   .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
519   .el \\$3
520   .}f
522 Another possible solution is to install tmac/man.ultrix as
523 /usr/local/share/groff/site-tmac/man.local.
525 ----------------------------------------------------------------------
527 * On an SGI system, how can I make the man command use groff?
529 From David Hinds <dhinds@allegro.stanford.edu> (some of these steps
530 are unnecessary if you install with the `g' Makefile variable defined
531 as empty):
533 Create a script called 'eqn':
535  > #!/bin/sh
536  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
537  > geqn $*
539 and a script called 'neqn':
541  > #!/bin/sh
542  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
543  > geqn -Tascii $*
545 and do:
547  > ln -s gnroff nroff
549 and edit the end of the gnroff script to be:
551  > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
552  > exec groff -Wall -mtty-char $T $opts $rest
554 To get PostScript output from 'man -t', you also need to create a
555 'psroff' script similar to 'nroff'.  Here are the context diffs:
557 *** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
558 --- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
559 ***************
560 *** 1,8 ****
561   #!/bin/sh
562 ! # Emulate nroff with groff.
564   prog="$0"
565 ! T=-Tascii
566   opts=
568   for i
569 --- 1,8 ----
570   #!/bin/sh
571 ! # Emulate psroff with groff.
573   prog="$0"
574 ! T=-Tps
575   opts=
577   for i
578 ***************
579 *** 25,30 ****
580 --- 25,33 ----
581         -Tascii|-Tlatin1)
582                 T=$1
583                 ;;
584 +       -t)
585 +               # ignore -- default is send to stdout
586 +               ;;
587         -T*)
588                 # ignore other devices
589                 ;;
590 ***************
591 *** 49,53 ****
592   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
594   # This shell script is intended for use with man, so warnings are
595   # probably not wanted.  Also load nroff-style character definitions.
596 ! exec groff -Wall -mtty-char $T $opts $rest
597 --- 52,56 ----
598   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
600   # This shell script is intended for use with man, so warnings are
601 ! # probably not wanted.
602 ! exec groff -Wall $T $opts $rest
606 Compilation Problems
607 ====================
611 * Compilation dies with
613     y.tab.c: In function `int yyparse()':
614     y.tab.c: `size_t' undeclared in namespace `std'
616 This is a bug in bison 1.32.  Don't use this version.  1.28 or 1.33 works
617 fine.  Alternatively, use yacc or byacc.
619 ----------------------------------------------------------------------
621 * There are many empty `Makefile.dep' files.  Is this a bug?
623 No.  Real dependency files are created with a `make depend' call.
625 ----------------------------------------------------------------------
627 * On HP-UX, the compiler complains about missing symbol `alloca'.
631   export LDFLAGS=-lPW
633 before starting the configure script.
635 ----------------------------------------------------------------------
637 * The configure script fails on OS/390 Unix.
639 There is a bug in the Language Environment (LE) whereby the test
640 program for static destructors fails.  You will see the message
641 `configure: error: a working C++ compiler is required'
643 Applying PTF UQ42006 is supposed to fix this, but the test program is
644 still returning the wrong value (1).  To work around this problem, you
645 can comment out the following in the configure script (near line 2029).
646 This will effectively bypass the test (static constructors and
647 destructors do actually work properly):
649 #if { (eval echo "$as_me:2029: \"$ac_link\"") >&5
650 #  (eval $ac_link) 2>&5
651 #  ac_status=$?
652 #  echo "$as_me:2032: \$? = $ac_status" >&5
653 #  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
654 #  { (eval echo "$as_me:2034: \"$ac_try\"") >&5
655 #  (eval $ac_try) 2>&5
656 #  ac_status=$?
657 #  echo "$as_me:2037: \$? = $ac_status" >&5
658 #  (exit $ac_status); }; }; then
659 #  echo "$as_me:2039: result: yes" >&5
660 #echo "${ECHO_T}yes" >&6
661 #else
662 #  echo "$as_me: program exited with status $ac_status" >&5
663 #echo "$as_me: failed program was:" >&5
664 #cat conftest.$ac_ext >&5
665 #echo "$as_me:2045: result: no" >&5
666 #echo "${ECHO_T}no" >&6;{ { echo "$as_me:2046: error: a working C++ compiler is required" >&5
667 #echo "$as_me: error: a working C++ compiler is required" >&2;}
668 #   { (exit 1); exit 1; }; }
671 ----------------------------------------------------------------------
673 * I get errors when I try to compile groff with DEC C++.
675 Fix the declaration of write() in <unistd.h> so that the second
676 argument is a const char *.  Fix the declaration of open() in
677 <sys/file.h> so that the first argument is a const char *.
679 ----------------------------------------------------------------------
681 * On a host using Unix make (e.g. Solaris), if you are compiling for
682   multiple architectures by building in a subdirectory, the make stops
683   with a message like this:
685     make: Fatal error: Don't know how to make target `assert.o'
687   or like this:
689     make: Fatal error: Can't find /u/src/groff/src/include/Makefile.sub': No such file or directory
691 This occurs because GNU make and Unix make handle VPATH differently,
692 and the groff build relies on GNU make's VPATH handling.
694 Use GNU make to work around the problem.  In Solaris 8, GNU make is
695 on the Software Companion CD and is installed as /opt/sfw/bin/gmake.
697 ----------------------------------------------------------------------
699 * On Ultrix, the make stops with the message
701     *** Error code 1
703     Stop.
705   for no apparent reason.
707 Use GNU make.
709 ----------------------------------------------------------------------
711 * I'm having problems compiling groff on 386BSD 0.1.
713 If you're using ash as /bin/sh, you'll need the following patch.
715 *** gendef.sh.org       Sun Jun 30 13:30:36 1991
716 --- gendef.sh   Sun Feb 28 10:23:49 1993
717 ***************
718 *** 3,9 ****
719   file=$1
720   shift
721   
722 ! defs="#define $1"
723   shift
724   for def
725   do
726 --- 3,10 ----
727   file=$1
728   shift
729   
730 ! x=$1
731 ! defs="#define $x"
732   shift
733   for def
734   do
736 You'll also need to change dirnamemax.c so that it doesn't use
737 pathconf().
739 ----------------------------------------------------------------------
741 * While compiling on Xenix, ranlib libgroff.a fails.
743 The system ranlib can't handle externals longer than 40 characters.
744 Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1
745 instead.
747 ----------------------------------------------------------------------
749 * I get errors when I try to compile groff with Sun C++ version 3 or
750   earlier.
752 Groff requires header files that are moderately compatible with AT&T
753 C++ and ANSI C.  With some versions of Sun C++, the supplied header
754 files need some of the following changes to meet this requirement:
755 <string.h> must declare the mem* functions, (just add `#include
756 <memory.h>' to <string.h>); the first argument to fopen and freopen
757 should be declared as `const char *'; the first argument to fread
758 should be declared as `void *'; the first argument to fwrite should be
759 declared as `const void *'; malloc should be declared to return
760 `void *'; in <alloca.h>, the declaration `extern "C" { void
761 *__builtin_alloca(int); }' should be added; in <sys/signal.h> the
762 return type and the second argument type of signal() should be changed
763 to be `void (*)(int)'.
765 You can either change them in place, or copy them to some other
766 directory and include that directory with a -I option.
768 ----------------------------------------------------------------------
770 * I get errors when I try to compile groff with Sun C++ version 5.0
771   or 5.1.
773 This is a known problem; see Sun bug #4301919.  As of this writing, no
774 patch is available.  Use GCC 2.95.2 or later instead.
776 ----------------------------------------------------------------------
778 * I get lots of `numeric overflow' error messages whenever I run
779   groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler.
781 Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level
782 Makefile.  If that doesn't solve the problem, define INT_MIN as
783 -INT_MAX in libgroff/lib.h.