problem ld'ing the gnu "temacs" program under ultrix 4.1

L Murphy murphy at dccs.upenn.edu
Wed Dec 5 09:13:48 AEST 1990


[Please respond via email -- I don't read these groups regularly]

Btw, i don't read gnu.emacs normally, and there weren't very many
messages in it, so I'm not sure this is the appropriate place for my
message.  If it isn't, please suggest the appropriate group.

Enviroment: DECstation 3100 (MIPS) running
ULTRIX V4.1 (Rev. 52)
UWS V4.1 (Rev. 197)
Making gnu emacs version 18.55

config.h contains:
#include "s-bsd4-3.h"
#include "m-pmax.h"
#define HAVE_X_WINDOWS
#define X11

Problem:
ld fails when making temacs with this command:

ld  -X -D 800000 -o temacs pre-crt0.o /lib/crt0.o dispnew.o scroll.o \
xdisp.o window.o  term.o cm.o x11term.o x11fns.o  emacs.o keyboard.o \
macros.o keymap.o sysdep.o  buffer.o filelock.o insdel.o marker.o  \
minibuf.o fileio.o dired.o filemode.o  cmds.o casefiddle.o indent.o search.o \
regex.o undo.o  alloc.o data.o doc.o editfns.o callint.o  eval.o fns.o \
print.o lread.o  abbrev.o syntax.o unexmips.o mocklisp.o bytecode.o  \
process.o callproc.o   doprnt.o termcap.o tparam.o lastfile.o alloca.o \
malloc.o   -lX11    -lc

ld:
/lib/libX11.a(XvmsAlloc.o): malloc: multiply defined
/lib/libX11.a(XvmsAlloc.o): realloc: multiply defined
/lib/libX11.a(XvmsAlloc.o): free: multiply defined
*** Error code 1

Stop.

Have any of you seen this problem?
Has anyone successfully compiled emacs 18.55 under Ultrix 4.1?
Any suggestions about how to get around the problem?
Is it a problem with emacs, Ultrix, or just the way the ld is attempted?

I tried to use the -S option on the ld command to suppress non-fatal
errors, but still got the error.

I'm not sure why (or even if) XvmsAlloc.o re-defines these basic
routines.  To see if it was a problem inherent in libX11.a, I created
a simple C program that didn't use any library calls and loaded it
with -lX11 and -lc since these are used by the gnu makefile.  I got NO
error.

I always thought that if there were more than one copy of a routine,
then the ld program would take the first one it found and ignore the
rest.  Is something else going on here?

I used the nm command to dump the name list of /lib/libX11.a.  I found
that there is a module called XvmsAlloc.o in it.  Here is some of the
output of nm:

:
00000610 T free
:
:  [lots of other names deleted]
00000344 T malloc
:
:  [ more names deleted ]
00000678 T realloc
:

According to the man page for nm, the N and T and U mean this:

          N    nil storage class, compiler internal usage
          T    external text
          U    external undefined

I don't understand the difference between N, T and U.

I'm not sure it's significant that in _all_other_ modules of libX11
the malloc, free, and realloc names appear as either N or U but never
as T.

Any clues?

--lam



More information about the Comp.unix.ultrix mailing list