RPM/Deb. pkgs & libc binary compat problem

RPM/Deb. pkgs & libc binary compat problem

Post by Fergus Henders » Sat, 27 Mar 1999 04:00:00



Hi,

I'm trying to produce Linux packages, in both `.rpm' RedHat package
format and also in `.deb' Debian Package format, of the compiler and
libraries for a new language (Mercury).

Unfortunately we have found that libc 6.0 (glibc-2.0) is not binary
compatible with libc 6.1 (glibc-2.1) as far as libraries are
concerned.  This means that if we ship binaries built with libc 6.0
and a user installs them on a system running libc 6.1, then although
the binary executables that we ship, e.g. the compiler, work fine,
unfortunately when the user tries to link his program with the Mercury
libraries, the result is either link errors, or an executable that
when run gets segmentation faults.

Now, having to ship different binaries for libc 6.0 and libc 6.1 is a
complete pain (particularly when multiplied by the three package
formats .tar.gz, .rpm, and .deb, not to mention all the different
architectures...), but this incompatibility is at least documented in
the glibc FAQ, so I'm not complaining too much about that.
My question is about the .rpm and .deb package systems.
What do we need to do to ensure that the user will not be able to
install a package built for libc 6.0 on a system with libc 6.1?

Any hints on how to do this would be most appreciated.

Thanks,
        Fergus.

P.S. Email CC's of any follow-ups would be appreciated.
--

WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"

 
 
 

RPM/Deb. pkgs & libc binary compat problem

Post by David T. Bla » Sat, 27 Mar 1999 04:00:00



>Hi,

>I'm trying to produce Linux packages, in both `.rpm' RedHat package
>format and also in `.deb' Debian Package format, of the compiler and
>libraries for a new language (Mercury).

>Unfortunately we have found that libc 6.0 (glibc-2.0) is not binary
>compatible with libc 6.1 (glibc-2.1) as far as libraries are
>concerned.  

...

Quote:>My question is about the .rpm and .deb package systems.
>What do we need to do to ensure that the user will not be able to
>install a package built for libc 6.0 on a system with libc 6.1?

How about looking for symbols specific to glibc2.1 in
the installation scripts ??

if [ `nm /lib/libc.so.6 | grep __register_frame_info` ]
Installation for glibc2.1
else
Installation for glibc2.0
endif

That would be fairly bombproof if you use the right symbols.
A comparison of the nm outputs for libc.so.6 for the two
versions should tell you what you need to know.
--
Dave Blake


 
 
 

RPM/Deb. pkgs & libc binary compat problem

Post by Tyson Richard DO » Tue, 30 Mar 1999 04:00:00



>Hi,
>I'm trying to produce Linux packages, in both `.rpm' RedHat package
>format and also in `.deb' Debian Package format, of the compiler and
>libraries for a new language (Mercury).
>Unfortunately we have found that libc 6.0 (glibc-2.0) is not binary
>compatible with libc 6.1 (glibc-2.1) as far as libraries are
>concerned.  This means that if we ship binaries built with libc 6.0
>and a user installs them on a system running libc 6.1, then although
>the binary executables that we ship, e.g. the compiler, work fine,
>unfortunately when the user tries to link his program with the Mercury
>libraries, the result is either link errors, or an executable that
>when run gets segmentation faults.
>Now, having to ship different binaries for libc 6.0 and libc 6.1 is a
>complete pain (particularly when multiplied by the three package
>formats .tar.gz, .rpm, and .deb, not to mention all the different
>architectures...), but this incompatibility is at least documented in
>the glibc FAQ, so I'm not complaining too much about that.
>My question is about the .rpm and .deb package systems.
>What do we need to do to ensure that the user will not be able to
>install a package built for libc 6.0 on a system with libc 6.1?
>Any hints on how to do this would be most appreciated.

.deb files come with dependencies.  A .deb file built on a system
with glibc2.1 (libc6.1) can simply be declared to depend upon the
package "libc6-dev" with version >= 2.1.  A user will not be able to
install this package without first installing a libc6.1 development
environment (unless they use --force, of course, which is their problem).
The place to add this dependency is in the debian/control file.

.rpm files also come with dependencies but I think they are limited to
depending upon just a particular shared library (e.g. libc.so.6).
Since libc6.1 will also provide libc.so.6 I'm not sure how to solve
it.  But I don't know a lot about RPMs so perhaps this problem is
solvable some other way.

Tyson.