From florian.schrack@freenet.de  Sat Dec  8 17:08:07 2001
Return-Path: <florian.schrack@freenet.de>
Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131])
	by hub.freebsd.org (Postfix) with ESMTP id CB1A037B41D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Dec 2001 17:08:05 -0800 (PST)
Received: from [194.97.50.135] (helo=mx2.freenet.de)
	by mout0.freenet.de with esmtp (Exim 3.33 #3)
	id 16CsRo-0000JN-00
	for FreeBSD-gnats-submit@freebsd.org; Sun, 09 Dec 2001 02:08:04 +0100
Received: from b0006.pppool.de ([213.7.0.6] helo=ramanujan.dyndns.org)
	by mx2.freenet.de with asmtp (ID florian.schrack@freenet.de) (Exim 3.33 #3)
	id 16CsRo-0007PR-00
	for FreeBSD-gnats-submit@freebsd.org; Sun, 09 Dec 2001 02:08:04 +0100
Received: (from flo@localhost)
	by ramanujan.dyndns.org (8.11.6/8.11.6) id fB917hs01175;
	Sun, 9 Dec 2001 02:07:43 +0100 (CET)
	(envelope-from flo)
Message-Id: <200112090107.fB917hs01175@ramanujan.dyndns.org>
Date: Sun, 9 Dec 2001 02:07:43 +0100 (CET)
From: Florian Schrack <florian.schrack@freenet.de>
Reply-To: Florian Schrack <florian.schrack@freenet.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 'make installworld' fails during update to -current
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32635
>Category:       misc
>Synopsis:       'make installworld' fails during update to -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 08 17:10:00 PST 2001
>Closed-Date:    Mon Dec 10 02:07:52 PST 2001
>Last-Modified:  Tue Jul 23 01:10:07 PDT 2002
>Originator:     Florian Schrack
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD ramanujan.dyndns.org 4.4-STABLE FreeBSD 4.4-STABLE #13: Fri Dec 7 16:27:41 CET 2001 root@ramanujan.dyndns.org:/usr/obj/usr/src/sys/MYKERNEL i386


	
>Description:
When I try to update a 4.4-STABLE environment to 5.0-CURRENT (during a
'make release'), the 'make installworld' step fails because the shared
library 'libc.so.4' cannot be found. This happens during the
installation of the 'adventure' program, whose Makefile invokes the
'chown' binary. The newly compiled 'chown' binary, which is dynamically
linked to 'libc.so.5', has not been installed yet, so the Makefile of
the 'adventure' program uses the old version, still linked to
'libc.so.4'. This produces an error, because the old library seems to
have been deleted from the system and to have been replaced by the new
version.
	
>How-To-Repeat:
I encountered the error during a 'make release'. I do not know if it
also happens during a normal update from 4.4-STABLE to 5.0-CURRENT, but
I think so, since 'make release' just uses the ordinary build and
install procedure in a chroot'ed environment. For this reason, I do not
want to try an ordinary update, since the error could leave me with a
totally trashed system consisting of binaries linked to 'libc.so.4' and
only 'libc.so.5' in the library path.
	
>Fix:
I think there are at least two different fixes possible:

1) Change the order of subdirectories in /usr/src/Makefile.inc1, i.e.
put 'usr.sbin' before 'games'. This should install 'chown' before
'adventure' and therefore avoid the error. I do not know if this method
solves all possible similar dependency problems.

2) Ensure that a 'libc.so.4' library is in the library path of the 'make
installworld' process. There is such a library in
/usr/src/lib/compat/compat4x.*, so the only problem would be to put it
in a suitable location *before* the invocation of old binaries.
	
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Dec 10 02:07:52 PST 2001 
State-Changed-Why:  
Sorry, but we don't currently support building cross-branch releases. 

This shouldn't be a problem for a normal (non-chrooted) upgrade, since 
`installworld' makes copies of all utilities (and uses them) that are 
needed during install.  This happens as the first step of `buildworld' 
stage.  Also, if you have old 4.x binaries (linked against libc.so.4, 
etc.), make sure to add COMPAT4X=TRUE to /etc/make.conf. 

There's still a race exists when installing compat libraries, because 
stale libraries (libc.so.4) are removed before their copies are moved 
into /usr/lib/compat.  But this race is actually harmless, because 
the only utils that are used during installation are chflags(1), rm(1) 
and install(1), all of them are linked static (including install(1), 
which is built in a BMAKEENV environment with -DNOSHARED during 
`installworld'). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32635 

From: Ruslan Ermilov <ru@FreeBSD.org>
To: florian.schrack@freenet.de
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/32635: 'make installworld' fails during update to -current
Date: Tue, 23 Jul 2002 11:08:46 +0300

 --0eh6TmSyL6TZE2Uz
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Mon, Dec 10, 2001 at 02:18:20AM -0800, ru@FreeBSD.org wrote:
 > Synopsis: 'make installworld' fails during update to -current
 >=20
 > State-Changed-From-To: open->closed
 > State-Changed-By: ru
 > State-Changed-When: Mon Dec 10 02:07:52 PST 2001
 > State-Changed-Why:=20
 > Sorry, but we don't currently support building cross-branch releases.
 >=20
 FWIW, we now support cross-branch releases, even cross-arch releases
 to some extent.
 
 
 Cheers,
 --=20
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.512.251	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --0eh6TmSyL6TZE2Uz
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE9PQ8OUkv4P6juNwoRAkl8AJ9q99bX53ZADBCWIN1H1dVlaw0A/wCfWAzL
 SPsGhLTGNaFIY/6G+qGj5Q0=
 =EAVJ
 -----END PGP SIGNATURE-----
 
 --0eh6TmSyL6TZE2Uz--
>Unformatted:
