Subject: Re: How to recover a messed up userland?
To: None <tech-userlevel@NetBSD.org>
From: Christopher W. Richardson <cwr@nexthop.com>
List: tech-userlevel
Date: 06/06/2004 06:40:00
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Manuel Bouyer <bouyer@antioche.eu.org> writes:

> Could it be that you have a library around with a highter major
> number than the one in 1.6.2 ?

This does not seem to be an unreasonable guess, particularly if
any of the library major version numbers bumped on the 1.6 branch
post 1.6.2.  I'm not entirely sure how to check this.  I did

tar -ztvf base.tgz | grep usr/lib/ | grep -v "\->"

on both base.tgz and comp.tgz, and manually confirmed that there
was no /usr/lib/*.so.x.y with a greater x for any of the results,
and that is true.  But I'm not sure I'm catching everything.  Is
there an easy (or at least sure, if not easy) way to check this?

> You can also try a make -dA, to see which command exactly is
> failing.

It happens in two spots (during kernel compile):

+ cc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -Di386 -I../../. -I../../../../../../arch -I../../../../../.. -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/src/sys/arch/i386/compile/ACHILLES/lib/compat/../../../../../../compat/common/kern_ipc_10.c -o kern_ipc_10.o.o -D_KERNEL -D_KERNEL_OPT   -c"
Result is "cc\ -ffreestanding\ \ -O2\ -Werror\ -Wall\ -Wno-main\ -Wno-format-zero-length\ -Wpointer-arith\ -Wmissing-prototypes\ -Wstrict-prototypes\ -Wno-uninitialized\ -Di386\ -I../../.\ -I../../../../../../arch\ -I../../../../../..\ -nostdinc\ -DLKM\ -DMAXUSERS=32\ -D_KERNEL\ -D_KERNEL_OPT\ \ \ -c"
Applying :D to ""
Result is ""
Applying :D to ""
Result is ""
 recheck(kern_ipc_10.o): current update time: 20:06:13 Jun 03, 2004
Examining libcompat.a...non-existent...library...out-of-date.
libcompat.a:> = compat_exec.o
libcompat.a:? = compat_exec.o
[...]
+ [ -z ]
+ PS1=cwr@achilles$
+ NM=nm+ tsort -q
 lorder compat_exec.o compat_util.o kern_exit_43.o kern_info_43.o kern_resource_43.o kern_sig_43.o tty_43.o uipc_syscalls_43.o vfs_syscalls_43.o vm_43.o kern_info_09.o kern_xxx_12.o vfs_syscalls_12.o vm_12.o kern_sig_13.o sysv_ipc_14.o sysv _msg_14.o sysv_shm_14.o sysv_sem_14.o kern_ipc_10.o
7118: not found


+ cc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-uninitialized -I../../../../../../lib/libkern/arch/i386 -Di386 -I../../. -I../../../../../../arch -I../../../../../.. -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/src/sys/arch/i386/compile/ACHILLES/lib/kern/../../../../../../lib/libkern/_que.c -o _que.o.o
alized\ -I../../../../../../lib/libkern/arch/i386\ -Di386\ -I../../.\ -I../../.. /../../../arch\ -I../../../../../..\ -nostdinc\ -DLKM\ -DMAXUSERS=32\ -D_KERNEL\ -D_KERNEL_OPT\ \ \ \ -c"
Applying :D to ""
Result is ""
Applying :D to ""
Result is ""
 recheck(_que.o): current update time: 20:06:20 Jun 03, 2004
Examining libkern.o...Searching for libkern.o...failed.
non-existent...modified before source...out-of-date.
libkern.o:> = __main.o
libkern.o:? = __main.o
[...]

+ NM=nm+ tsort lorder -q __main.o
 __assert.o imax.o imin.o lmax.o lmin.o max.o min.o ulmax.o ulmin.o byte_swap_2.o byte_swap_4.o bswap64.o bcmp.o bzero.o ffs.o memchr.o memcmp.o memcpy.o memmove.o memset.o strcat.o strchr.o strcmp.o strcasecmp.o strcpy.o strlen.o strncasecmp.o strncmp.o strncpy.o strtoul.o strrchr.o scanc.o skpc.o random.o adddi3.o anddi3.o ashldi3.o ashrdi3.o cmpdi2.o divdi3.o iordi3.o lshldi3.o lshrdi3.o moddi3.o muldi3.o negdi2.o notdi2.o qdivrem.o subdi3.o ucmpdi2.o udivdi3.o umoddi3.o xordi3.o __cmsg_alignbytes.o inet_addr.o intoa.o md4c.o md5c.o sha1.o pmatch.o _que.o
7118: not found

Note the odd line starting with

alized\

in the second example.  I got the above from

make -dA 2>&1 | split

I'm not sure if that's a problem with buffering, or what, but
... it's what I got.

As always, any suggestions are appreciated.

Thanks,
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (NetBSD)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQFAwvR+P65RBOOHTzERArvbAJ9Cz7v0iL8lRGIx8XAmH6S57OZ5HACgzMUZ
ZRT4M5JQDWKPItI44eOQY34=
=nlO8
-----END PGP SIGNATURE-----