From nobody@FreeBSD.org  Thu Sep 22 20:53:41 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 71BC7106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Sep 2011 20:53:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 62A538FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Sep 2011 20:53:41 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p8MKrfh5097940
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Sep 2011 20:53:41 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p8MKrfX5097922;
	Thu, 22 Sep 2011 20:53:41 GMT
	(envelope-from nobody)
Message-Id: <201109222053.p8MKrfX5097922@red.freebsd.org>
Date: Thu, 22 Sep 2011 20:53:41 GMT
From: Dewayne <phil@amdg.etowns.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: libarchive stops buildworld using WITHOUT_OPENSSL
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160922
>Category:       kern
>Synopsis:       [libarchive] libarchive stops buildworld using WITHOUT_OPENSSL
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kientzle
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 22 21:00:17 UTC 2011
>Closed-Date:    
>Last-Modified:  Sat Oct 22 22:30:11 UTC 2011
>Originator:     Dewayne
>Release:        8.2Stable as of 20110922
>Organization:
Heuristic Systems
>Environment:
FreeBSD hs1.hs 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Sep 17 14:39:33 EST 2011    root@hs1.hs:/usr/obj/basesystem/usr/src/sys/hqdev-smp-vga  i386 
>Description:
A buildworld is halted, when using WITHOUT_OPENSSL because libarchive is unable to find necessary include files /usr/include/openssl/sha.h and others.

The actual error below is a little misleading, as "cd /usr/src/lib/libarchive && make -DWITHOUT_OPENSSL" looks for sha1.h and sha2.h due to the WITHOUT_OPENSSL variable being set.

"mkdep -f .depend -a    -DSTRIP_FBSDID -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DPLATFORM_CONFIG_H=\"config_freebsd.h
c++ -O2 -pipe -g0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -march=core2 -tune=core2 -DIN_GLIBCPP_V3 -DHAVE_CONF
In file included from /usr/src/lib/libarchive/archive_read_support_format_xar.c:57:
/usr/src/lib/libarchive/archive_hash.h:122:20: error: sha1.h: No such file or directory
/usr/src/lib/libarchive/archive_hash.h:152:20: error: sha2.h: No such file or directory"

Unfortunately a similar problem with geom_eli was worked around by extracting the required files from the openssl package and placement under /usr/src.  In this case, the variable WITHOUT_OPENSSL prevents building libarchive, even when the required files are in /usr/include/openssl.

