Skip site navigation (1)Skip section navigation (2)
Date:      6 Jul 1997 12:27:29 GMT
From:      peter@spinner.dialix.com.au (Peter Wemm)
To:        freebsd-hackers@freebsd.org
Subject:   Re: Application os version compatibility?
Message-ID:  <868192049.512817@haywire.dialix.com.au>
References:  <199707060136.DAA28936@townsend.ericsson.se>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.BSF.3.95q.970705200828.12420C-100000@misery.sdf.com>,
	tom@sdf.com (Tom Samplonius) writes:
> On Sun, 6 Jul 1997, Kent Boortz wrote:
[..]
>>     - If changing the second number staticly linked will still work.
> 
>   Huh?  Statically linked applications ALWAYS work.
> 
>>     - If changing the first number we may have to recompile the
>>       whole thing and do a new release.
> 
>   Unless it is statically linked, in which case it will still work.

Umm.. not true..  In some particular cases, static linked programs are *not*
compatable across releases while the dynamic versions are.  Take programs
calling setproctitle() or sleep() for instance.  Back when 2.1 was -stable and
2.2 was -current, there were two different versions of libutil.so.2.1.
Programs linked dynamically against libutil.so.2.1 would work on either
system even though the implementation of setproctitle() was different.  The
main thing this affected was sendmail.  (The difference in this case was the
address space of the process's stack as set up by the kernel at exec() time)

Take programs using sleep() in 3.0.  If you statically link a program under
3.0, sleep() makes a call to either the nanosleep() or signanosleep() syscall
(depending on the age of libc).  If you try and run this program under 2.2
or 2.1, it'll get a SIGSYS and die when it tries to sleep.  /bin/sleep is
the primary offender.  On the other hand, a dynamically linked /bin/sleep
works on both systems because both branches provide their own implementation
of sleep(3).

Strictly speaking, freebsd-3.0 should be compiling an interface-compatable
version of libc.so.2.2 but using the 3.0 kernel primatives.  The same goes for
all the other libraries in the compat* dists.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?868192049.512817>