Re: Compile problems on Tru64 Unix
On 2002-05-22, Thomas Esser wrote 1. Edit some files. Here are diffs between the modified and pure src directories: Can you please resend using diff -u (preferred) or diff -c? OK, here it is: diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm \ teTeX-src-beta-20020402/texk/ps2pkm diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.c teTeX-src-beta-2002 0402/texk/ps2pkm/basics.c --- teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.cWed May 15 09:16 :07 2002 +++ teTeX-src-beta-20020402/texk/ps2pkm/basics.cThu Jan 31 20:50:44 2002 -8,7 +8,6 #include stdio.h #include stdlib.h #include sys/types.h -/* #define DECC */ #include sys/stat.h /* stat() */ #ifdef WIN32 #include win32lib.h -56,7 +55,7 #ifdef WIN32 int (__cdecl * pstat)(const char *, struct stat *) = win32_stat; #else -/* int (*pstat)(const char *, struct stat *) = stat; */ +int (*pstat)(const char *, struct stat *) = stat; #endif /* verbose stat function */ diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.h teTeX-src-beta-2002 0402/texk/ps2pkm/basics.h --- teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.hWed May 15 09:15 :33 2002 +++ teTeX-src-beta-20020402/texk/ps2pkm/basics.hTue Mar 16 08:15:27 1999 -98,5 +98,5 #include sys/types.h /* struct stat */ #include sys/stat.h /* stat() */ -extern int (*stat)(const char *, struct stat *); +extern int (*pstat)(const char *, struct stat *); int my_stat(const char *path, struct stat *buf); diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/flisearch.c teTeX-src-beta-2 0020402/texk/ps2pkm/flisearch.c --- teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/flisearch.c Wed May 15 09:16 :17 2002 +++ teTeX-src-beta-20020402/texk/ps2pkm/flisearch.c Sat Jan 24 13:11:28 1998 -22,7 +22,7 path = argv[1]; fontname = argv[2]; dpi = atoi(argv[3]); /* find file in path */ - stat = my_stat; pfopen = my_fopen; + pstat = my_stat; pfopen = my_fopen; fn = search_flipath(path, matching); if (fn == NULL) msg(%s at %d dpi not found\n, fontname, dpi); else msg(%s: %s at %d dpi found\n, fn, fontname, dpi); diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/ps2pk.c teTeX-src-beta-20020 402/texk/ps2pkm/ps2pk.c --- teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/ps2pk.c Wed May 15 09:16:48 2002 +++ teTeX-src-beta-20020402/texk/ps2pkm/ps2pk.c Sat Feb 6 23:00:17 1999 -273,7 +273,7 break; case 'd': debug = 1; - stat = my_stat; + pstat = my_stat; break; case 'e': if (*++argv[0] == '\0') { diff -u teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/psearch.c teTeX-src-beta-200 20402/texk/ps2pkm/psearch.c --- teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/psearch.c Wed May 15 09:16 :32 2002 +++ teTeX-src-beta-20020402/texk/ps2pkm/psearch.c Sat Jan 24 13:11:28 1998 -138,7 +138,7 /* Check if we have found file */ if (tail == NULL || *tail == '\0') { sprintf(fn, %s%c%s, head, DIRSEP, file); - if (stat(fn, status) == 0) { + if (pstat(fn, status) == 0) { res = malloc(strlen(fn)+1); if (res == NULL) fatal(Out of memory\n); strcpy(res, fn); -159,7 +159,7 /* Check if we have a directory */ sprintf(fn, %s%c%s, head, DIRSEP, de-d_name); - (void) stat(fn, status); + (void) pstat(fn, status); if (!S_ISDIR(status.st_mode)) { /* if we are looking for a file with an extension and we find * files with the same or a different extension we may consider -227,7 +227,7 struct stat status; if (path == NULL || *path == '\0' || absname(file)) { - if (stat(file, status) == 0) return file; + if (pstat(file, status) == 0) return file; if (terminate) fatal(File %s not found\n, file); return NULL; } -447,7 +447,7 /* try filename after replacing placeholders */ substitute(pe, %b%m%f%d%p, _bdpi, _mode, texfont, dpi+del, pk); - if (stat(pe, status) == 0) { + if (pstat(pe, status) == 0) { pkname = malloc(strlen(pe)+1); if (pkname == NULL) fatal(Out of memory\n); strcpy(pkname, pe); -459,7 +459,7 } else { sprintf(ppe, %c%s.%dpk, DIRSEP, texfont, dpi+del); -if (stat(pe, status) == 0) { +if (pstat(pe, status) == 0) { pkname = malloc(strlen(pe)+1); if (pkname == NULL) fatal(Out of memory\n); strcpy(pkname, pe); Regards, Svend Tollak Munkejord
Re: Compile problems on Tru64 Unix
Svend Tollak Munkejord [EMAIL PROTECTED] writes: [ diffs ] A small note on the pstat/stat diffs: As a quick hack I suggested to Svend to remove the function pointer pstat() and use stat() directly, since it seems that on Tru64 5.1 stat() isn't made available as a function, but only as macro, so that the assignment: int (*pstat)(const char *, struct stat *) = stat; won't work (see also e.g. http://gcc.gnu.org/ml/gcc-prs/2002-04/msg00018.html). There's probably a better workaround for this, e.g. using the appropirate #pragmas (but I don't have Tru64 5.1 available, so I coulnd't test). Some of the replacements in that diff are excessive: All assignments to stat(), of the kind: /* find file in path */ - stat = my_stat; pfopen = my_fopen; + pstat = my_stat; pfopen = my_fopen; fn = search_flipath(path, matching); should be removed. Best, Stefan
Re: Compile problems on Tru64 Unix
On 2002-05-06, I wrote: I am trying to install the latest teTeX beta. On SuSE Linux 7.2 it compiles all right, but on Tru64 Unix V5.1, using GNU make and gcc, make all exits with the following error message: ... Here my solution for now. Many thanks to Stefan Ulrich and to Thomas Esser for good advice. 1. Edit some files. Here are diffs between the modified and pure src directories: $ diff teTeX-src-beta-20020402-gcc-mod/texk/kpathsea/xstat.c \ teTeX-src-beta-20020402/texk/kpathsea/xstat.c 41c41 /* extern int lstat (); */ --- extern int lstat (); and $ diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm \ teTeX-src-beta-20020402/texk/ps2pkm diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.c teTeX-src-beta-20020402/texk/ps2pkm/basics.c 11d10 /* #define DECC */ 59c58 /* int (*pstat)(const char *, struct stat *) = stat; */ --- int (*pstat)(const char *, struct stat *) = stat; diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/basics.h teTeX-src-beta-20020402/texk/ps2pkm/basics.h 101c101 extern int (*stat)(const char *, struct stat *); --- extern int (*pstat)(const char *, struct stat *); diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/flisearch.c teTeX-src-beta-20020402/texk/ps2pkm/flisearch.c 25c25 stat = my_stat; pfopen = my_fopen; --- pstat = my_stat; pfopen = my_fopen; diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/ps2pk.c teTeX-src-beta-20020402/texk/ps2pkm/ps2pk.c 276c276 stat = my_stat; --- pstat = my_stat; diff teTeX-src-beta-20020402-gcc-mod/texk/ps2pkm/psearch.c teTeX-src-beta-20020402/texk/ps2pkm/psearch.c 141c141 if (stat(fn, status) == 0) { --- if (pstat(fn, status) == 0) { 162c162 (void) stat(fn, status); --- (void) pstat(fn, status); 230c230 if (stat(file, status) == 0) return file; --- if (pstat(file, status) == 0) return file; 450c450 if (stat(pe, status) == 0) { --- if (pstat(pe, status) == 0) { 462c462 if (stat(pe, status) == 0) { --- if (pstat(pe, status) == 0) { 2. Compile teTeX using gcc, without xdvik: sh -c './configure --prefix=/usr/local/share/teTeX --without-oxdvik --without-\ xdvik configure.log 21' sh -c 'make all all.log 21' 3. Download non-k xdvi from ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz and compile it with the native C compiler: env CC=cc CXX=cxx sh -c './configure --with-tetex \ --bindir=/usr/local/share/teTeX/bin/alphaev56-dec-osf5.1 \ --mandir=/usr/local/share/teTeX/man configure.log\ 21' sh -c 'make make.log 21' 4. It works! ...That is, there is a strange message during font generation, but the fonts are generated all right anyway: ... - mktexpk --mfmode ljfour --bdpi 600 --mag 'magstep(2)' --dpi 864 ecqi8 '3' /usr/local/share/teTeX/bin/alpha-osf/mktexpk: mf-nowin: not found ^^ Does this have any significance? mktexpk: Running mf \mode:=ljfour; mag:=magstep(2); nonstopmode; input ecqi8 This is METAFONT, Version 2.7182 (Web2C 7.3.7) ... Regards, Svend Tollak Munkejord
Re: Compile problems on Tru64 Unix
On 2002-05-06 Thomas Esser wrote: I am trying to install the latest teTeX beta. On SuSE Linux 7.2 it compiles all right, but on Tru64 Unix V5.1, using GNU make and gcc, make all exits with the following error message: snip Yes. Remove line 41 in file texk/kpathsea/xstat.c: extern int lstat (); Thank you, now the build process went a lot further, but this time it stopped like this: gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./.. -I../../libs/libwww -I./../../libs/libw ww -DHAVE_LIBWWW -DHAVE_WWWLIB_H -I../../libs/t1lib -I./../../libs/t1lib -I../.. /libs/t1lib/../type1 -I./../../libs/t1lib/../type1 -DPS_GS -I../../libs/t1lib/li b/t1lib -I../kpathsea -g -O2 -c xdvi.c In file included from xdvi-config.h:46, from xdvi.c:84: xdvi.h:46:1: warning: _XOPEN_SOURCE redefined /usr/include/standards.h:188:1: warning: this is the location of the previous de finition In file included from /usr/include/X11/Xos.h:202, from xdvi.h:92, from xdvi-config.h:46, from xdvi.c:84: /usr/include/sys/time.h:71: parse error before suseconds_t /usr/include/sys/time.h:106: field `it_interval' has incomplete type /usr/include/sys/time.h:107: field `it_value' has incomplete type /usr/include/sys/time.h:108: confused by earlier errors, bailing out make[2]: *** [xdvi.o] Error 1 make[2]: Leaving directory `/usr/local/share/src/teTeX-beta/teTeX-src-beta-20020 402/texk/oxdvik' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/share/src/teTeX-beta/teTeX-src-beta-20020 402/texk' make: *** [all] Error 1 Are more fixes required? Regards, Svend Tollak Munkejord
Re: Compile problems on Tru64 Unix
On 2002-05-06, Paul A Sand wrote: On Mon, May 06, 2002 at 07:40:23PM +0200, Svend Tollak Munkejord wrote: I am trying to install the latest teTeX beta. On SuSE Linux 7.2 it compiles all right, but on Tru64 Unix V5.1, using GNU make and gcc, make all exits with the following error message: I haven't tried the beta, but my notes claim this about the last version: o I used cc and cxx instead of gcc. i.e., my configure step is something like env CC=cc CXX=cxx ./configure --prefix=/usr/local/teTeX Thanks a lot for the tip. Unfortunately, I was not able to build even the old teTeX 1.0. I tried this: env CC=cc CXX=cxx CFLAGS='-O0 -g' sh -c './configure \ --prefix=/usr/local/share/teTeX configure.log 21' \ sh -c 'make all all.log 21' and got the following error message: snip cxx -o pdftex pdftexini.o pdftex0.o pdftex1.o pdftex2.o pdftexextra.o pdftexdir/libpdf.a ../../libs/libpng/libpng.a ../../libs/zlib/libz.a pdftexdir/xpdf-0.80/xpdf/pdftoepdf.a pdftexdir/xpdf-0.80/goo/libGoo.a lib/lib.a ../kpathsea/STATIC/libkpathsea.a -lm ld: load_compressed_file could not malloc 25820987655. bytes for pdftexdir/xpdf-0.80/xpdf/pdftoepdf.a(pdftoepdf.o) make[2]: *** [pdftex] Error 1 make[2]: Leaving directory `/usr/local/share/src/teTeX/teTeX-1.0/texk/web2c' make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/share/src/teTeX/teTeX-1.0/texk' make: *** [all] Error 1 /snip I tried with and without setting the CFLAGS, and both with GNU and Tru64 ar. Using GNU ar gave a different error. The error message was similar for the latest teTeX beta. Do you understand any of it? Regards, Svend Tollak Munkejord
Re: Compile problems on Tru64 Unix
cxx -o pdftex pdftexini.o pdftex0.o pdftex1.o pdftex2.o pdftexextra.o pdftexdir/libpdf.a ../../libs/libpng/libpng.a ../../libs/zlib/libz.a pdftexdir/xpdf-0.80/xpdf/pdftoepdf.a pdftexdir/xpdf-0.80/goo/libGoo.a lib/lib.a ../kpathsea/STATIC/libkpathsea.a -lm ld: load_compressed_file could not malloc 25820987655. bytes for Well, it looks like the linker (ld) wants to allocate 24GB of memory which fails. My first guess is that something, most propably the linker, is broken. Thomas
Re: Compile problems on Tru64 Unix
I am trying to install the latest teTeX beta. On SuSE Linux 7.2 it compiles all right, but on Tru64 Unix V5.1, using GNU make and gcc, make all exits with the following error message: gcc xstat.c -DHAVE_CONFIG_H -I. -I. -I.. -I./.. -g -O2 -c -o STATIC/xstat.o xstat.c:41:19: macro lstat requires 2 arguments, but only 1 given make[2]: *** [xstat.lo] Error 1 make[2]: Leaving directory `/usr/local/share/src/teTeX-beta/teTeX-src-beta-20020402/texk/kpathsea' make[1]: *** [do-kpathsea] Error 2 make[1]: Leaving directory `/usr/local/share/src/teTeX-beta/teTeX-src-beta-20020402/texk' make: *** [all] Error 1 Does anyone have a clue about what to do? Yes. Remove line 41 in file texk/kpathsea/xstat.c: extern int lstat (); Olaf, do you have an idea how to fix this in a portable way? Do you want to support systems which do not have proper declarations in theit header files and thus risking to break other systems? Thomas