From: negaard@aero.org (Eric Negaard)
Subject: Problem with ld?
Organization: The Aerospace Corporation, El Segundo, CA
Date: Wed, 29 Jul 1992 17:53:14 GMT

I'm having some problems compiling/linking uucp from the mailpak-1.2
sources.  I've only had Linux running for a couple of weeks now, so maybe
I've just got something mis-configured, though I've succesfully compiled
and linked a few small programs to date.

The problem is that ld (from the GCC2.2.2 binutils.tar.Z) complains about
"nonexternal relocation code invalid in FILE".  Exactly which FILE it
complains about changes from invocation to invocation.  For example: when I
run make in the uucp directory, it compiles a bunch of .c files to .o
files, then tries to link them into uucico.  Ld complains: "nonexternal
relocation code invalid in file.o".  So I remove file.o, re-run make, which
recompiles file.c.  This time, when linking uucico, it complains
"nonexternal relocation code invalid in sysinf.o".  Next I rebuilt ALL of
the .o files and when linking got "nonexternal relocation code invalid in
port.o".  On one final run, ld failed completely with:
"gcc: Internal compiler error: program ld got fatal signal 11"

I'm very confused; does anyone have any ideas about what might
be causing this?

		Thanks in advance for any help,

			Eric Negaard

Here is a script showing the mis-behavior:

# make uucico
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  uucico.c
gcc -Wall -Wshadow -Wwrite-strings -O6   -c prot.c -o prot.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c protg.c -o protg.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c protf.c -o protf.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c prott.c -o prott.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c prote.c -o prote.o
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  config.c
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  v2.c
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  bnu.c
gcc -Wall -Wshadow -Wwrite-strings -O6   -c file.c -o file.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c util.c -o util.o
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  sysinf.c
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  prtinf.c
gcc -Wall -Wshadow -Wwrite-strings -O6   -c time.c -o time.o
time.c: In function `qttime_parse':
time.c:317: warning: comparison between signed and unsigned
gcc -Wall -Wshadow -Wwrite-strings -O6   -c log.c -o log.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c chat.c -o chat.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c port.c -o port.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c tcp.c -o tcp.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c parse.c -o parse.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c copy.c -o copy.o
gcc -c -Wall -Wshadow -Wwrite-strings -O6 -DLIBDIR=\"/usr/lib/uucp\" -DNEWCONFIGLIB=\"/usr/lib/uucp\" -DOLDCONFIGLIB=\"/usr/lib/uucp\"  -DOWNER=\"uucp\" sys1.c
In file included from /usr/include/unistd.h:189, from sys1.c:229:
/usr/include/utime.h:15: warning: declaration of `times' shadows global declaration
sys1.c: In function `isysdep_process_time':
sys1.c:1063: warning: declaration of `stime' shadows global declaration
sys1.c: In function `iswait':
sys1.c:2199: warning: implicit declaration of function `waitpid'
gcc -Wall -Wshadow -Wwrite-strings -O6   -c sys2.c -o sys2.o
In file included from /usr/include/unistd.h:189, from sys2.c:257:
/usr/include/utime.h:15: warning: declaration of `times' shadows global declaration
gcc -Wall -Wshadow -Wwrite-strings -O6   -c sys3.c -o sys3.o
In file included from /usr/include/unistd.h:189, from sys3.c:182:
/usr/include/utime.h:15: warning: declaration of `times' shadows global declaration
gcc -Wall -Wshadow -Wwrite-strings -O6   -c sys4.c -o sys4.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c version.c -o version.o
gcc -Wall -Wshadow -Wwrite-strings -O6   -c getopt.c -o getopt.o
getopt.c: In function `_getopt_internal':
getopt.c:422: warning: implicit declaration of function `strncmp'
getopt.c:414: warning: `indfound' may be used uninitialized in this function
gcc -Wall -Wshadow -Wwrite-strings -O6 -o uucico uucico.o prot.o protg.o protf.o prott.o prote.o config.o v2.o bnu.o file.o util.o sysinf.o prtinf.o time.o log.o chat.o port.o tcp.o parse.o copy.o sys1.o sys2.o sys3.o sys4.o version.o getopt.o  
ld: nonexternal relocation code invalid in port.o
make: *** [uucico] Error 1
# rm port.o
/bin/rm: remove `port.o'? y
# make uucico
gcc -Wall -Wshadow -Wwrite-strings -O6   -c port.c -o port.o
gcc -Wall -Wshadow -Wwrite-strings -O6 -o uucico uucico.o prot.o protg.o protf.o prott.o prote.o config.o v2.o bnu.o file.o util.o sysinf.o prtinf.o time.o log.o chat.o port.o tcp.o parse.o copy.o sys1.o sys2.o sys3.o sys4.o version.o getopt.o  
gcc: Internal compiler error: program ld got fatal signal 11
make: *** [uucico] Error 1
# which ld
ld is /usr/bin/ld
# l /usr/bin/ld
-rwxr-xr-x   1 root     root        54272 May 17 19:14 /usr/bin/ld*
Newsgroups: comp.os.linux