[comp.soft-sys.andrew] Problems with Andrew on Sun SS-1

kgorlen@nih-csl.UUCP (Keith Gorlen) (02/27/90)

I'm having problems installing Andrew R3 (patch level 3) on a SPARCstation-1 running SUNOS 4.0.3c, X11R4 (fixes 1 and 2 installed), and the beta test release of AFS 3.0.  Copies of my site.mcr and site.h files are attached.  When built in this environment, few things work.  ez brings up a window and can do primitive editing operations, and I could insert an eq object, but it crashes if I try to insert a zip object.  Most other applications (e.g. help, console, ezprint, ness) just dump core after printing o


ut the "Starting ..." message but before bringing up a window.

I had in my notes from previous experiences with building andrew the following problems that have apparently not been corrected yet, so I made these changes:

ams/ms/Imakefile shouldn't explicitly use libplumber.a:

LIBS_PART_B= \
	${BASEDIR}/lib/libmail.a \
	${BASEDIR}/lib/liberrors.a \
	${UTILLIB} ${PRSLIB} \
	${MALLOCLIB} \
	${BASEDIR}/lib/libgasp.a \
	${RESOLVLIB}

Correct the modes on the following files (I don't own the files in the andrew source tree I'm using):

chmod 0444 atk/chart/chart.ch
chmod +r atk/supportviews/{strtbl.c,strtbl.ch,strtblv.c,strtblv.ch}
chmod +r atk/apt/apt/{apt.ch,aptv.ch}
chmod +r atk/apt/tree/{tree.ch,treev.ch}
chmod +r atk/calc.ch calcv.ch
chmod +r atk/eq/eqv.c
chmod +r atk/lookz/{lookz.c,lookz.ch,lookzt.c,lookzv.c,lookzv.ch,lookzvt.c}
chmod +r overhead/class/machdep/aix_i386/{dofix.c,doload.c,entry.spp,getlist.awk}

First, I tried building andrew with AFS_ENV and AFS30_ENV enabled, but this apparently hasn't been tested because expected files are missing from the AFS 3.0 distribution.  Four of the missing files looked like their names had been changed due to the change from "pr" to "pt" for the protection server.  As a workaround, I turned off SNAP_ENV, disabled making vopcon, and made these links in /usr/afs/include/afs:

	ln ptclient.h prclient.h
	ln pterror.h prerror.h
	ln ptint.h print.h
	ln ptserver.h prserver.h

But I gave up when compiling overhead/util/lib/alquery.c failed with undefined symbols.

Next, I tried making a non-AFS version of andrew.  I discovered that the version of install supplied with AFS 3.0 doesn't work.  The command

	install -c -m 0555 makedo.csh /usr/andrew/bin/makedo

creates the directory /usr/andrew/bin/makedo and places makedo.csh in it instead of copying makedo.csh to /usr/andrew/bin/makedo.

After switching to /usr/bin/install, building andrew seemed to work except that (1) I had to recover several times from the infamous Sun-4 "sh" problem, (2) I couldn't get the ness documentation installed because ness would dump core, and (3) I couldn't build parts of amsatk and contrib/wpedit because dofix failed with unresolved symbols.

Problem (2) is probably caused by whatever is causing most of the other andrew applications to die.  I recall reading that there were problems with the andrew version of malloc on the Sun-4, and also something about needing to statically link some libraries somehow, but I don't recall the details.  Were these fixed in patch 3, or could they be the source of my difficulties?

I suspect problem (3) is due to the way I was trying to link in a version of libc containing the DNS resolver routines, since the unresolved symbols looked like they were from the resolver.  I had set LD_LIBRARY_PATH to substitute the resolver version of libc.so.1.3 we had obtained from uunet instead of the libc.so supplied with SunOS 4.0.3.  It looks like the problem may be that dofix and doload get their symbol tables from libc.a, not libc.so, so they don't know about the resolver routines.  Unfortunatel


y, I don't have a resolver version of libc.a.  I tried modifying sun_sparc/Makefile to generate the globals from the resolver libc.so instead of libc.a, but then the testmain program couldn't seem to find even things like _print.

Any help or advice on these problems would be greatly appreciated.  Thanks!

	Keith Gorlen			phone: (301) 496-1111
	Building 12A, Room 2033		uucp: uunet!nih-csl!kgorlen
	National Institutes of Health	Internet: kgorlen@alw.nih.gov
	Bethesda, MD 20892

-----
site.mcr:
	AFSBASEDIR = /usr/afs
	XUTILDIR = /usr/bin/X11
	IMAKE = $(XUTILDIR)/imake
	XMAKEDEPEND = $(XUTILDIR)/makedepend

/* Don't use /usr/afs/bin/install */
	INSTALL = /usr/bin/install

/* -O doesn't work */
	CDEBUGFLAGS =

site.h:
#undef	AMS_DELIVERY_ENV
#define	AMS_DELIVERY_ENV 1

#undef	WHITEPAGES_ENV
#define	WHITEPAGES_ENV 1

#undef	ODA_ENV
#define	ODA_ENV 1

#undef	CONTRIB_ENV
#define	CONTRIB_ENV 1

#undef	MK_BASIC_UTILS
#define	MK_BASIC_UTILS 1

#undef	MK_AUTHORING
#define	MK_AUTHORING 1

#undef	MK_AUX_UTILS
#define	MK_AUX_UTILS 1

#undef	MK_EXAMPLES
#define	MK_EXAMPLES 1

