Subject: Re: Compiling tools/cksum fails
To: Ossi Herrala <>
From: Luke Mewburn <>
List: current-users
Date: 05/15/2002 13:59:41
On Tue, May 14, 2002 at 11:41:38PM +0300, Ossi Herrala wrote:
  | I have -current downloaded few hours ago and I'm trying to build it with

The files md2.h and rmd160.h exist somewhere in the include search path
(most likely /usr/include), but your c library doesn't implement the
appropriate functions.

This problem is usually caused by doing a "make includes" in /usr/src
directly to /, so you have -current includes and an old library.
This is a Bad Thing.

When upgrading an older system to -current using, you should
build a release into a destdir (see -D ... and -R ... ), and then
extract the generated sets from <releasedir>/binary/sets/ into /, thus
ensuring that your include files, libraries, and programs are upgraded
in sync.

To solve your current problem, remove /usr/include/md2.h and


  | Building fails in tools/cksum saying:
  | cc -O -I/usr/src/tools/compat/obj.i386
  | -I/usr/src/tools/compat/obj.i386/include  -I/usr/src/tools/cksum/../compat
  | -DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64    -o cksum cksum.lo crc.lo md2.lo
  | md4.lo md5.lo sha1.lo rmd160.lo print.lo sum1.lo sum2.lo
  | -L/usr/src/tools/compat/obj.i386 -lnbcompat -lutil -lz
  | cksum.lo(.data+0x18): undefined reference to `MD2File'
  | cksum.lo(.data+0x88): undefined reference to `RMD160File'
  | md2.lo: In function `MD2String':
  | md2.lo(.text+0x25): undefined reference to `MD2Data'
  | md2.lo: In function `MD2TimeTrial':
  | md2.lo(.text+0x9d): undefined reference to `MD2Init'
  | md2.lo(.text+0xb8): undefined reference to `MD2Update'
  | md2.lo(.text+0xd4): undefined reference to `MD2End'
  | md2.lo: In function `MD2Filter':
  | md2.lo(.text+0x1cc): undefined reference to `MD2Init'
  | md2.lo(.text+0x20b): undefined reference to `MD2Update'
  | md2.lo(.text+0x239): undefined reference to `MD2End'
  | rmd160.lo: In function `RMD160String':
  | rmd160.lo(.text+0x25): undefined reference to `RMD160Data'
  | rmd160.lo: In function `RMD160TimeTrial':
  | rmd160.lo(.text+0x9d): undefined reference to `RMD160Init'
  | rmd160.lo(.text+0xb8): undefined reference to `RMD160Update'
  | rmd160.lo(.text+0xd4): undefined reference to `RMD160End'
  | rmd160.lo: In function `RMD160Filter':
  | rmd160.lo(.text+0x1cc): undefined reference to `RMD160Init'
  | rmd160.lo(.text+0x20b): undefined reference to `RMD160Update'
  | rmd160.lo(.text+0x239): undefined reference to `RMD160End'
  | collect2: ld returned 1 exit status
  | *** Error code 1
  | I didn't find answer myself. Can someone help? I'm using NetBSD 1.5.3_RC2
  | (GENERIC) on i386.
  | -- 
  | Mr. Ossi Herrala | ossi.herrala \@! | Amateur radio: OH8HUB
  | Höylätie 7       | GSM: +358 40 750 7075   | IRC: ohub
  | 90800 Oulu       | |
  | :x

Luke Mewburn  <>
Luke Mewburn     <>
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system