Commit | Line | Data |
---|---|---|
20799592 C |
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. | |
4 | ||
5 | * gcc 2.3.3 fails to compile pic/object.cc. | |
6 | ||
7 | Apply the following patch: | |
8 | ||
9 | Thu Apr 1 12:06:03 1993 Brendan Kehoe (brendan@lisa.cygnus.com) | |
10 | ||
11 | * cp-init.c (expand_default_init): Don't clear DECL_REGISTER. | |
12 | ||
13 | *** cp-init.c.~2~ Mon Mar 29 21:48:36 1993 | |
14 | --- cp-init.c Thu Apr 1 12:00:33 1993 | |
15 | *************** expand_default_init (binfo, true_exp, ex | |
16 | *** 1141,1149 **** | |
17 | } | |
18 | ||
19 | - /* ARM $7.1.1: "[register] may be ignored and in most implementations | |
20 | - it will be ignored if the address of the variable is taken." | |
21 | - Since we're likely to do just that in the ctor call, clear this. */ | |
22 | - DECL_REGISTER (exp) = 0; | |
23 | - | |
24 | rval = build_method_call (exp, constructor_name (type), | |
25 | parms, binfo, flags|xxref_init_possible); | |
26 | --- 1141,1144 ---- | |
27 | ||
28 | ||
29 | * On a DECstation or other machine using a MIPS cpu, gcc/g++ 2.2.2 | |
30 | gets a fatal signal while compiling tbl/main.c and tbl/table.c. | |
31 | ||
32 | Upgrade to gcc 2.3 or compile those files without -O. | |
33 | ||
34 | * I get lots of `numeric overflow' error messages whenever I run | |
35 | groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler. | |
36 | ||
37 | Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level | |
38 | Makefile. If that doesn't solve the problem, define INT_MIN as | |
39 | -INT_MAX in libgroff/lib.h. | |
40 | ||
41 | * I get errors when I try to compile groff with Sun C++. | |
42 | ||
43 | Groff requires header files that are moderately compatible with AT&T | |
44 | C++ and ANSI C. With some versions of Sun C++, the supplied header | |
45 | files need some of the following changes to meet this requirement: | |
46 | <string.h> must declare the mem* functions, (just add `#include | |
47 | <memory.h>' to <string.h>); the first argument to fopen and freopen | |
48 | should be declared as `const char *'; the first argument to fread | |
49 | should be declared as `void *'; the first argument to fwrite should be | |
50 | declared as `const void *'; malloc should be declared to return `void | |
51 | *'; in <alloca.h>, the declaration `extern "C" { void | |
52 | *__builtin_alloca(int); }' should be added; declarations of getopt(), | |
53 | optarg, optind and opterr should be added to <stdlib.h>; in | |
54 | <sys/signal.h> the return type and the second argument type of | |
55 | signal() should be changed to be `void (*)(int)'. | |
56 | ||
57 | You can either change them in place, or copy them to some other | |
58 | directory and include that directory with a -I option. | |
59 | ||
60 | * I get errors when I try to compile groff with DEC C++. | |
61 | ||
62 | Fix the declaration of write() in <unistd.h> so that the second | |
63 | argument is a const char *. Fix the declaration of open() in | |
64 | <sys/file.h> so that the first argument is a const char *. | |
65 | ||
66 | * On Ultrix, the make stops with the message | |
67 | ||
68 | *** Error code 1 | |
69 | ||
70 | Stop. | |
71 | ||
72 | for no apparent reason. | |
73 | ||
74 | Use GNU make. | |
75 | ||
76 | * I'm having problems compiling groff on 386BSD 0.1. | |
77 | ||
78 | If you're using ash as /bin/sh, you'll need the following patch. | |
79 | ||
80 | *** gendef.sh.org Sun Jun 30 13:30:36 1991 | |
81 | --- gendef.sh Sun Feb 28 10:23:49 1993 | |
82 | *************** | |
83 | *** 3,9 **** | |
84 | file=$1 | |
85 | shift | |
86 | ||
87 | ! defs="#define $1" | |
88 | shift | |
89 | for def | |
90 | do | |
91 | --- 3,10 ---- | |
92 | file=$1 | |
93 | shift | |
94 | ||
95 | ! x=$1 | |
96 | ! defs="#define $x" | |
97 | shift | |
98 | for def | |
99 | do | |
100 | ||
101 | You'll also need to change dirnamemax.c so that it doesn't use | |
102 | pathconf(). | |
103 | ||
104 | * While compiling on Xenix, ranlib libgroff.a fails. | |
105 | ||
106 | The system ranlib can't handle externals longer than 40 characters. | |
107 | Use the ranlib included in demon.co.uk:/pub/xenix/g++-1.40.3a.v1 | |
108 | instead. | |
109 | ||
110 | * Groff can't handle my troff document. It works fine with AT&T troff. | |
111 | ||
112 | Read the section on incompatibilities in gtroff(1). Try using the -C | |
113 | option. Alternatively there's the sed script in tmac/fixmacros.sed | |
114 | which will attempt to edit a file of macros so that it can be used | |
115 | with groff without the -C flag. | |
116 | ||
117 | * groff -Tdvi produces dvi files that use fonts at weird magnifications. | |
118 | ||
119 | Yes, it does. You may need to compile fonts with Metafont at these | |
120 | magnifications. The CompileFonts script in the devdvi/generate | |
121 | directory may help you to do this. (It will take a *long* time.) | |
122 | ||
123 | * pic output is not centered horizontally; pictures sometimes run off | |
124 | the bottom of the page. | |
125 | ||
126 | The macro package you are using is not supplying appropriate definitions | |
127 | of PS and PE. Give groff a -mpic option. | |
128 | ||
129 | * I'm having problems including PostScript illustrations using the PSPIC | |
130 | macro. | |
131 | ||
132 | A PostScript document must meet three requirements in order to be | |
133 | included with the PSPIC macro: it must comply with the Adobe Document | |
134 | Structuring Conventions; it must contain a BoundingBox line; it must | |
135 | be ``well-behaved''. The BoundingBox line should be of the form: | |
136 | ||
137 | %%BoundingBox: llx lly urx ury | |
138 | ||
139 | where llx, lly, urx, ury are the coordinates of the lower left x, | |
140 | lower left y, upper right x, upper right y of the bounding box of | |
141 | marks on the page expressed as integers in the default PostScript | |
142 | coordinate system (72 units per inch, origin at bottom left corner). | |
143 | A useful tactic is to print out the illustration by itself (you may | |
144 | need to add a `showpage' at the end), and physically measure the | |
145 | bounding box. For more detail on these requirements, read the | |
146 | specification of Encapsulated PostScript format. (This is available | |
147 | from the Adobe file server; send a message with a body of `help' to | |
148 | ps-file-server@adobe.com.) | |
149 | ||
150 | * I've configured groff for A4 paper, but gtroff still seems to think | |
151 | that the length of a page (as returned by \n(.p) is 11 inches. | |
152 | ||
153 | This is intentional. The PAGE option is used only by grops. For | |
154 | compatibility with ditroff, the default page length in gtroff is | |
155 | always 11 inches. The page length can be changed with the `pl' | |
156 | request. | |
157 | ||
158 | * Groff doesn't use the font names I'm used to. | |
159 | ||
160 | Use the `ftr' request. See gtroff(1). | |
161 | ||
162 | * I get errors using the Unix -ms macros with groff -e -C. | |
163 | ||
164 | Apply this change: | |
165 | ||
166 | *** /usr/lib/ms/ms.eqn Tue Apr 25 02:14:28 1989 | |
167 | --- ms.eqn Sun Nov 11 10:33:59 1990 | |
168 | *************** | |
169 | *** 22,29 **** | |
170 | .. | |
171 | . \" EN - end of a displayed equation | |
172 | .de EN | |
173 | ! .if !\a\\*(10\a\a .br | |
174 | .di | |
175 | .rm EZ | |
176 | .nr ZN \\n(dn | |
177 | .if \\n(ZN>0 .if \\n(YE=0 .LP | |
178 | --- 22,30 ---- | |
179 | .. | |
180 | . \" EN - end of a displayed equation | |
181 | .de EN | |
182 | ! .if \\n(.k>0 .br | |
183 | .di | |
184 | + .ds 10 \\*(EZ\\ | |
185 | .rm EZ | |
186 | .nr ZN \\n(dn | |
187 | .if \\n(ZN>0 .if \\n(YE=0 .LP | |
188 | ||
189 | ||
190 | * gpic doesn't accept the syntax `chop N M' for chopping both ends of a | |
191 | line. | |
192 | ||
193 | The correct syntax is `chop N chop M'. | |
194 | ||
195 | * With gpic -t, when I print `line ->; box' using a dvi to ps | |
196 | program, the arrow head sticks through into the inside of the box. | |
197 | ||
198 | The dvi to ps program should be modified to set the line cap and | |
199 | line join parameters to 1 while printing tpic specials. | |
200 | ||
201 | * When I print the output groff -Tps, the output is always shifted up | |
202 | by about 0.7 inches; I'm using 8.5x11 inch paper. | |
203 | ||
204 | Make sure that PAGE is defined to be `letter' in the top-level | |
205 | Makefile. | |
206 | ||
207 | * When I try to print the output of groff -Tps, I get no output at all | |
208 | from the printer, and the log file shows the error | |
209 | %%[ error: undefined; offendingcommand: BP ]%% | |
210 | I using TranScript spooling software. | |
211 | ||
212 | This is a bug in the page reversal filter in early versions of | |
213 | TranScript. Change the `broken' parameter in | |
214 | /usr/local/lib/groff/font/devps/DESC to 7. | |
215 | ||
216 | * When I preview groff -Tps output using the Sun OpenWindows 2.0 pageview | |
217 | program, all the pages are displayed on top of each other. | |
218 | ||
219 | This is a defect in pageview. Change the `broken' parameter in | |
220 | /usr/local/lib/groff/font/devps/DESC to 2. | |
221 | ||
222 | * With groff -TX75, -TX100or -X, I can only view the first page. | |
223 | ||
224 | The left mouse button brings up a menu that allows you to view other | |
225 | pages. | |
226 | ||
227 | * When I print the output of groff -Tdvi, I just get a black dot in | |
228 | upper left corner. | |
229 | ||
230 | Some dvi drivers (notably early versions of xtex) do not correctly | |
231 | handle dvi files that use a resolution different from that used by dvi | |
232 | files produced by TeX. Try getting a more up to date driver. | |
233 | ||
234 | * I get lots of errors when I use groff with the AT&T -mm macros. | |
235 | ||
236 | The AT&T -mm macros need a few changes to work with groff; `make | |
237 | install.dwbmm' will copy your -mm macros to groff's macro directory | |
238 | and make the necessary changes. You may need to edit the commands for | |
239 | the install.mm target in the Makefile. Alternatively use the groff | |
240 | -mm macros. | |
241 | ||
242 | * gtroff doesn't understand lines like `.ce99' with no space between | |
243 | the name of the request or macro and the arguments. | |
244 | ||
245 | Gtroff requires a space between macro or request and its arguments | |
246 | because it allows the use of long names for macros and requests. You | |
247 | can use the -C option or the `cp' request to put gtroff into a | |
248 | compatibility mode in which it is not possible to use long names for | |
249 | macros but in which no space is required between macros and their | |
250 | arguments. The use of compatibility mode is strongly discouraged. | |
251 | ||
252 | * gtroff gives warnings about lines like | |
253 | .ev \" a comment | |
254 | (with a tab after the .ev). | |
255 | ||
256 | A tab character cannot be used as a substitute for a space character | |
257 | (except in one case: between a control character at the beginning of a | |
258 | line and the name of a macro or request). For example, in Unix troff | |
259 | .ps \" restore the previous point size | |
260 | (with a tab after the .ps) will NOT restore the previous point-size; | |
261 | instead it will be silently ignored. Since this is very likely to be | |
262 | an error, gtroff can give a warning about it. If you want to align | |
263 | comments, you can do it like this: | |
264 | .ev\" \" a comment | |
265 | ||
266 | * I don't like the page headers and footers produced by groff -man. | |
267 | ||
268 | There seem to be many different styles of page header and footer | |
269 | produced by different versions of the -man macros. You will need to | |
270 | modify macros/tmac.an to suit your personal taste. For example, if | |
271 | you want the center of the page header to say | |
272 | UNIX Programmer's Manual | |
273 | you will need to change the line | |
274 | .el .ds an-extra3 \"UNIX Programmer's Manual | |
275 | to | |
276 | .el .ds an-extra3 UNIX Programmer's Manual | |
277 | ||
278 | * While formatting a manual page, groff complains about not being able to | |
279 | break lines. The problem seems to be caused by a line like: | |
280 | .TP \w'label'+2 | |
281 | ||
282 | The -man documentation says that the default scale indicator for TP | |
283 | macro is `n'. The groff -man macros implement this correctly, so that | |
284 | the argument will be evaluated as if it were | |
285 | \w'label'n+2n | |
286 | The Unix -man macros don't implement this correctly (probably because | |
287 | it's hard to do in Unix troff); they just append `n' to the entire | |
288 | argument, so that it will be evaluated as if it were | |
289 | \w'label'u+2n | |
290 | The solution is to fix the manual page: | |
291 | .TP \w'label'u+2 | |
292 | ||
293 | * I'm having problems formatting Ultrix man pages with groff -man. | |
294 | ||
295 | The Ultrix man pages use a number of non-standard extensions to the | |
296 | Unix man macros. One solution is to use the Ultrix -man macros with | |
297 | groff. Rename /usr/local/lib/groff/tmac/tmac.an to | |
298 | /usr/local/lib/groff/tmac/tmac.an.gnu, copy /usr/lib/tmac/tmac.an to | |
299 | /usr/local/lib/groff/tmac/tmac.an and apply the following patch (from | |
300 | Frank Wortner): | |
301 | ||
302 | *** /usr/local/lib/groff/tmac/tmac.an Wed Sep 9 12:29:28 1992 | |
303 | --- /usr/lib/tmac/tmac.an Fri Jul 24 19:58:19 1992 | |
304 | *************** | |
305 | *** 489,495 **** | |
306 | . \" make special case of shift out of italic | |
307 | .de }S | |
308 | .ds ]F | |
309 | ! .if \\$12 .if !\\$5 .ds ]F \^ | |
310 | .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" | |
311 | .el \\$3 | |
312 | .}f | |
313 | --- 489,495 ---- | |
314 | . \" make special case of shift out of italic | |
315 | .de }S | |
316 | .ds ]F | |
317 | ! .if \\$12 .if !\\$5 .ds ]F\^ | |
318 | .ie !\\$4 .}S \\$2 \\$1 "\\$3\f\\$1\\$4\\*(]F" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" | |
319 | .el \\$3 | |
320 | .}f | |
321 | ||
322 | Another possible solution is to install tmac/man.ultrix as | |
323 | /usr/local/lib/groff/tmac/man.local. | |
324 | ||
325 | * I'm having problems formatting HP-UX 9.0 man pages with groff -man. | |
326 | ||
327 | Rename /usr/local/lib/groff/tmac/tmac.an to (for example) | |
328 | /usr/local/lib/groff/tmac/tmac.gan, copy HP's tmac.an into | |
329 | /usr/local/lib/groff/tmac/tmac.an, and either put `.cp 1' at the | |
330 | beginning or filter it (and any files it .so's) through | |
331 | tmac/fixmacros.sed. | |
332 | ||
333 | * I'm having problems formatting man pages produced by the perl | |
334 | wrapman script. | |
335 | ||
336 | Some versions of wrapman have a superfluous blank line before the .TH | |
337 | line. This must be deleted. Then either use groff -C, or apply the | |
338 | following patch: | |
339 | ||
340 | *** wrapman.~2~ Sun Jan 19 12:10:24 1992 | |
341 | --- wrapman Fri Apr 2 12:12:57 1993 | |
342 | *************** | |
343 | *** 35,41 **** | |
344 | $line1 .= <IN> if $line1 =~ /eval/; | |
345 | $line1 .= <IN> if $line1 =~ /argv/; | |
346 | $line2 = <IN>; | |
347 | ! next if $line2 eq "'di';\n"; | |
348 | ||
349 | # Pull the old switcheroo. | |
350 | ||
351 | --- 35,41 ---- | |
352 | $line1 .= <IN> if $line1 =~ /eval/; | |
353 | $line1 .= <IN> if $line1 =~ /argv/; | |
354 | $line2 = <IN>; | |
355 | ! next if $line2 eq "'di ';\n"; | |
356 | ||
357 | # Pull the old switcheroo. | |
358 | ||
359 | *************** | |
360 | *** 49,56 **** | |
361 | ||
362 | print OUT $line1; | |
363 | print OUT <<EOF; | |
364 | ! 'di'; | |
365 | ! 'ig00'; | |
366 | # | |
367 | # $header | |
368 | # | |
369 | --- 49,57 ---- | |
370 | ||
371 | print OUT $line1; | |
372 | print OUT <<EOF; | |
373 | ! 'di '; | |
374 | ! 'ds 00 \\"'; | |
375 | ! 'ig 00 '; | |
376 | # | |
377 | # $header | |
378 | # | |
379 | *************** | |
380 | *** 72,85 **** | |
381 | ||
382 | # These next few lines are legal in both Perl and nroff. | |
383 | ||
384 | ! $null.00; # finish .ig | |
385 | ||
386 | 'di \\" finish diversion--previous line must be blank | |
387 | .nr nl 0-1 \\" fake up transition to first page again | |
388 | .nr % 0 \\" start at page 1 | |
389 | ! '; __END__ ##### From here on it's a standard manual page ##### | |
390 | .TH $PROG 1 "$month $mday, 19$year" | |
391 | - .AT 3 | |
392 | .SH NAME | |
393 | $prog \\- whatever | |
394 | .SH SYNOPSIS | |
395 | --- 73,85 ---- | |
396 | ||
397 | # These next few lines are legal in both Perl and nroff. | |
398 | ||
399 | ! $null.00 ; # finish .ig | |
400 | ||
401 | 'di \\" finish diversion--previous line must be blank | |
402 | .nr nl 0-1 \\" fake up transition to first page again | |
403 | .nr % 0 \\" start at page 1 | |
404 | ! .\\"'; __END__ ##### From here on it's a standard manual page ##### | |
405 | .TH $PROG 1 "$month $mday, 19$year" | |
406 | .SH NAME | |
407 | $prog \\- whatever | |
408 | .SH SYNOPSIS | |
409 | ||
410 | ||
411 | * When I preview documents using -TX75 or -TX100, the layout is not the same | |
412 | as when I print the document with -Tps: the line and page breaks come | |
413 | in different places. | |
414 | ||
415 | Use groff -X -Tps. | |
416 | ||
417 | * When I try to run gxditview, I get the error: | |
418 | Error: Widget viewport has zero width and/or height | |
419 | ||
420 | This error means you haven't correctly installed the application | |
421 | defaults file, GXditview.ad; ``make install'' does this for you | |
422 | automatically, so either you didn't do ``make install'', or you don't | |
423 | have imake configured correctly. | |
424 | ||
425 | * groff uses up an enormous amount of memory processing large files. | |
426 | I'm using 386BSD 0.1. | |
427 | ||
428 | 386BSD includes an old version of g++, 1.39, which has a bug that | |
429 | causes a major memory leak in gtroff. Apply the following fix to g++ | |
430 | and recompile groff: | |
431 | ||
432 | *** cplus-decl.c.~1~ Mon Aug 6 05:28:59 1990 | |
433 | --- cplus-decl.c Wed Jun 5 08:55:04 1991 | |
434 | *************** | |
435 | *** 7951,7961 **** | |
436 | ||
437 | /* At the end, call delete if that's what's requested. */ | |
438 | if (TREE_GETS_DELETE (current_class_type)) | |
439 | exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), | |
440 | get_identifier (OPERATOR_DELETE_FORMAT), | |
441 | ! build_tree_list (NULL_TREE, integer_zero_node), | |
442 | NULL_TREE, LOOKUP_NORMAL); | |
443 | else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type)) | |
444 | exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0); | |
445 | else | |
446 | exprstmt = 0; | |
447 | --- 7951,7961 ---- | |
448 | ||
449 | /* At the end, call delete if that's what's requested. */ | |
450 | if (TREE_GETS_DELETE (current_class_type)) | |
451 | exprstmt = build_method_call (build1 (NOP_EXPR, TYPE_POINTER_TO (current_class_type), error_mark_node), | |
452 | get_identifier (OPERATOR_DELETE_FORMAT), | |
453 | ! build_tree_list (NULL_TREE, current_class_decl), | |
454 | NULL_TREE, LOOKUP_NORMAL); | |
455 | else if (TYPE_USES_VIRTUAL_BASECLASSES (current_class_type)) | |
456 | exprstmt = build_x_delete (ptr_type_node, current_class_decl, 0); | |
457 | else | |
458 | exprstmt = 0; |