Subject: Big troubles recompiling kernel under 1.1 / 1.0
To: None <amiga@NetBSD.ORG>
From: Frantisek Dufka <>
List: amiga
Date: 12/12/1995 23:06:41
Hi all,

I have really BIG troubles compiling kernel. I run NetBSD 1.1 with
GENERIC kernel on my A1200, 68030MMU/FPU, 28Mhz, 8MB of Fast RAM.

I made my own A1200 config file from GENERIC one in ....arch/amiga/conf, run
'config A1200', cd-ed to ../compile A1200, did 'make depend', 'make', but it
failed while making libkern.o.

It said something like :
ld: /usr/..idontknow../libkern.o(umoddi3.o) :nonexternal relocation invalid.

I installed whole 1.1 binary distribution and kernel sources (ksrc11.aa ..),
but nothing else. Is it enough ?

I had the same problem few months ago, while compiling 1.0 kernel, but nobody
was able to help me. I gave it up and waited for 1.1, but the problem is still
here. I really don't know what to do now. :(

When I tried to make 1.0 kernel under NetBSD 1.0 few months ago I installed
1.0 binary distribution and kernel sources (ksrc10.aa ...) also, and typed
this :

cd  /usr/src/sys/arch/amiga/conf GENERIC
cd ../compile/GENERIC
make depend

All went OK, all modules were compiled OK into *.o files (about 3 hours), but
finally when linker tried to link it all into 'netbsd' file, it said :

ld -x -n -T 0 -o netbsd -e start ${SYSTEM_OBJ} vers.o
ld: /usr/src/....idontknow.... fpsp.o :nonexternal relocation invalid.

Then I did my own file for without floating point support for 68040
(so probably without file fpsp.o) And it did exactly the same thing. All
modules were compiled OK, but at the end linker said :

ld: /usr/src/sys/lib/libkern/libkern.a(umoddi3.o): nonexternal relocation

That was months ago. I never solved this problem, so I never compiled any
kernel succesfully :(

Now I installed NetBSD 1.1 and tried to make 1.1 kernel but the very same
problem occured :(

It looks like 'ld' command from 2.4.5 cannot cope with linking object (*.o)
files into an object file (not executable) !!!

But that's very strange, why there's nobody having same problem? Everybody
pretend it's all right. Did nobody try to make kernel with plain 1.1/1.0
binary distribution (gcc 2.4.5) ? I can't believe it. What am I doing wrong ?

I also tried to use gcc-2.6.2 from ftp.uni-
Amiga/contrib to make *.o files while compiling libkern, but 'ld' failed with
the same result. It was the old ld, because there's no 'ld' executable in the
2.6.2 archive.

Then I tried to use ld from 2.7.0 under AmigaDOS, because it looks like the
format of GCC object files is same under NetBSD and AmigaDOS, to make
libkern.o, but even AmigaDOS ld command failed with the same error - umoddi3.o
: nonexternal relocation invalid.

I tried it many times and different ways, but I never succeeded.
Everything works fine until 'ld' is called in any stage of making kernel.

Does anyone know what's wrong ?
What does it mean "external relocation invalid" exactly ?
Can anyone help ?

Thanks for any response.

 Frantisek Dufka, age 21
 Computer Science student                     e-mail :
 Palacky University
 Czech Republic                 C64, A500, A1200 68030/28Mhz 8+2MB 1.2G HD

          Reality is for people who can't face science fiction