Hi,

First, executive summary:

I would like to do one of the following:

* find binaries of various development tools (binutils, gcc, gdb),
  that will work with a particular version of glibc (2.2.2).

* make two different versions of glibc (2.2.2 and 2.2.3) co-exist
  on one system.

Now, here is why (the full Monty).

I have a running i686 Linux system (2.2.19) that has no development
tools installed whatsoever, there is no /usr/include even (the system
is supplied by another company), and I needed some tools (compiler,
binutils, gdb) quickly. So I grabbed binaries of binutils, gcc, gdb
(from slackware 7.3 that was lying around - the supplied system is, to
the best of my knowledge, _based_ on slackware) and installed in
/usr/local. It turned out that the tools depend on glibc 2.2.3,
whereas the original system had glibc 2.2.2

# ls -l /lib/libc.so.6
lrwxrwxrwx  1 root root   13 Jan 22  2001 /lib/libc.so.6 -> libc-2.2.2.so

I also installed glibc 2.2.3 in /usr/local. What I have not figured
out yet is how to make the two versions co-exist. Creating an obvious
/etc/ld.so.conf, e.g.

# cat /etc/ld.so.conf
/usr/local/lib
/usr/i386-slackware-linux/lib

and running ldconfig breaks all the system utilities (sort of
expected), though they still work prepended with

LD_LIBRARY_PATH=/lib

e.g.

# LD_LIBRARY_PATH=/lib ls

but in the original configuration (i.e. with the system stuff working
normally) the same trick does not work the other way around, e.g.

# LD_LIBRARY_PATH=/usr/local/lib:/usr/i386-slackware-linux/lib as -v
as: /lib/libc.so.6: version `GLIBC_2.2.3' not found (required by 
/usr/local/lib/libbfd-2.11.90.0.19.so)

More details for the inquisitive:

# ldd -v /usr/local/bin/as
/usr/local/bin/as: /lib/libc.so.6: version `GLIBC_2.2.3' not found (required by 
/usr/lib/libbfd-2.11.90.0.19.so)
        libbfd-2.11.90.0.19.so => /usr/lib/libbfd-2.11.90.0.19.so (0x40019000)
        libc.so.6 => /lib/libc.so.6 (0x4007a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

        Version information:
        /usr/local/bin/as:
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /usr/lib/libbfd-2.11.90.0.19.so:
                libc.so.6 (GLIBC_2.2.3) => not found
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2

You will notice that the problem is due to
/usr/lib/libbfd-2.11.90.0.19.so (a symlink to
/usr/local/lib/libbfd-2.11.90.0.19.so, which is a part of the
binutils).

The immediate result of the above is, of course,

$ cat foo.c
int main(void)
{
return 0;
}
$ gcc foo.c
as: /lib/libc.so.6: version `GLIBC_2.2.3' not found (required by 
/usr/lib/libbfd-2.11.90.0.19.so)

Now, I do not want to start bootstrapping binutils, compiler, etc from
sources. the problem (or at least a part of it) is with binutils,
which is the first thing to crosscompile etc.

Rather than start cross-compiling all that stuff, I would like to do
one of the following things (back to the executive summary):

* Find binaries that use glibc 2.2.2 - how? I don't want to search blindly.

* Make 2 versions of glibc leave in peace together (we all know things
  like that are difficult). Either there is something fundamentally
  wrong with the idea, or I am - again - missing something obvious.
  There is probably some correct way to ldconfig the bloody mess that
  eludes me right now...

* ???

I tried to STFW, but so far I only found questions, but no answers.

Thanks,

-- 
Oleg Goldshmidt | [EMAIL PROTECTED] 
[Lisp] is the only computer language that is beautiful. 
                      - Neal Stephenson 

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to