[comp.soft-sys.andrew] Can't get dynamic linking to work on sun4's

cwitty@csli.Stanford.EDU (Carl Witty) (07/24/90)

I'm trying to get andrew to compile here, and I seem to be having a
problem with dynamic loading in atk--that is, ez works fine, but help
and zip don't.  The symptoms are a core dump from an illegal
instruction. I don't have the version of gdb mentioned that
understands about dynamic loading (where can I get it?); without that,
I can't tell too much about the problem.  trace(1) shows runapp
loading in the proper object files, and a backtrace from the core dump
shows several stack frames in the 0xff... range that seem to be from a
dynamically loaded module--they're after etext, so it seems like the
load is at least partially working.

The only unusual things about our setup are that we're
running AFS 3.0 and we're trying to build just about everything.

Has anybody seen this before?  Does anybody have any ideas for
debugging it?

Sun 4/110, SunOS 4.0.3, andrew patchlevel 5

I fixed two Imakefiles so that they required librauth.a only when
AFS30_ENV was not defined, and changed the Imakefile in
.../atk/console/cmd to undefine AFS_ENV, since libcont.a didn't come
with AFS 3.0; I don't think either of these changes could have caused
this problem.

A backtrace from a core dump from help follows:
(gdb) run
Starting program: /afs/ir.stanford.edu/sun4_40/local/andrew/bin/help
Starting help (Version 7.2, ATK 14.6); please wait...

Program received signal 4, Illegal instruction
0x102424 in ?? ()
(gdb) where
#0  0x102424 in ?? ()
#1  0xff5f4 in ?? ()
#2  0xff714 in ?? ()
#3  0xff5f4 in ?? ()
#4  0xff714 in ?? ()
#5  0xff5f4 in ?? ()
#6  0xff714 in ?? ()
#7  0xff5f4 in ?? ()
#8  0xff714 in ?? ()
#9  0xff5f4 in ?? ()
#10 0xff714 in ?? ()
#11 0xff5f4 in ?? ()
#12 0xff714 in ?? ()
#13 0xff5f4 in ?? ()
#14 0xff390 in ?? ()
#15 0xfd3d4 in ?? ()
#16 0xfde64 in ?? ()
#17 0x2ad8 in main (...) (...)

The site.mcr and site.h that I used are as follows:
site.mcr:
/* Empty site.mcr file.  Use this file to hold all */
/* your site's changes to allsys.mcr and system.mcr. */


#ifdef AFS_ENV
/* AFSBASEDIR should point to the top of an AFS installation. */
/* Thus, $(AFSBASEDIR)/lib/afs $(AFSBASEDIR)/include/afs should both exist. */
/* for historical reasons the default is set to /usr/andy; */
/* if you need to change this setting, you can do so in site.h . */
        AFSBASEDIR = /usr/afsws
#endif /* AFS_ENV */

/* XUTILDIR is for programs that have been installed in some place other */
/* than the standard location - the ITC uses it for 'makedepend' and 'imake' */
        XUTILDIR = /usr/bin/X11

/* For attempting to debug andrew on sun4's: */
       CDEBUGFLAGS = -g

/* Sparc versions of /bin/sh core dump during the build */
       SHELL = /bin/bash

site.h:
/* Empty site.h file.  Use this file to hold all */
/* your site's changes to allsys.h and system.h. */

/* Defined if building for use with the Andrew File System (Vice) */
#define AFS_ENV	1

/* Defined if you have version 3.0 of the Andrew File System, including
  the protection server */
#define AFS30_ENV 1

/* Defined if building ODA and the ODA Translators */
#define ODA_ENV 1

/* Defined if you want to build the Andrew Message System (AMS) */
#define AMS_ENV	1

/* Defined if building code to deal with AMDS (AMS Delivery System) anywhere */
#define AMS_DELIVERY_ENV	1

/* Defined if we expect to run AMDS (AMS Delivery System) at this site.  This option affects only the default option values in mail system configuration, in the files andrew/overhead/util/lib/svcconf.c and andrew/overhead/mail/lib/mailconf.c . */
#define RUN_AMDS_ENV	1

/* Defined for building with the White Pages */
#define WHITEPAGES_ENV	1

/* Defined if building for use with Snap (remote messageservers) */
#define SNAP_ENV    1

/* Defined if you are using the Andrew/CMU printing software */
#define ANDREW_PRINTING_ENV 1

/* Software Levels: (Set to highest number you want to build) */
/* ############ FIX COMMENTS HERE ############ */
#define LEVEL_ENV 4
#define MK_BLD_BLKS	1
#define MK_BASIC_UTILS	1
#define MK_BASIC_INSETS	1
#define MK_HELP		1
#define MK_TEXT_EXT	1
#define MK_AUTHORING	1
#define MK_AUX_UTILS	1
#define MK_AUX_INSETS	1
#define MK_EXAMPLES	1

/* Defined if you have ditroff */
#undef DITROFF_ENV

/* Define this if you want to build the contributed software
   (in ./contrib/*). */
/* #define CONTRIB_ENV 1 */

/* Defined if you want to use links when installing the system */
#undef LINKINSTALL_ENV

/* Defined to be the default ``ANDREWDIR'' value, where users will see */
/* the final result of the Andrew installation. */
#undef	DEFAULT_ANDREWDIR_ENV
#define DEFAULT_ANDREWDIR_ENV /afs/ir.stanford.edu/@sys/local/andrew

Carl Witty
cwitty@cs.stanford.edu