Subject: Re: netbsd-4 can't build itself (at least not with -static)
To: NetBSD-current Users's Discussion List <current-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 02/16/2007 18:58:32
At Fri, 16 Feb 2007 15:00:45 -0500,
Me-weird.com wrote:
> 
> #      link  cksum/cksum
> cc -O -static  -o cksum cksum.lo crc.lo md2.lo md4.lo md5.lo sha1.lo rmd160.lo print.lo sum1.lo sum2.lo sha256.lo sha384.lo sha512.lo -L/build/woods/once/netbsd-4-i386-i386-ppro-obj/building/work/woods/m-NetBSD-4/tools/compat -lnbcompat -lz
> /usr/lib/libc.a(sha2.o): In function `SHA512_Last':
> /building/work/woods/m-NetBSD-4/lib/libc/../../common/lib/libc/hash/sha2/sha2.c:869: multiple definition of `SHA512_Last'
> /build/woods/once/netbsd-4-i386-i386-ppro-obj/building/work/woods/m-NetBSD-4/tools/compat/libnbcompat.a(sha2.lo):sha2.c:(.text+0xa76): first defined here
> ld: Warning: size of symbol `SHA512_Last' changed from 496 in /build/woods/once/netbsd-4-i386-i386-ppro-obj/building/work/woods/m-NetBSD-4/tools/compat/libnbcompat.a(sha2.lo) to 460 in /usr/lib/libc.a(sha2.o)

Could this be a valid fix?

Index: sha2.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/common/lib/libc/hash/sha2/sha2.c,v
retrieving revision 1.2
diff -u -c -r1.2 sha2.c
cvs diff: conflicting specifications of output style
*** sha2.c	1 Nov 2006 11:29:08 -0000	1.2
--- sha2.c	16 Feb 2007 23:55:03 -0000
***************
*** 338,343 ****
--- 338,344 ----
  
  __weak_alias(SHA512_Init,_SHA512_Init) 
  __weak_alias(SHA512_Update,_SHA512_Update)
+ __weak_alias(SHA512_Last,_SHA512_Last)
  __weak_alias(SHA512_Final,_SHA512_Final)
  __weak_alias(SHA512_Transform,_SHA512_Transform)
  #endif

 

But if so it would seem I'll have to rebuild at least the netbsd-4
libc.a for this system on a different system....  Hmmm... that's easy
enough to try I guess since the netbsd-3 system I did the first build on
still has the object tree....

-- 
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>