#undef	LINKINSTALL_ENV

#undef	AFS_ENV
/* #define	AFS_ENV 1 */
#undef	AFS30_ENV
/* #define	AFS30_ENV 1 */

/* Can't build snap with AFS until we find lib/afs/librauth.a */
#undef	SNAP_ENV
#ifndef	AFS_ENV
#define	SNAP_ENV 1
#endif

#undef	RUN_AMDS_ENV
#define	RUN_AMDS_ENV 1

#undef	DEFAULT_LOCALDIR_ENV
#define DEFAULT_LOCALDIR_ENV /usr/andrew/local
-- 
	Keith Gorlen			phone: (301) 496-1111
	Building 12A, Room 2033		uucp: uunet!nih-csl!kgorlen
	National Institutes of Health	Internet: kgorlen@alw.nih.gov
	Bethesda, MD 20892

tom@icase.edu (Tom Crockett) (02/27/90)

Excerpts from info-andrew: 26-Feb-90 Problems with Andrew on Sun.. Keith
Gorlen@uunet.uu.ne (5216)

>  ez brings up a window and can do primitive editing operations, and I
> could insert an eq object, but it crashes if I try to insert a zip
> object.  Most other applications (e.g. help, console, ezprint, ness)
> just dump core after printing out the "Starting ..." message but before
> bringing up a window.

>  (1) I had to recover several times from the infamous Sun-4 "sh"
> problem, (2) I couldn't get the ness documentation installed because
> ness would dump core

Finally, somebody has run into the same problems I had!!!  I was
beginning to think our system was just corrupted or something.  I had
exactly the same behavior you describe for these three cases.  I didn't
see the dofix problems, though.  (I don't have AFS and didn't try to
build WP.)  

Here's what I did.  For the core dump problems (most of the apps and
nessrun), I modified two Makefiles after running "make Makefiles" but
before running "make dependInstall".

    The following Makefiles need to be edited manually to add a -Bstatic
    option for linking:

    AS/atk/apps/Makefile

        runapp:  runapp.o statload.o  ${ATKLIBS} ${OTHERLIBS}
                $(RM) $@
        $(CC) $(CFLAGS) -Bstatic -o $@  runapp.o statload.o ${ATKLIBS}
        ${OTHERLIBS}  ${SYSLIBS}

    AS/atk/ness/objects/Makefile

        nessrun:  nessrun.o ${NESSOBJS} nessmark.o  nesssym.o  
        ../tokens/libtokens.a ${LIBS}
                $(RM) $@
                $(CC) $(CFLAGS) -Bstatic -o $@  nessrun.o ${NESSOBJS}
        nessmark.o  nesssym.o   ../tokens/libtokens.a ${LIBS}  -lm


Everything ran fine after that.  It turns out that it's sufficient to
link just -lm  statically, but I did some experimentation, and found
that my typical desktop used about 900K less memory if I linked all of
the libraries  statically for runapp!  I posted my experiences with this
to info-andrew a couple of days ago;  I'll forward you a copy of that.

As for the problem with sh dumping core, I slashed my environment
variables back to the bare (and I do mean bare) minimum before starting
"make dependInstall".  I unsetenv everything except USER, HOME, SHELL,
and then do set path=( /usr/ucb /usr/bin ).  I have yet to see sh dump
core with this bare bones environment.  I've also found it helpful to do
the build on a lightly loaded machine to prevent occasional failures of
as and ccom.

Tom Crockett

ICASE
Institute for Computer Applications in Science and Engineering

M.S. 132C				e-mail:  tom@icase.edu
NASA Langley Research Center		phone:  (804) 864-2182
Hampton,  VA  23665-5225
                                                                           

ghoti+@andrew.cmu.edu (Adam Stoller) (02/28/90)

Excerpts from internet.info-andrew: 27-Feb-90 Re: Problems with Andrew
on.. Tom Crockett@icase.edu (2599+0)

> The [..] Makefiles need to be edited manually to add a -Bstatic option
> for linking:


Have you tried something of the form:

make dependInstall DEFINES=-Bstatic

I'm not absolutely positive that it works - but I believe the make
variable 'DEFINES' is included in CFLAGS, and hence you wouldn't need to
edit the Makefiles.

If this is true - then either:
(a) the specific system.mcr file should be changed [here] to include
-Bstatic as part of STD_DEFINES, or
(b) you should add the DEFINES=-Bstatic to your site's site.mcr

--fish

janssen@parc.xerox.com (Bill Janssen) (02/28/90)

[ Keith Gorlen sends a nicely detailed bug report... ]

On a SparcStation-1, I'd suggest building without AFS, using
`CCDEBUGFLAGS = -g' or `-O1' (the default on a SparcStation is -O2,
which is known to be broken), and statically linking `-lm' (a la Tom
Crockett, message <AZt0Dqr0_csmJfnV9c@sparc01.icase.edu>).

Bill

wjh+@ANDREW.CMU.EDU (Fred Hansen) (03/01/90)

Excerpts from internet.info-andrew: 26-Feb-90 Problems with Andrew on
Sun.. Keith Gorlen@uunet.uu.ne (5215)

>  I recall reading that there were problems with the andrew version of
> malloc on the Sun-4

The version of Andrew malloc on the original distribution contains all
the fixes needed for SUN4.  As far as I know it is working fine now.  (I
trust someone will let me know if it's not.)

Fred Hansen