Subject: Alphas and libc dependencies

From: Ian Jackson <[email-masked]>
Date: Tue, 23 Jul 96 13:31 BST

All our (ELF i386 and m68k binary) packages are built to build with a
dependency on `libc5'.

The Alpha people are not using the standard Linux libc; instead,
they're using a version of the GNU libc, with a current major number
of 0 by the looks of things.

As far as I can see we have two ways we can solve this problem:

1. Come up with some kind of scheme, more or less formal, for
modifying these dependencies at build-time.  At one extreme, the alpha
distribution builders write a wrapper around dpkg-deb which fixes up
the dependencies.  At the other we come up with an automatic scheme
for determining shared library dependencies (this will be hard work).

2a. Give the package containing our version of glibc version 0 the
name libc5.  2b. Implement version numbers for virtual packages so
that we can use one here.

I understand that the plan is to eventually merge the Linux and GNU
libc's, and this'll probably produce a libc6, so whatever solution we
come up with will only have to last until then.

Ian.

---

From: Michael Shields <[email-masked]>
Date: Tue, 23 Jul 1996 16:39:18 +0000

>for determining shared library dependencies (this will be hard work).

I don't think it would be that hard.  In fact, here's code.

----- cut here -----
#!/usr/bin/perl

open(F, "find debian-tmp -type f -print | xargs file |")
    or die "couldn't open find/xargs pipe: $!\n";

while (<F>) {
    /executable/ or next;
    ($file, $junk) = split /:/;
    open(LDDPIPE, "ldd $file |")
        or die "couldn't open ldd pipe: $!\n";
    while (<LDDPIPE>) {
        chop;
        ($junk, $library) = split / \=\> /
             or die "Bad output from `ldd $file': $_\n";
        $needlib{$library} = 1;
    }
    close(LDDPIPE);
}

close(F);

foreach $library (keys %needlib) {
    -f $library
         or die "Package needs missing library $library";
    $_ = `dpkg -S $library`;
    ($package, $junk) = split /:/;
    $needpackage{$package} = 1;
}

print join(' ', sort keys %needpackage), "\n";
----- cut here -----

It needs to be made more robust; I'll flesh it out if we decide to actually
do this.  But I tested it, and it works (and is a useful tool for Intel as
well).

--
Shields, CrossLink.

---

From: Dale Scheetz <[email-masked]>
Date: Tue, 23 Jul 1996 12:50:16 -0400 (EDT)

> come up with will only have to last until then.
Why not use sed to build a correct control file depends field based on the
architecture being built. That is, if building on a GNU libc architecture,
sed the correct dependancies into the control field, else sed the normal
libc5 depends.

Anything wrong with this?

Dwarf

------------                                          --------------

aka   Dale Scheetz                   Phone:   1 (904) 877-0257
      Flexible Software              Fax:     NONE 
      Black Creek Critters           e-mail:  [email-masked]

------------ If you don't see what you want, just ask --------------

---

From: "Brian C. White" <[email-masked]>
Date: Tue, 23 Jul 1996 14:13:00 -0400

>that we can use one here.

Definitely sounds like the best solution to me.

                                        Brian
                               ( [email-masked] )

-------------------------------------------------------------------------------
    In theory, theory and practice are the same.  In practice, they're not.

---

From: [email-masked] (J.H.M.Dassen)
Date: Wed, 24 Jul 1996 12:35:07 +0200 (MDT)

> libc's, and this'll probably produce a libc6, 

Yes. glibc-1.92.tar.gz (unreleased; available from alpha.gnu.ai.mit.edu)
produces a working [*] libc6. 

[*] I got it working on a separate partition with no libc5-dev on it. 
    It seems to need some parts of libc5's headers though.

Ray
-- 
POPULATION EXPLOSION  Unique in human experience, an event which happened 
yesterday but which everyone swears won't happen until tomorrow.  
- The Hipcrime Vocab by Chad C. Mulligan