(Aside: Actually /etc/src.conf contains WITHOUT_CRYPT, I've just narrowed down the PR)
>How-To-Repeat:
cd /usr/src/lib/libarchive/
make -DWITHOUT_OPENSSL

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->kientzle 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Oct 10 04:39:06 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160922 

From: Tim Kientzle <kientzle@FreeBSD.org>
To: bug-followup@FreeBSD.org, phil@amdg.etowns.org
Cc:  
Subject: Re: kern/160922: [libarchive] libarchive stops buildworld using WITHOUT_OPENSSL
Date: Mon, 10 Oct 2011 22:20:19 -0700

 Can you please verify the FreeBSD version you're trying to build?
 
 The files you mention don't seem to exist in FreeBSD 8.2.
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/160922: commit references a PR
Date: Sat, 22 Oct 2011 22:23:01 +0000 (UTC)

 Author: kientzle
 Date: Sat Oct 22 22:22:46 2011
 New Revision: 226643
 URL: http://svn.freebsd.org/changeset/base/226643
 
 Log:
   Fix Buildworld WITHOUT_OPENSSL.
   
   PR:		kern/160922
   MFC after:	3 days
 
 Modified:
   head/lib/libarchive/archive_hash.h
   head/lib/libarchive/config_freebsd.h
 
 Modified: head/lib/libarchive/archive_hash.h
 ==============================================================================
 --- head/lib/libarchive/archive_hash.h	Sat Oct 22 22:00:35 2011	(r226642)
 +++ head/lib/libarchive/archive_hash.h	Sat Oct 22 22:22:46 2011	(r226643)
 @@ -79,6 +79,13 @@ typedef MD5_CTX archive_md5_ctx;
  #  define archive_md5_init(ctx)			MD5Init(ctx)
  #  define archive_md5_final(ctx, buf)		MD5Final(buf, ctx)
  #  define archive_md5_update(ctx, buf, n)	MD5Update(ctx, buf, n)
 +#elif defined(ARCHIVE_HASH_MD5_LIBMD)
 +#  include <md5.h>
 +#  define ARCHIVE_HAS_MD5
 +typedef MD5_CTX archive_md5_ctx;
 +#  define archive_md5_init(ctx)			MD5Init(ctx)
 +#  define archive_md5_final(ctx, buf)		MD5Final(buf, ctx)
 +#  define archive_md5_update(ctx, buf, n)	MD5Update(ctx, buf, n)
  #elif defined(ARCHIVE_HASH_MD5_LIBSYSTEM)
  #  include <CommonCrypto/CommonDigest.h>
  #  define ARCHIVE_HAS_MD5
 @@ -125,6 +132,13 @@ typedef SHA1_CTX archive_sha1_ctx;
  #  define archive_sha1_init(ctx)		SHA1Init(ctx)
  #  define archive_sha1_final(ctx, buf)		SHA1Final(buf, ctx)
  #  define archive_sha1_update(ctx, buf, n)	SHA1Update(ctx, buf, n)
 +#elif defined(ARCHIVE_HASH_SHA1_LIBMD)
 +#  include <sha.h>
 +#  define ARCHIVE_HAS_SHA1
 +typedef SHA1_CTX archive_sha1_ctx;
 +#  define archive_sha1_init(ctx)		SHA1_Init(ctx)
 +#  define archive_sha1_final(ctx, buf)		SHA1_Final(buf, ctx)
 +#  define archive_sha1_update(ctx, buf, n)	SHA1_Update(ctx, buf, n)
  #elif defined(ARCHIVE_HASH_SHA1_LIBSYSTEM)
  #  include <CommonCrypto/CommonDigest.h>
  #  define ARCHIVE_HAS_SHA1
 @@ -169,6 +183,13 @@ typedef SHA2_CTX archive_sha256_ctx;
  #  define archive_sha256_init(ctx)		SHA256Init(ctx)
  #  define archive_sha256_final(ctx, buf)	SHA256Final(buf, ctx)
  #  define archive_sha256_update(ctx, buf, n)	SHA256Update(ctx, buf, n)
 +#elif defined(ARCHIVE_HASH_SHA256_LIBMD)
 +#  include <sha256.h>
 +#  define ARCHIVE_HAS_SHA256
 +typedef SHA256_CTX archive_sha256_ctx;
 +#  define archive_sha256_init(ctx)		SHA256_Init(ctx)
 +#  define archive_sha256_final(ctx, buf)	SHA256_Final(buf, ctx)
 +#  define archive_sha256_update(ctx, buf, n)	SHA256_Update(ctx, buf, n)
  #elif defined(ARCHIVE_HASH_SHA256_LIBSYSTEM)
  #  include <CommonCrypto/CommonDigest.h>
  #  define ARCHIVE_HAS_SHA256
 @@ -257,6 +278,13 @@ typedef SHA2_CTX archive_sha512_ctx;
  #  define archive_sha512_init(ctx)		SHA512Init(ctx)
  #  define archive_sha512_final(ctx, buf)	SHA512Final(buf, ctx)
  #  define archive_sha512_update(ctx, buf, n)	SHA512Update(ctx, buf, n)
 +#elif defined(ARCHIVE_HASH_SHA512_LIBMD)
 +#  include <sha512.h>
 +#  define ARCHIVE_HAS_SHA512
 +typedef SHA512_CTX archive_sha512_ctx;
 +#  define archive_sha512_init(ctx)		SHA512_Init(ctx)
 +#  define archive_sha512_final(ctx, buf)	SHA512_Final(buf, ctx)
 +#  define archive_sha512_update(ctx, buf, n)	SHA512_Update(ctx, buf, n)
  #elif defined(ARCHIVE_HASH_SHA512_LIBSYSTEM)
  #  include <CommonCrypto/CommonDigest.h>
  #  define ARCHIVE_HAS_SHA512
 
 Modified: head/lib/libarchive/config_freebsd.h
 ==============================================================================
 --- head/lib/libarchive/config_freebsd.h	Sat Oct 22 22:00:35 2011	(r226642)
 +++ head/lib/libarchive/config_freebsd.h	Sat Oct 22 22:22:46 2011	(r226643)
 @@ -176,8 +176,8 @@
  #define	ARCHIVE_HASH_SHA384_OPENSSL 1
  #define	ARCHIVE_HASH_SHA512_OPENSSL 1
  #else
 -#define	ARCHIVE_HASH_MD5_LIBC 1
 -#define	ARCHIVE_HASH_SHA1_LIBC 1
 -#define	ARCHIVE_HASH_SHA256_LIBC 1
 -#define	ARCHIVE_HASH_SHA512_LIBC 1
 +#define	ARCHIVE_HASH_MD5_LIBMD 1
 +#define	ARCHIVE_HASH_SHA1_LIBMD 1
 +#define	ARCHIVE_HASH_SHA256_LIBMD 1
 +#define	ARCHIVE_HASH_SHA512_LIBMD 1
  #endif
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
