Subject: bootstrap pkgsrc failure on redhat 7.3
To: None <>
From: Russell McManus <>
List: tech-pkg
Date: 12/30/2003 11:12:52
I am trying unsuccessfully to bootstrap pkgsrc on a redhat 7.3 system.
There appears to be a problem with md5.h having incompatible
definitions.  I am using the latest bootstrap code from anoncvs.  I
have included the error message below.

It appears that md5.h on this system can not just be included; It
refers to some typedefs which are not defined in the file, and are not


contents of md5.h:

/* MD5.H - header file for MD5C.C

/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.

License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.

License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.

RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.

/* MD5 context. */
typedef struct {
  UINT4 state[4];                                   /* state (ABCD) */
  UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
  unsigned char buffer[64];                         /* input buffer */
} MD5_CTX;

void MD5Init PROTO_LIST ((MD5_CTX *));
void MD5Update PROTO_LIST
  ((MD5_CTX *, unsigned char *, unsigned int));
void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));

void hmac_md5 PROTO_LIST ((unsigned char *, int, unsigned char *, int, caddr_t));

Output of bootstrap:

===> Installing pkgtools
===> running: (cd pkg_install; env CPPFLAGS='-I../libnbcompat -I../../libnbcompat' LDFLAGS='-L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' /bin/sh ./configure --prefix=/usr/pkg --with-pkgdbdir=/var/db/pkg --mandir=/usr/pkg/man  --with-ftp=/usr/pkg/bin/ftp --with-pax=/usr/pkg/bin/pax --with-tar=/usr/pkg/bin/tar --with-mtree=/usr/pkg/sbin/mtree && /usr/pkg/bin/bmake && /usr/pkg/bin/bmake install)
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for ar... ar
checking for chmod... /bin/chmod
checking for cmp... /usr/bin/cmp
checking for cp... /bin/cp
checking for env... /usr/bin/env
checking for find... /usr/bin/find
checking for grep... /bin/grep
checking for ln... /bin/ln
checking for mkdir... /bin/mkdir
checking for rmdir... /bin/rmdir
checking for rm... /bin/rm
checking for sed... /bin/sed
checking for sort... /bin/sort
checking for touch... /bin/touch
checking for dbopen in -ldb1... yes
checking for library containing tgetent... -ltermcap
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking db1/db.h usability... yes
checking db1/db.h presence... yes
checking for db1/db.h... yes
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking md5.h usability... no
checking md5.h presence... yes
configure: WARNING: md5.h: present but cannot be compiled
configure: WARNING: md5.h: check for missing prerequisite headers?
configure: WARNING: md5.h: proceeding with the preprocessor's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to ##
configure: WARNING:     ## ------------------------------------ ##
checking for md5.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for chflags... no
checking for dbopen... yes
checking for tgetent... yes
checking for vfork... yes
checking for getrlimit... yes
checking for setrlimit... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating add/Makefile
config.status: creating admin/Makefile
config.status: creating create/Makefile
config.status: creating delete/Makefile
config.status: creating info/Makefile
config.status: creating lib/Makefile
config.status: creating view/Makefile
config.status: creating view/
config.status: creating view/
config.status: creating lib/config.h
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c exec.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c fexec.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c file.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c ftpio.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c global.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c lpkg.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c path.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c pen.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c pkgdb.c
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\" -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g -O2 -c plist.c
In file included from plist.c:46:
/usr/include/md5.h:27: parse error before `UINT4'
/usr/include/md5.h:27: warning: no semicolon at end of struct or union
/usr/include/md5.h:28: warning: data definition has no type or storage class
/usr/include/md5.h:30: parse error before `}'
/usr/include/md5.h:30: warning: empty declaration
/usr/include/md5.h:32: parse error before `PROTO_LIST'
/usr/include/md5.h:33: parse error before `PROTO_LIST'
/usr/include/md5.h:35: parse error before `PROTO_LIST'
/usr/include/md5.h:37: parse error before `PROTO_LIST'
*** Error code 1

bmake: stopped in /usr/pkgsrc/othersrc/bootstrap-pkgsrc/pkg_install/lib
*** Error code 1

bmake: stopped in /usr/pkgsrc/othersrc/bootstrap-pkgsrc/pkg_install
===> exited with status 1