carter@ferrari.mst6.lanl.gov (Dave Carter) (09/21/90)
okay, i finally got Ultrix 4.0, and am ready to begin building andrew. a while ago, i was told that it'd be better to get Ultrix 4.0, because of missing library files in 3.2. i also remember reading discussions of much pain and grief trying to build andrew on decstations. is there a version out there with some of the various patches that people suggested, which will actually build and run on a decstation 3100 or 5000? if so, i'd be most grateful! - dave carter@mst6.lanl.gov
bernerus@BIRK.CS.CHALMERS.SE (Christer Bernerus) (09/21/90)
Excerpts from info-andrew: 21-Sep-90 building andrew on DecStati.. Dave Carter@bloom-beacon (491) > okay, i finally got Ultrix 4.0, and am ready to begin building andrew. > a while ago, i was told that it'd be better to get Ultrix 4.0, because > of missing library files in 3.2. > i also remember reading discussions of much pain and grief trying to > build andrew on decstations. is there a version out there with some > of the various patches that people suggested, which will actually > build and run on a decstation 3100 or 5000? if so, i'd be most > grateful! > - dave > carter@mst6.lanl.gov Since I've just done this, I think I should let you all know my experiences: First: If your'e working with many architectures you'll probably use shadow trees. Before creating the shadow trees, do the following (this will eliminate much trouble): Go to the source tree: make Makefiles - In order to be able to make Clean below. make Clean - Get rid of everything already compiled, install.* files etc. find . -name Makefile -o -name Makefile.BAK -exec rm {} \; -- I.e now get rid of all Makefiles etc. rm -f overhead/class/machdep/machine -- This is normally a symbolic link. Now you can create the shadow tree. Then make sure that the destination tree is clean. You now must create a libX11_G0.a. Copy the G0 libraries to /usr/andrew/lib/mips_G0: %mkdir /usr/andrew/lib/mips_G0 - or wherever your destination tree is. %cp /lib/libc_G0.a /usr/andrew/lib/mips_G0/libc.a %ranlib /usr/andrew/lib/mips_G0/libc.a -- Also copy /lib/libm_G0.a and /usr/lib/libX11_G0.a to /usr/andrew/lib/mips_G0, omitting the _G0. Edit overhead/class/machdep/dec_mips/makedo.csh and add a -L and a -G 0 flag to the ld command. This will ensure that the linker won't search any standard directories and possibly pick up some non-G0 code. Without the -G 0 flag, the linker might be tempted to create sbss sections. Do the same thing for the ld command in overhead/class/machdep/dec_mips/dofix.c. Next problem is that /lib/libc_G0.a doesn't contain errlst.o. The following C program, linked with /lib/libc.a will recreate the necessary C source errlst.c which then can be compiled with -G 0: #include <errno.h> extern int sys_nerr; extern char *sys_errlist[]; char * strerror(err) int err; { return sys_errlist[err]; } main() { int eno; printf("char *sys_errlist[] =\n{\n"); for(eno=0;eno<sys_nerr;eno++) { printf("\t\"%s\",\n",strerror(eno)); } printf("};\n\nint sys_nerr={ sizeof sys_errlist/sizeof sys_errlist[0] };\n"); } Next thing to fix is to include "ultrix" at the #ifdef line 1069 in atk/typescript/tscript.c You will also need to remove some lines in the file atk/console/stats/pmax_3/getstats.c All lines referring "rate.v_intr", "rate.v_syscall" and "rate.v_swtch" need to be commented out. This is because Ultrix 4 has moved these variables to a "cpudata" structure. I hope the ATK group will do this right sometimes. Also I have noted that the resolver routines are already in /lib/libc_G0.a so there's no need for a separate resolver library. Happy hacking Chris. ---------------------------------------------------------- Christer Bernerus (SM6FBQ) ! E-mail: bernerus@{cs,utc}.chalmers.se Chalmers University of Technology ! Phone: +46 31 721000 Department of Computer Science S-412 96 Gothenburg, SWEDEN