From nobody@FreeBSD.org  Mon May 24 03:02:08 2010
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 A9085106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 May 2010 03:02:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 969998FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 May 2010 03:02:08 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o4O328uX026449
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 May 2010 03:02:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o4O328gh026447;
	Mon, 24 May 2010 03:02:08 GMT
	(envelope-from nobody)
Message-Id: <201005240302.o4O328gh026447@www.freebsd.org>
Date: Mon, 24 May 2010 03:02:08 GMT
From: Rob Farmer <rfarmer@predatorlabs.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] fix make release after lzma import
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         146904
>Category:       misc
>Synopsis:       [build] [patch] fix make release after lzma import
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 24 03:10:05 UTC 2010
>Closed-Date:    Thu May 27 00:36:55 UTC 2010
>Last-Modified:  Fri Jun 17 11:30:09 UTC 2011
>Originator:     Rob Farmer
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD coretwo.predatorlabs.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sun May 23 16:35:54 PDT 2010     rfarmer@coretwo.predatorlabs.net:/usr/obj/usr/src/sys/CORETWO  i386
>Description:
The release.4 stage is broken after the lzma import due to necessary libraries not being listed in release/$ARCH/boot_crunch.conf

cc -static -o boot_crunch boot_crunch.o hostname.lo pwd.lo rm.lo sh.lo test.lo camcontrol.lo dhclient.lo fsck_ffs.lo ifconfig.lo mount_nfs.lo newfs.lo route.lo rtsol.lo tunefs.lo cpio.lo find.lo minigzip.lo sed.lo arp.lo ppp.lo sysinstall.lo usbconfig.lo -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo -lbsdxml -larchive -lbz2 -lusb -ljail
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x1e6): In function `archive_compressor_xz_init':
: undefined reference to `lzma_lzma_preset'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x263): In function `archive_compressor_xz_init':
: undefined reference to `lzma_alone_encoder'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x2c9): In function `archive_compressor_xz_init':
: undefined reference to `lzma_stream_encoder'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x3ba): In function `drive_compressor':
: undefined reference to `lzma_code'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x418): In function `drive_compressor':
: undefined reference to `lzma_memusage'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_compression_xz.o)(.text+0x640): In function `archive_compressor_xz_finish':
: undefined reference to `lzma_end'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0x9e8): In function `archive_write_mtree_finish_entry':
: undefined reference to `SHA1_Final'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0xa2e): In function `archive_write_mtree_finish_entry':
: undefined reference to `RIPEMD160_Final'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0xa78): In function `archive_write_mtree_finish_entry':
: undefined reference to `MD5_Final'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0xe43): In function `archive_write_mtree_data':
: undefined reference to `SHA1_Update'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0xe63): In function `archive_write_mtree_data':
: undefined reference to `MD5_Update'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0xe8b): In function `archive_write_mtree_data':
: undefined reference to `RIPEMD160_Update'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0x1297): In function `archive_write_mtree_header':
: undefined reference to `SHA1_Init'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0x12c7): In function `archive_write_mtree_header':
: undefined reference to `RIPEMD160_Init'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_write_set_format_mtree.o)(.text+0x12f4): In function `archive_write_mtree_header':
: undefined reference to `MD5_Init'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_read_support_compression_xz.o)(.text+0x152): In function `xz_lzma_bidder_init':
: undefined reference to `lzma_alone_decoder'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_read_support_compression_xz.o)(.text+0x18c): In function `xz_lzma_bidder_init':
: undefined reference to `lzma_stream_decoder'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_read_support_compression_xz.o)(.text+0x2b1): In function `xz_filter_close':
: undefined reference to `lzma_end'
/usr/obj/usr/src/tmp/usr/lib/libarchive.a(archive_read_support_compression_xz.o)(.text+0x567): In function `xz_filter_read':
: undefined reference to `lzma_code'
*** Error code 1

Stop in /usr/obj/usr/src/release/boot_crunch.
*** Error code 1

Stop in /usr/src/release.
+ umount /dev
*** Error code 1

Stop in /usr/src/release.
>How-To-Repeat:
Run make release on current after lzma import
>Fix:
Add -llzma -lcrypto to libs line of boot_crunch.conf. Only tested on i386 but I think the same principle applies everywhere.

Patch attached with submission follows:

Index: release/amd64/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/amd64/boot_crunch.conf,v
retrieving revision 1.68
diff -u -r1.68 boot_crunch.conf
--- release/amd64/boot_crunch.conf	26 Jan 2010 15:28:00 -0000	1.68
+++ release/amd64/boot_crunch.conf	23 May 2010 05:05:23 -0000
@@ -41,4 +41,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo
-libs -lbsdxml -larchive -lbz2 -lusb -ljail
+libs -lbsdxml -larchive -lbz2 -lusb -ljail -llzma -lcrypto
Index: release/i386/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/i386/boot_crunch.conf,v
retrieving revision 1.68
diff -u -r1.68 boot_crunch.conf
--- release/i386/boot_crunch.conf	26 Jan 2010 15:28:00 -0000	1.68
+++ release/i386/boot_crunch.conf	23 May 2010 05:05:10 -0000
@@ -41,4 +41,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo
-libs -lbsdxml -larchive -lbz2 -lusb -ljail
+libs -lbsdxml -larchive -lbz2 -lusb -ljail -llzma -lcrypto
Index: release/ia64/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/ia64/boot_crunch.conf,v
retrieving revision 1.18
diff -u -r1.18 boot_crunch.conf
--- release/ia64/boot_crunch.conf	29 Jun 2009 13:59:30 -0000	1.18
+++ release/ia64/boot_crunch.conf	23 May 2010 05:05:37 -0000
@@ -46,4 +46,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -ldevinfo
-libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail
+libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail -llzma -lcrypto
Index: release/pc98/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/pc98/boot_crunch.conf,v
retrieving revision 1.67
diff -u -r1.67 boot_crunch.conf
--- release/pc98/boot_crunch.conf	26 Jan 2010 15:28:00 -0000	1.67
+++ release/pc98/boot_crunch.conf	23 May 2010 05:05:50 -0000
@@ -40,4 +40,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2 -ljail
+libs -larchive -lbz2 -ljail -llzma -lcrypto
Index: release/powerpc/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/powerpc/boot_crunch.conf,v
retrieving revision 1.12
diff -u -r1.12 boot_crunch.conf
--- release/powerpc/boot_crunch.conf	20 Apr 2010 01:12:23 -0000	1.12
+++ release/powerpc/boot_crunch.conf	23 May 2010 05:06:12 -0000
@@ -46,4 +46,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs
-libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail
+libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail -llzma -lcrypto
Index: release/sparc64/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/sparc64/boot_crunch.conf,v
retrieving revision 1.15
diff -u -r1.15 boot_crunch.conf
--- release/sparc64/boot_crunch.conf	26 Jan 2010 15:28:00 -0000	1.15
+++ release/sparc64/boot_crunch.conf	23 May 2010 05:06:28 -0000
@@ -41,4 +41,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2 -lusb -ljail
+libs -larchive -lbz2 -lusb -ljail -llzma -lcrypto
Index: release/sun4v/boot_crunch.conf
===================================================================
RCS file: /home/ncvs/src/release/sun4v/boot_crunch.conf,v
retrieving revision 1.8
diff -u -r1.8 boot_crunch.conf
--- release/sun4v/boot_crunch.conf	26 Jan 2010 15:28:00 -0000	1.8
+++ release/sun4v/boot_crunch.conf	23 May 2010 05:06:37 -0000
@@ -41,4 +41,4 @@
 
 libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
 libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -lbsdxml
-libs -larchive -lbz2 -lusb -ljail
+libs -larchive -lbz2 -lusb -ljail -llzma -lcrypto


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Thu May 27 00:35:03 UTC 2010 
State-Changed-Why:  
Should have been fixed in latest -HEAD. 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Thu May 27 00:35:03 UTC 2010 
Responsible-Changed-Why:  
Take. 

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

From: Oleg Gawriloff <barzog@telecom.by>
To: bug-followup@FreeBSD.org, rfarmer@predatorlabs.net
Cc:  
Subject: Re: misc/146904: [build] [patch] fix make release after lzma import
Date: Fri, 17 Jun 2011 14:10:44 +0300

 I've encountered same error when performing make buildworld from 7.3-R 
 to 8.2-R during compile usr.bin/ar.
 Appending -llzma -lcrypto to ar/Makefile solved problem.
 
 -- 
 Signed, Oleg Gawriloff.
 
>Unformatted:
