Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Nov 2007 01:36:20 GMT
From:      "Philip M. Gollucci" <pgollucci@p6m7g8.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/117933: src/lib/libcrypt: [PATCH]: include md5.h from the build not the running system
Message-ID:  <200711090136.lA91aKlU069054@www.freebsd.org>
Resent-Message-ID: <200711090140.lA91e1Z4070483@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         117933
>Category:       bin
>Synopsis:       src/lib/libcrypt: [PATCH]: include md5.h from the build not the running system
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 09 01:40:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Philip M. Gollucci
>Release:        FreeBSD 8.0-CURRENT
>Organization:
Riderway Inc.
>Environment:
FreeBSD philip.hq.rws 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Nov  6 16:28:12 EST 2007     pgollucci@philip.hq.rws:/usr/obj/usr/src/sys/RIDERWAY  i386

>Description:
Trying to setup ports-mgmt/tinderbox, no, its not a ports@ pr keep reading:

This requires a 'make buildworld' for 5-STABLE, 6-STABLE, 7-STABLE(tobe), and HEAD.

Typically people will do this from a recent version of FreeBSD soon to be 7.0-RELEASE.

The API of md5.h changed such that the installed one is no longer compatible with that in /usr/src of older FreeBSD releases

This just uncovers the bug this PR fixes.


>How-To-Repeat:
On a 7-BETAX or or 8-CURRENT, or maybe even 6-STABLE do:

mkdir -p /home/ncvs
sudo chown -R X /home/ncvs
sudo cvsup -g -L2 -r20 -h cvsup2.us.freebsd.org /usr/share/examples/cvsup/cvs-supfile

sudo rm -rf /usr/src
sudo mkdir /usr/src
sudo chown X /usr/src
export CVSROOT=/home/ncvs
cd /usr ; cvs -q co -R -rRELENG_5 src

cd lib/libcrypt
CC=/usr/local/bin/gcc34 ; make


cc -O2 -fno-strict-aliasing -pipe  -I/usr/src/lib/libcrypt/../libmd -I/usr/src/lib/libcrypt/../libutil -I/usr/src/lib/libcrypt -DHAS_DES -DHAS_BLOWFISH -Dauth_getval=__auth_getval -Dproperty_find=__property_find -Dproperties_read=__properties_read -Dproperties_free=__properties_free -DMD4Init=__MD4Init -DMD4Final=__MD4Final -DMD4Update=__MD4Update -DMD4Pad=__MD4Pad -DMD5Init=__MD5Init -DMD5Final=__MD5Final -DMD5Update=__MD5Update -DMD5Pad=__MD5Pad  -c /usr/src/lib/libcrypt/crypt-md5.c
cc -O2 -fno-strict-aliasing -pipe  -I/usr/src/lib/libcrypt/../libmd -I/usr/src/lib/libcrypt/../libutil -I/usr/src/lib/libcrypt -DHAS_DES -DHAS_BLOWFISH -Dauth_getval=__auth_getval -Dproperty_find=__property_find -Dproperties_read=__properties_read -Dproperties_free=__properties_free -DMD4Init=__MD4Init -DMD4Final=__MD4Final -DMD4Update=__MD4Update -DMD4Pad=__MD4Pad -DMD5Init=__MD5Init -DMD5Final=__MD5Final -DMD5Update=__MD5Update -DMD5Pad=__MD5Pad  -c /usr/src/lib/libcrypt/../libmd/md5c.c
/usr/src/lib/libcrypt/../libmd/md5c.c: In function '__MD5Update':
/usr/src/lib/libcrypt/../libmd/md5c.c:154: error: argument 'input' doesn't match prototype
/usr/include/sys/md5.h:46: error: prototype declaration
*** Error code 1

Stop in /usr/src/lib/libcrypt.


To fix this, apply the patch -- note, I'ved fixed it in
RELENG_5
RELENG_6
RELENG_7
HEAD


>Fix:
Apply patch

Patch attached with submission follows:

RELENG_5
Index: lib/libcrypt/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libcrypt/Makefile,v
retrieving revision 1.33.4.1
diff -u -r1.33.4.1 Makefile
--- lib/libcrypt/Makefile	13 Feb 2005 07:23:12 -0000	1.33.4.1
+++ lib/libcrypt/Makefile	9 Nov 2007 01:31:29 -0000
@@ -12,7 +12,7 @@
 		crypt-nthash.c md4c.c
 MAN=		crypt.3
 MLINKS=		crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
-CFLAGS+=	-I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
+CFLAGS+=	-I${.CURDIR}/../../sys -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
 
 # Pull in the strong crypto, if it is present.
 .if exists(${.CURDIR}/../../secure/lib/libcrypt) && !defined(NOCRYPT)


RELENG_6
Index: lib/libcrypt/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libcrypt/Makefile,v
retrieving revision 1.35.2.1
diff -u -r1.35.2.1 Makefile
--- lib/libcrypt/Makefile	22 Jul 2005 17:29:04 -0000	1.35.2.1
+++ lib/libcrypt/Makefile	9 Nov 2007 01:31:35 -0000
@@ -12,7 +12,7 @@
 		crypt-nthash.c md4c.c
 MAN=		crypt.3
 MLINKS=		crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
-CFLAGS+=	-I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
+CFLAGS+=	-I${.CURDIR}/../../sys -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
 
 # Pull in the strong crypto, if it is present.
 .if exists(${.CURDIR}/../../secure/lib/libcrypt) && !defined(NO_CRYPT)


RELENG_7
Index: lib/libcrypt/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libcrypt/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- lib/libcrypt/Makefile	21 May 2007 02:49:03 -0000	1.39
+++ lib/libcrypt/Makefile	9 Nov 2007 01:31:43 -0000
@@ -15,7 +15,7 @@
 		crypt-nthash.c md4c.c
 MAN=		crypt.3
 MLINKS=		crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
-CFLAGS+=	-I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
+CFLAGS+=	-I${.CURDIR}/../../sys -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
 
 # Pull in the strong crypto, if it is present.
 .if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no"


HEAD
Index: lib/libcrypt/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libcrypt/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- lib/libcrypt/Makefile	21 May 2007 02:49:03 -0000	1.39
+++ lib/libcrypt/Makefile	9 Nov 2007 01:31:54 -0000
@@ -15,7 +15,7 @@
 		crypt-nthash.c md4c.c
 MAN=		crypt.3
 MLINKS=		crypt.3 crypt_get_format.3 crypt.3 crypt_set_format.3
-CFLAGS+=	-I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
+CFLAGS+=	-I${.CURDIR}/../../sys -I${.CURDIR}/../libmd -I${.CURDIR}/../libutil
 
 # Pull in the strong crypto, if it is present.
 .if exists(${.CURDIR}/../../secure/lib/libcrypt) && ${MK_CRYPT} != "no"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711090136.lA91aKlU069054>