Subject: lib/11942: Shared library version numbers not updated when translated to ELF
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kivinen@ssh.fi>
List: netbsd-bugs
Date: 01/12/2001 06:57:14
>Number:         11942
>Category:       lib
>Synopsis:       Old 1.3.2/1.4 binaries does not work because of missing shared libraries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 12 06:57:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Tero Kivinen
>Release:        NetBSD 1.5
>Organization:
SSH Communications Security
>Environment:
System: NetBSD banaani.hel.fi.ssh.com 1.5 NetBSD 1.5 (SSH) #0: Tue Jan 2 23:32:28 EET 2001 root@banaani.ssh.fi:/usr/src/sys/arch/i386/compile/SSH i386

>Description:

	The libcrypt and libm have same version number both in 1.3.2
	and 1.5, even when the 1.5 is ELF and 1.3.2 is aout system.
	This causes all old 1.3.2 binaries to fail, because they
	cannot load the libcrypt.so.0.0 / libm.so.0.1 because they are
	ELF binaries instead of aout. I think the library version
	numbers must be updated if there is incompatible change, and I
	think binary format change is incompatible.

>How-To-Repeat:

	Take old 1.3.2 system, and update it to 1.5 by unpacking the
	tars over the old filesystem (so you try to preserve the old
	libraries and binaries etc). Reboot the machine and notice
	that sshd (old 1.3.2 binary) does not start because it cannot
	find the libcrypt.so.0.0. The old aout libcrypt.so.0.0 was
	overwritten with ELF version when unpacking the new tar file.

>Fix:

	Proper fix would be to update the version numbers every time
	there is incompatible change in the shared libraries.
	Unfortunately it already too late for this.

	The INSTALL file now says that update tries to move old aout
	binaries to the /emul/aout/usr/lib, but I haven't tried this
	for some time. I stopped using update option in the some 1.4
	release when it instead of moving libraries to proper place it
	removed all of my old X11 libraries, which caused all of my
	X11 programs to fail...
	
	Currently libraries that have same version number in 1.5 and
	1.3.2 are:

	libcrypt.so.0.0
	libgnumalloc.so.0.0
	libi386.so.0.2
	libm.so.0.1
	libossaudio.so.0.0
	libresolv.so.1.0
>Release-Note:
>Audit-Trail:
>Unformatted: