[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Crash caused by building akcl on dec3100.
Hi there,
I've been trying to build akcl on a DECstation 3100 running
Ultrix 4.0. The only modifications I've made to the distribution are
in the files h/dec3100.defs and c/dec31_unixsave.c (I'll append these
below -- they're the suggestions posted to this mailing list last
October by Luke Tierney <luke@umnstat.stat.umn.edu>). After typing
'make -f Smakefile' everything seems to go well for quite a while,
until just after the message 'finished loading lsp/auto.lsp', at which
point the system crashes with a PANIC message. I've tried this twice
and it happened both times.
Any suggestions would be appreciated.
Thanks in advance,
Bryan Wright
bryan@sphinx.phys.virginia.edu
[appended below is Luke Tierney's shar file, containing modified defs and
unixsave files.]
------------------- CUT HERE ---------------------------------------------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: dec3100.600 dec3100.600/README.dec3100 dec3100.600/c
# dec3100.600/h dec3100.600/c/dec31_unixsave.c
# dec3100.600/h/dec3100.defs
# Wrapped by luke@nokomis.stat.umn.edu on Wed Oct 9 06:23:02 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test ! -d 'dec3100.600' ; then
echo shar: Creating directory \"'dec3100.600'\"
mkdir 'dec3100.600'
fi
if test -f 'dec3100.600/README.dec3100' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dec3100.600/README.dec3100'\"
else
echo shar: Extracting \"'dec3100.600/README.dec3100'\" \(1147 characters\)
sed "s/^X//" >'dec3100.600/README.dec3100' <<'END_OF_FILE'
XHere are some modifications that should help installing akcl-1-600 on
Xa DECstation running ULTRIX 4.0. The modifications are
X
X c/dec3100_unixsave.c - version that doesn't hang periodically on saves
X h/dec3100.defs - change of compiler directives
X
XTo install, get and untar kcl and akcl-1-592. Then
X
X edit the file ./h/dec3100.defs (relative to the location of this
X README file) to include the correct kcl source directory
X
X copy the stuff in this directory and all subdirectories into
X the akcl directory (you can use cp -r)
X
X cd to the akcl source directory and do
X
X add-defs dec3100
X make -f Smakefile
X
XThat should do it. The dec3100.defs file sets ODIR_DEBUG=-g, so much
Xof the kernel gets made without optimization. You can change this flag
Xto -O, except it seems you have to compile one file, c/pathname.c,
Xwithout -O. I'm not sure what is the cleanest way to do this. I think
Xyou can use the following steps:
X
X add-defs dec3100
X make -f Smakefile sources
X (cd o; make ODIR_DEBUG= pathname.o)
X make -f Smakefile
X
Xbut I have not tried this. I just ran the make until it died, rm'd and
Xremade pathname.o without -O, and continued the make.
END_OF_FILE
if test 1147 -ne `wc -c <'dec3100.600/README.dec3100'`; then
echo shar: \"'dec3100.600/README.dec3100'\" unpacked with wrong size!
fi
# end of 'dec3100.600/README.dec3100'
fi
if test ! -d 'dec3100.600/c' ; then
echo shar: Creating directory \"'dec3100.600/c'\"
mkdir 'dec3100.600/c'
fi
if test ! -d 'dec3100.600/h' ; then
echo shar: Creating directory \"'dec3100.600/h'\"
mkdir 'dec3100.600/h'
fi
if test -f 'dec3100.600/c/dec31_unixsave.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dec3100.600/c/dec31_unixsave.c'\"
else
echo shar: Extracting \"'dec3100.600/c/dec31_unixsave.c'\" \(9253 characters\)
sed "s/^X//" >'dec3100.600/c/dec31_unixsave.c' <<'END_OF_FILE'
X
X/* for the pmax */
X
X/*
X(c) Copyright Taiichi Yuasa and Masami Hagiya, 1984. All rights reserved.
XCopying of this file is authorized to users who have executed the true and
Xproper "License Agreement for Kyoto Common LISP" with SIGLISP.
X*/
X
X/*
X unixsave.c
X*/
X
X
X
X/* When MACHINE is S3000, use fcntl.h */
X#ifdef ATT
X#include <fcntl.h>
X#include <unistd.h>
X#else
X#include <sys/file.h>
X#endif
X
X
X#ifdef BSD
X#include <a.out.h>
X#endif
X
X#ifdef VAX
X#define PAGSIZ 1024
X#define SEGSIZ 1024
X#define TXTRELOC 0
X#endif
X
X#ifdef ISI
X
X
X
X#endif
X
X#ifdef SEQ
X
X
X#endif
X
X#ifdef NEWS
X#define TXTRELOC 0
X#endif
X
X#ifdef IBMRT
X
X
X
X#endif
X
X#ifdef ATT
X#include <filehdr.h>
X#include <aouthdr.h>
X#include <scnhdr.h>
X#include <syms.h>
X#define exec aouthdr
X#define a_text tsize
X#define a_data dsize
X#define a_bss bsize
X#endif
X
X#ifdef E15
X#include <a.out.h>
Xextern etext;
X#define exec bhdr
X#define a_text tsize
X#define a_data dsize
X#define a_bss bsize
X#define a_syms ssize
X#define a_trsize rtsize
X#define a_drsize rdsize
X#define SEGSIZ (128*1024)
X#define TXTRELOC (1024*1024)
X#endif
X
X#ifndef mips
Xfilecpy(to, from, n)
XFILE *to, *from;
Xregister int n;
X{
X char buffer[BUFSIZ];
X
X for (;;)
X if (n > BUFSIZ) {
X fread(buffer, BUFSIZ, 1, from);
X fwrite(buffer, BUFSIZ, 1, to);
X n -= BUFSIZ;
X } else if (n > 0) {
X fread(buffer, 1, n, from);
X fwrite(buffer, 1, n, to);
X break;
X } else
X break;
X}
X#endif
X
Xmemory_save(original_file, save_file)
Xchar *original_file, *save_file;
X{
X
X#ifdef BSD
X struct exec header;
X int stsize;
X#endif
X#ifdef ATT
X#ifdef mips
X struct {
X struct filehdr filehdr;
X struct aouthdr aouthdr;
X struct scnhdr
X text_section,
X#if 0
X init_section,
X#endif
X rdata_section,
X data_section,
X lit8_section,
X lit4_section,
X sdata_section,
X sbss_section,
X bss_section;
X } hdrs;
X struct filehdr *pfilehdr;
X struct aouthdr *paouthdr;
X struct scnhdr *pscnhdr;
X char buf[BUFSIZ];
X HDRR symhdr;
X int fptr, nbytes, pagesize;
X#else
X struct filehdr fileheader;
X struct exec header;
X struct scnhdr sectionheader;
X#endif /* mips */
X int diff;
X#endif
X#ifdef E15
X struct exec header;
X#endif
X
X char *data_begin, *data_end;
X int original_data;
X FILE *original, *save;
X register int n;
X register char *p;
X extern char *sbrk();
X extern char stdin_buf[BUFSIZ], stdout_buf[BUFSIZ];
X char stderr_buf[BUFSIZ];
X
X /* All files should have been close before getting here */
X fclose(stdin);
X fclose(stdout);
X fclose(stderr);
X
X original = fopen(original_file, "r");
X if (stdin != original || original->_file != 0) {
X freopen("/dev/tty", "w", stderr);
X setbuf(stderr, stderr_buf);
X fprintf(stderr, "Can't open the original file.\n");
X exit(1);
X }
X setbuf(original, stdin_buf);
X
X unlink(save_file);
X n = open(save_file, O_CREAT|O_WRONLY, 0777);
X if (n != 1 || (save = fdopen(n, "w")) != stdout) {
X freopen("/dev/tty", "w", stderr);
X setbuf(stderr, stderr_buf);
X fprintf(stderr, "Can't open the save file.\n");
X exit(1);
X }
X setbuf(save, stdout_buf);
X
X#ifdef BSD
X fread(&header, sizeof(header), 1, original);
X
X#ifdef VAX
X data_begin
X = (char *)((TXTRELOC+header.a_text+(SEGSIZ-1)) & ~(SEGSIZ-1));
X#endif
X#ifdef SUN
X data_begin
X = (char *)((TXTRELOC+header.a_text+(SEGSIZ-1)) & ~(SEGSIZ-1));
X#endif
X#ifdef SUN2R3
X data_begin = (char *)N_DATADDR(header);
X#endif
X#ifdef SUN3
X data_begin = (char *)N_DATADDR(header);
X#endif
X#ifdef NEWS
X data_begin
X = (char *)((TXTRELOC+header.a_text+(SEGSIZ-1)) & ~(SEGSIZ-1));
X#endif
X#ifdef ISI
X
X
X#endif
X#ifdef SEQ
X
X
X#endif
X#ifdef IBMRT
X
X
X#endif
X
X data_end = core_end;
X original_data = header.a_data;
X header.a_data = data_end - data_begin;
X header.a_bss = 0;
X fwrite(&header, sizeof(header), 1, save);
X
X#ifdef VAX
X if (header.a_magic == ZMAGIC)
X filecpy(save, original, PAGSIZ - sizeof(header));
X filecpy(save, original, header.a_text);
X#endif
X#ifdef SUN
X if (header.a_magic == ZMAGIC)
X filecpy(save, original, PAGSIZ - sizeof(header));
X filecpy(save, original, header.a_text);
X#endif
X#ifdef SUN2R3
X filecpy(save, original, header.a_text - sizeof(header));
X#endif
X#ifdef SUN3
X filecpy(save, original, header.a_text - sizeof(header));
X#endif
X#ifdef NEWS
X if (header.a_magic == ZMAGIC)
X filecpy(save, original, PAGSIZ - sizeof(header));
X filecpy(save, original, header.a_text);
X#endif
X#ifdef ISI
X
X
X
X
X#endif
X#ifdef SEQ
X
X
X#endif
X#ifdef IBMRT
X
X
X
X#endif
X#endif
X
X#ifdef ATT
X#ifdef mips
X# define NSCNS 3
X read(0, (char*)&hdrs.filehdr, FILHSZ + AOUTHSZ);
X pfilehdr = (struct filehdr*)hdrs.aouthdr.text_start;
X paouthdr = (struct aouthdr*)((long)pfilehdr + FILHSZ);
X pscnhdr = (struct scnhdr*)((long)paouthdr + AOUTHSZ);
X
X pagesize = getpagesize();
X
X hdrs.aouthdr.dsize =
X ((long)core_end - hdrs.aouthdr.data_start + pagesize - 1)
X & ~(pagesize - 1);
X hdrs.aouthdr.bss_start =
X hdrs.aouthdr.data_start + hdrs.aouthdr.dsize;
X hdrs.aouthdr.bsize = 0;
X
X hdrs.filehdr.f_nscns = NSCNS;
X hdrs.filehdr.f_timdat = time(NULL);
X hdrs.filehdr.f_symptr = hdrs.aouthdr.tsize + hdrs.aouthdr.dsize;
X
X bcopy((char*)pscnhdr, (char*)&hdrs.text_section, NSCNS * SCNHSZ);
X hdrs.data_section.s_size = hdrs.aouthdr.dsize
X - hdrs.rdata_section.s_size;
X bzero((char*)&hdrs.lit8_section,
X sizeof hdrs - FILHSZ - AOUTHSZ - NSCNS * SCNHSZ);
X fptr = write(1, &hdrs, AOUTHSZ + FILHSZ + pfilehdr->f_nscns * SCNHSZ);
X
X p = (char*)hdrs.aouthdr.text_start + fptr;
X n = hdrs.aouthdr.tsize - fptr;
X nbytes = pagesize - fptr;
X write(1, p, nbytes);
X p += nbytes;
X n -= nbytes;
X while ( n > pagesize ) {
X write(1, p, pagesize);
X p += pagesize;
X n -= pagesize;
X }
X if ( n )
X write(1, p, n);
X
X lseek(1, hdrs.rdata_section.s_scnptr, SEEK_SET);
X p = (char*)hdrs.aouthdr.data_start;
X n = hdrs.aouthdr.dsize;
X while ( n > pagesize ) {
X write(1, p, pagesize);
X p += pagesize;
X n -= pagesize;
X }
X if ( n )
X write(1, p, n);
X
X lseek(0, pfilehdr->f_symptr, SEEK_SET);
X diff = hdrs.filehdr.f_symptr - pfilehdr->f_symptr;
X read(0, &symhdr, cbHDRR);
X#define
adjust(field)if(symhdr.cb/**/field/**/Offset)symhdr.cb/**/field/**/Offset+= diff
X adjust(Line);
X adjust(Dn);
X adjust(Pd);
X adjust(Sym);
X adjust(Opt);
X adjust(Aux);
X adjust(Ss);
X adjust(SsExt);
X adjust(Fd);
X adjust(Rfd);
X adjust(Ext);
X#undef adjust
X write(1, &symhdr, cbHDRR);
X while ( (n = read(0, buf, sizeof buf)) > 0 )
X write(1, buf, n);
X#else
X fread(&fileheader, sizeof(fileheader), 1, original);
X fread(&header, sizeof(header), 1, original);
X data_begin = (char *)header.data_start;
X data_end = core_end;
X original_data = header.a_data;
X header.a_data = data_end - data_begin;
X diff = header.a_data - original_data;
X header.a_bss = sbrk(0) - core_end;
X fileheader.f_symptr += diff;
X fwrite(&fileheader, sizeof(fileheader), 1, save);
X fwrite(&header, sizeof(header), 1, save);
X fread(§ionheader, sizeof(sectionheader), 1, original);
X if (sectionheader.s_lnnoptr)
X sectionheader.s_lnnoptr += diff;
X fwrite(§ionheader, sizeof(sectionheader), 1, save);
X fread(§ionheader, sizeof(sectionheader), 1, original);
X sectionheader.s_size += diff;
X if (sectionheader.s_lnnoptr)
X sectionheader.s_lnnoptr += diff;
X fwrite(§ionheader, sizeof(sectionheader), 1, save);
X fread(§ionheader, sizeof(sectionheader), 1, original);
X sectionheader.s_paddr += diff;
X sectionheader.s_vaddr += diff;
X sectionheader.s_size = header.a_bss;
X#ifdef S3000
X if (sectionheader.s_scnptr)
X sectionheader.s_scnptr += diff;
X#endif
X if (sectionheader.s_lnnoptr)
X sectionheader.s_lnnoptr += diff;
X fwrite(§ionheader, sizeof(sectionheader), 1, save);
X for (n = 4; n <= fileheader.f_nscns; n++) {
X fread(§ionheader, sizeof(sectionheader), 1, original);
X if (sectionheader.s_scnptr)
X sectionheader.s_scnptr += diff;
X if (sectionheader.s_lnnoptr)
X sectionheader.s_lnnoptr += diff;
X fwrite(§ionheader, sizeof(sectionheader), 1, save);
X }
X filecpy(save, original, header.a_text);
X#endif /* mips */
X#endif
X
X#ifdef E15
X fread(&header, sizeof(header), 1, original);
X if (header.fmagic != NMAGIC)
X data_begin
X = (char *)(TXTRELOC+header.a_text);
X else
X data_begin
X = (char *)((TXTRELOC+header.a_text+(SEGSIZ-1)) & ~(SEGSIZ-1));
X data_end = core_end;
X original_data = header.a_data;
X header.a_data = data_end - data_begin;
X header.a_bss = sbrk(0) - core_end;
X fwrite(&header, sizeof(header), 1, save);
X filecpy(save, original, header.a_text);
X#endif
X
X#ifndef mips
X for (n = header.a_data, p = data_begin; ; n -= BUFSIZ, p += BUFSIZ)
X if (n > BUFSIZ)
X fwrite(p, BUFSIZ, 1, save);
X else if (n > 0) {
X fwrite(p, 1, n, save);
X break;
X } else
X break;
X
X fseek(original, original_data, 1);
X
X#ifdef BSD
X filecpy(save, original, header.a_syms+header.a_trsize+header.a_drsize);
X fread(&stsize, sizeof(stsize), 1, original);
X fwrite(&stsize, sizeof(stsize), 1, save);
X filecpy(save, original, stsize - sizeof(stsize));
X#endif
X
X#ifdef ATT
X for (;;) {
X n = getc(original);
X if (feof(original))
X break;
X putc(n, save);
X }
X#endif
X
X#ifdef E15
X filecpy(save, original, header.a_syms+header.a_trsize+header.a_drsize);
X#endif
X#endif /* !mips */
X fclose(original);
X fclose(save);
X}
X
XLsave()
X{
X char filename[256];
X
X check_arg(1);
X check_type_or_pathname_string_symbol_stream(&vs_base[0]);
X coerce_to_filename(vs_base[0], filename);
X
X _cleanup();
X
X memory_save(kcl_self, filename);
X
X exit(0);
X /* no return */
X}
X
X#ifdef ISI
X
X
X
X
X
X
X
X
X
X
X#endif
END_OF_FILE
if test 9253 -ne `wc -c <'dec3100.600/c/dec31_unixsave.c'`; then
echo shar: \"'dec3100.600/c/dec31_unixsave.c'\" unpacked with wrong size!
fi
# end of 'dec3100.600/c/dec31_unixsave.c'
fi
if test -f 'dec3100.600/h/dec3100.defs' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'dec3100.600/h/dec3100.defs'\"
else
echo shar: Extracting \"'dec3100.600/h/dec3100.defs'\" \(1407 characters\)
sed "s/^X//" >'dec3100.600/h/dec3100.defs' <<'END_OF_FILE'
X# /* copyright W. Schelter 1990 */
X# Machine dependent makefile definitions for dec 3100
X# akcl 505 worked under Ultrix V3.1C-0 (Rev. 42) with speed=0. -ie no -O
X# for the lisp files.
X
XLBINDIR=/usr/local/bin
X
XOFLAG =
XLIBS = -lm
XODIR_DEBUG= -g
XNULLFILE = ../h/twelve_null
XSHELL=/bin/sh
X
X# .IGNORE:
X
X# This CC string will be used for compilation of the system,
X# and also in the compiler::*cc* variable for later compilation of
X# lisp files.
X
X# also defined in `machine'.h file
X# The one here must be >= the one in the .h file.
X# It must be a multiple of 0x400000 greater that 0x400000 the
X# default text start.
XDBEGIN= c00000
X
X# If you don't plan on linking in a lot of other stuff
X# like maxima, you can increase the -G 8 to -G 800 or so.
X# That should be a bit faster..
X
XCC = cc -Olimit 798 -G 0 -I${AKCLDIR}/o
XLDCC = cc -G 0 -Wl,-D -Wl,${DBEGIN}
X
X# Where the original KCL distribution resides.
X
XMAINDIR = /usr/local/src/akcl/kcl
X
X# Enable the fastloading mechanism which does not use ld -A
X# requires c/rel_.. machine dependent code.
X
X# RSYM = rsym
X# SFASL = $(ODIR)/sfasl.o
X
X# When using SFASL it is good to have (si::build-symbol-table)
X# INITFORM=(si::build-symbol-table)
X# incremental loading with -A requires -G 0
XINITFORM=(setq compiler::*cc* "cc -G 0 ")(load "../lsp/setdoc.lsp")
X
X# Use symbolic links
XSYMB=-s
X
XMPFILES= ${MPDIR}/mpi.o ${MPDIR}/lo-sgi4d.o ${MPDIR}/libmport.a
X
XRANLIB= ar lts
X
END_OF_FILE
if test 1407 -ne `wc -c <'dec3100.600/h/dec3100.defs'`; then
echo shar: \"'dec3100.600/h/dec3100.defs'\" unpacked with wrong size!
fi
# end of 'dec3100.600/h/dec3100.defs'
fi
echo shar: End of shell archive.
exit 0