Bug 32635

Summary: 'make installworld' fails during update to -current
Product: Base System Reporter: Florian Schrack <florian.schrack>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.4-STABLE   
Hardware: Any   
OS: Any   

Description Florian Schrack 2001-12-09 01:10:00 UTC
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.

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.
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.
Comment 1 ru freebsd_committer freebsd_triage 2001-12-10 10:07:52 UTC
State Changed
From-To: open->closed

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').
Comment 2 ru freebsd_committer freebsd_triage 2002-07-23 09:08:46 UTC
On Mon, Dec 10, 2001 at 02:18:20AM -0800, ru@FreeBSD.org wrote:
> Synopsis: 'make installworld' fails during update to -current
> 
> 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.
> 

FWIW, we now support cross-branch releases, even cross-arch releases
to some extent.


Cheers,
-- 
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