home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texsrc2 / Src / PROBLEMS < prev    next >
Text File  |  1993-02-21  |  12KB  |  375 lines

  1. Some generic problems you might encounter (for other machine-specific
  2. problems, see MACHINES):
  3.  
  4. * Conflicts between the declarations of read/malloc/free in the flex
  5.   scanner and include files.  Solution: use the distributed
  6.   lex.yy.c-dist, generated with flex, which uses a flex.skel slightly
  7.   modified by karl.
  8.  
  9.  
  10. * For DOS, you may have to change the definitions of WORDS_BIGENDIAN and
  11.   DOS in lib/c-auto.h.  Here are some notes:
  12.   
  13. From: Richard Mansfield <melvin@math.psu.edu>
  14. Date: Mon, 9 Nov 92 14:24:10 -0500
  15.  
  16. Make the changes in site.h. I don't know if I got the default
  17. directories to work. TEXPOOL seemed to work fine (using /), but I had trouble
  18. with TEXINPUTS. After minimal attempts to get it right, I punted
  19. and decided to use environmental variables. In the variables I use 
  20. \ and ; as a separator as in DOS. Thinking about in some more as I write
  21. this, my troubles could have been caused by not correctly reading tex.pool
  22. although I don't know.  
  23.  
  24. My method for getting the source files was to do
  25. make TeX > tex.log
  26. on the SUN and then editing tex.log to become tex.bat. I then carried
  27. the .c and .h files home on a floppy and compiled them at home.
  28.  
  29. DOS gcc does have yacc and bison, but I did not use them.
  30.  
  31. If you want to see my exact set up. ftp to ftp.math.psu.edu,
  32. look in directory pub/melvin/pctex and get the files read.me
  33. and tex.zip.
  34.  
  35. * GNU sed 1.06 cannot handle the sed script in mf/convert; neither can
  36.   1.07.  1.08 and later fix it.
  37.  
  38. * GNU Make 3.57 does not pass arguments to shell scripts (like convert),
  39. under system V.  3.56 does not have this problem, and neither do later
  40. versions.
  41.  
  42. * On an i386 machine, GNU C 1.36 does not compile tex5.c correctly when
  43. making a 32-bit TeX.  1.37 fixes this bug.
  44.  
  45. * On the AT&T 3b2, under System V release 3.2, cc thinks that
  46. eject_penalty (which is -1000, defined at line 3216), is a very large
  47. positive number.  oc@vmp.com is developing a port for the 3b2; he has
  48. contributed some (incomplete) patches; they are below.
  49.  
  50. * On a Sun 3 running 3.x, cc cannot compile mf2.c or mf4.c, because the
  51. preprocessor puts a # directive at the end of line 1811 (or
  52. thereabouts), instead of at the beginning.  You have to manually move
  53. it.
  54.  
  55. * On a Sun 386i running 4.0.1, cc cannot compile Metafont with -O, because it
  56. can't compile x = x + y correctly.  Don't use -O, or don't use cc. 
  57. (From morgan@ics.uci.edu.)
  58.  
  59. * Make loses heavily if you are using a networked filesystem, and the
  60.   server and the local machine have different times.  You might have
  61.   this problem if `initex' gets made twice, for instance.
  62.  
  63. * On a *86 running Xenix, if you use flex you may have to add the
  64.   following to c-auto.h (although it seems to karl that configure should
  65.   be able to handle this).  From wally@lpds.sublink.org.
  66.  
  67. #ifndef FLEX_SCANNER        /* Flex treat unput('\n') differently from
  68.                    what Xenix (and probably others) lex does.
  69.                    I don't remember the problem but the
  70.                    following redefinition let compile TeX
  71.                    correctly -wp10/16/92. */
  72. #undef DECLARE_YYTEXT
  73. #define DECLARE_YYTEXT extern char yytext[];
  74. #undef unput
  75. # define unput(c) {yytchar=(c);if(yytchar=='\n')yylineno--;else*yysptr++=yytchar;}
  76. #endif /* FLEX_SCANNER */
  77.  
  78. * On a 386 machine running 386/ix, cc cannot compile itex.c, according
  79. to Reiner Petersen <reiner@db0tui62.bitnet>.  Here is an ed script to
  80. get around the problem (alternatively, you can get gcc, and compile with
  81. that):
  82.  
  83. :
  84. #       Reiner Petersen (reiner@coma.uucp)
  85. #       Technical University of Berlin
  86. #
  87. ed - $1 << end-of-edscript
  88. !echo change:
  89. /  register integer for_end; i = 1 ; for_end = 31 ; if ( i <= for_end) do
  90. +1,.+2p
  91. -2,.c
  92.   register integer for_end;
  93.    register char j;             /* 386/ix cc bug workaround  rp */
  94.    i = 1 ;
  95.    for_end = 31 ;
  96.    if ( i <= for_end) do 
  97.         j = i;
  98.         xchr [ j ] = chr ( i ) ;
  99.     
  100.     while ( i++ < for_end ) ; 
  101. .
  102. !echo to:
  103. -8,.p
  104. w $1
  105. end-of-edscript
  106.  
  107. If you want, you can put this into the pipeline in ./tex/convert.
  108.  
  109. * undump doesn't work under 386/ix.  Here is a diff to undump.SYS_V.c to
  110. fix this, again contributed by reiner:
  111. *** undump.SYS_V.c      Mon Apr 20 00:57:23 1987
  112. --- undump.c    Fri Aug 19 17:55:27 1988
  113. ***************
  114. *** 1,7 ****
  115.   /*
  116.    * undump - resurrect a core file into a running program.
  117.    *
  118. !  *    for UNIX System V on a 3Bx
  119.    *    that uses the Common Object File Format
  120.    *
  121.    * Author:
  122. --- 1,7 ----
  123.   /*
  124.    * undump - resurrect a core file into a running program.
  125.    *
  126. !  *    for UNIX System V on a 3Bx or Interactive 386/ix
  127.    *    that uses the Common Object File Format
  128.    *
  129.    * Author:
  130. ***************
  131. *** 9,14 ****
  132. --- 9,19 ----
  133.    *    New York University
  134.    *    Tue Mar  3 13:18:25 EST 1987
  135.    *
  136. +  * Additions for 386/ix:
  137. +  *    Reiner Petersen (reiner@coma.uucp)
  138. +  *    Technical University of Berlin
  139. +  *    Thu Aug 18 13:40:20 MET DST 1988
  140. +  *
  141.    * Adapted from:
  142.    *     Spencer Thomas's undump and the file unexec.c in GNU emacs
  143.    */
  144. ***************
  145. *** 15,22 ****
  146. --- 20,33 ----
  147.  
  148.   #include <sys/param.h>
  149.   #include <sys/types.h>
  150. +
  151. + #ifndef       ISC_386ix       /* not availible in ISC 386/ix */
  152. +
  153.   #include <sys/psw.h>
  154.   #include <sys/pcb.h>
  155. +
  156. + #endif        /* ISC_386ix */
  157. +
  158.   #include <sys/signal.h>
  159.   #include <sys/fs/s5dir.h>
  160.   #include <sys/user.h>
  161. ***************
  162. *** 37,46 ****
  163. --- 48,66 ----
  164.   struct scnhdr dsc;
  165.   struct scnhdr bsc;
  166.  
  167. + #ifdef        ISC_386ix
  168. + struct scnhdr csc;            /* Comment section used by ISC 386/ix */
  169. + #endif        /* ISC_386ix */
  170. +
  171.   long bias;
  172.   long lnnoptr;
  173.   long text_scnptr;
  174.   long data_scnptr;
  175. +
  176. + #ifdef        ISC_386ix
  177. + long comment_scnptr;
  178. + #endif        /* ISC_386ix */
  179. +
  180.   long symlocptr;
  181.  
  182.   main(argc, argv)
  183. ***************
  184. *** 89,94 ****
  185. --- 109,118 ----
  186.                         dsc = sc;
  187.                  else if (strcmp(sc.s_name, ".bss") == 0) 
  188.                         bsc = sc;
  189. + #ifdef        ISC_386ix
  190. +                else if (strcmp(sc.s_name, ".comment") == 0) 
  191. +                       csc = sc;
  192. + #endif        /* ISC_386ix */
  193.                 
  194.         
  195.  
  196. ***************
  197. *** 97,103 ****
  198.         if (u.u_exdata.ux_tsize != aout.tsize ||
  199.             u.u_exdata.ux_dsize != aout.dsize ||
  200.             u.u_exdata.ux_bsize != aout.bsize) 
  201. !               fprintf("mismatch between %s and %s sizes\n", a_out_name,
  202.  core_name);
  203.                 exit(1);
  204.         
  205.  
  206. --- 121,128 ----
  207.         if (u.u_exdata.ux_tsize != aout.tsize ||
  208.             u.u_exdata.ux_dsize != aout.dsize ||
  209.             u.u_exdata.ux_bsize != aout.bsize) 
  210. !               fprintf( stderr, "mismatch between %s and %s sizes\n",
  211. !                                                       a_out_name, core_name);
  212.                 exit(1);
  213.         
  214.  
  215. ***************
  216. *** 122,128 ****
  217. --- 147,159 ----
  218.         bsc.s_paddr = bsc.s_vaddr = aout.data_start + aout.dsize;
  219.         bsc.s_size = aout.bsize;
  220.         bsc.s_scnptr = 0L;
  221. + #ifndef       ISC_386ix
  222.         bias = dsc.s_scnptr + dsc.s_size - lnnoptr;
  223. + #else
  224. +       comment_scnptr = csc.s_scnptr;
  225. +       csc.s_scnptr = dsc.s_scnptr + dsc.s_size;
  226. +       bias = csc.s_scnptr + csc.s_size - lnnoptr;
  227. + #endif        /* ISC_386ix */
  228.  
  229.         if (fh.f_symptr > 0L)
  230.                 fh.f_symptr += bias;
  231. ***************
  232. *** 139,149 ****
  233. --- 170,186 ----
  234.                 Perror("ds write");
  235.         if (fwrite(&bsc, sizeof(bsc), 1, nfp) != 1)
  236.                 Perror("bs write");
  237. +       if (fwrite(&csc, sizeof(csc), 1, nfp) != 1)
  238. +               Perror("cs write");
  239.         fseek(nfp, (long)text_scnptr, 0);
  240.         copy(afp, nfp, aout.tsize);
  241.         fseek(cfp, off, 0);
  242.         fseek(nfp, (long)data_scnptr, 0);
  243.         copy(cfp, nfp, size);
  244. + #ifdef        ISC_386ix
  245. +       fseek(afp, (long)comment_scnptr, 0);
  246. +       copy(afp, nfp, csc.s_size);
  247. + #endif        /* ISC_386ix */
  248.         copy_syms(afp, nfp);
  249.         fclose(nfp);
  250.         fclose(afp);
  251.  
  252.  
  253.  
  254. These patches for the 3b2 machine are meant to serve as a starting point
  255. only, as they are for pre-2.992 TeX.  If you work on this, contact oc@vmp.com.
  256.  
  257. #
  258. # 3b2patch.sh, to fix web2c for 3B2s
  259. #      for TeX 2.9*
  260. #
  261. # First, make sure we have EXTRA.c and ITEX.c that are the
  262. # same as the distribution versions of extra.c and itex.c
  263. # si