Subject: Re: shared libraries, slow progress, static links
To: None <port-pmax@NetBSD.ORG>
From: Erik Bertelsen <erik@sockdev.uni-c.dk>
List: port-pmax
Date: 12/06/1996 16:36:39
In a preparation to make a full install, I would ensure that I would
not kill my machine by making the programs in /bin unusable.

In one case, I get the problem illustrated below:

$ cc -o sh *.o -ll -ledit -ltermcap -static
ld: bfd assertion fail elf32-mips.c:4444
$ cc -o sh *.o -ll -ledit -ltermcap
$

These commands have been executed by hand in /usr/src/bin/sh/obj.pmax,
but the essence is that sh cannot link statically, but it can be linked
dynamically !! The statically liked sh cannot run, but the dynamically
linked sh can.

I have recompiled all sources (incl. libraries) going into linking sh,
and I have recompiled gcc and binutils. If I link without "-l -ledit
-ltermcap", I get a lot of messages related to missing externals, but
I still get the bfd assertion. This leads me to think that one of
sh's .c files is not compiled correctly.

I did not see this problem with other programs in /usr/src/bin, but as
I wanted be sure not to destroy the possibility of running the machine
in single user mode to repair damages introduced by having shared
libraries, I'm stuck.

- Erik Bertelsen