Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* A guru problem (shared libs)
@ 1999-04-29  1:31 Christopher W. Curtis
  1999-05-02 20:13 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher W. Curtis @ 1999-04-29  1:31 UTC (permalink / raw)
  To: axp-list

Hello again,

In my effort to upgrade to 2.2.7, I've run across this error:

[root@spanky linux]# make boot modules modules_install
gcc -D__KERNEL__ -I/usr/src/linux-2.2.7/include -Wall
-Wstrict-prototypes
      -O2 -fomit-frame-pointer -pipe -mno-fp-regs -ffixed-8 -mcpu=ev4
      -c -o init/main.o init/main.c
as: error in loading shared libraries
/usr/lib/libc.so.6.1: undefined symbol: _dl_initial_searchlist
/usr/src/linux-2.2.7/include/asm/bugs.h: In function `check_bugs':
In file included from init/main.c:27:
/usr/src/linux-2.2.7/include/asm/bugs.h:20: output pipe has been closed
cpp: output pipe has been closed
make: *** [init/main.o] Error 1

while trying to compile the kernel.  I recently tried to upgrade glibc
from rawhide and ran out of disk space, thus rendering the machine
unusable, but I thought I had it all straightened out.  Evidently not.
What package do I need to (re)install to get this to function porperly,
and please don't say glibc-2.0.7 (the RH 5.2 version) because I've
already tried that, and each time I try it something goes hokey and the
machine is dead for another day while I delete symlinks in /lib.

All help greatly appreciated,
Christopher

ps:

[root@spanky linux]# ls -l /lib/*dl*
-rwxr-xr-x   55996 Oct 12  1998 /lib/libdl-2.0.7.so
lrwxrwxrwx      14 Mar  3 14:55 /lib/libdl.so.2 -> libdl-2.0.7.so
lrwxrwxrwx      14 Apr 27  2019 /lib/libdl.so.2.1 -> libdl-2.0.7.so

and things only get much worse when I:

make CC=egcs boot modules modules_install

And I just tried upgrading (-U --force) binutils from the 5.2 CD with no
luck.  Same error.  "as --version" gives the error, and "ldd `which as`"
reports:

 libopcodes-2.9.1.0.15.so.0 => /usr/lib/libopcodes-2.9.1.0.15.so.0
(0x0000015555556000)
 libbfd-2.9.1.0.15.so.0 => /usr/lib/libbfd-2.9.1.0.15.so.0
(0x000001555566c000)
 libc.so.6.1 => /usr/lib/libc.so.6.1 (0x00000155557d8000)
 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000000000000000)

Thanks again,
Christopher


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A guru problem (shared libs)
  1999-04-29  1:31 A guru problem (shared libs) Christopher W. Curtis
@ 1999-05-02 20:13 ` Richard Henderson
  1999-05-05  6:32   ` Christopher W. Curtis
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 1999-05-02 20:13 UTC (permalink / raw)
  To: axp-list

On Wed, Apr 28, 1999 at 08:31:29PM -0500, Christopher W. Curtis wrote:
> What package do I need to (re)install to get this to function porperly,
> and please don't say glibc-2.0.7 (the RH 5.2 version) because I've
> already tried that, and each time I try it something goes hokey and the
> machine is dead for another day while I delete symlinks in /lib.

Sorry, it's glibc.  You've got /lib/libc* and /lib/ld-*.so mismatched.


r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A guru problem (shared libs)
  1999-05-02 20:13 ` Richard Henderson
@ 1999-05-05  6:32   ` Christopher W. Curtis
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher W. Curtis @ 1999-05-05  6:32 UTC (permalink / raw)
  To: axp-list, rth

Richard Henderson wrote:

> On Wed, Apr 28, 1999 at 08:31:29PM -0500, Christopher W. Curtis wrote:
> > What package do I need to (re)install to get this to function porperly,
> > and please don't say glibc-2.0.7 (the RH 5.2 version) because I've
> > already tried that, and each time I try it something goes hokey and the
> > machine is dead for another day while I delete symlinks in /lib.
>
> Sorry, it's glibc.  You've got /lib/libc* and /lib/ld-*.so mismatched.

Thanks for responding (I recognize your name as guru-ness), but I'm still
stuck and simply cannot figure out how to proceed.  :(

Here is my /etc/ld.so.conf:
/lib
/usr/lib
/usr/X11R6/lib
/usr/local/lib


Here is /lib/libc* and /lib/ld*:
-rwxr-xr-x   1 root     root       301815 Oct 12  1998 /lib/ld-2.0.7.so
lrwxrwxrwx   1 root     root           11 Apr 27  2019 /lib/ld-linux.so.2 ->
ld-2.0.7.so

-rwxr-xr-x   1 root     root      4462177 Oct 12  1998 /lib/libc-2.0.7.so
lrwxrwxrwx   1 root     root           13 Mar  2  2019 /lib/libc.so.6 ->
libc-2.0.7.so
lrwxrwxrwx   1 root     root           13 Apr 22  2019 /lib/libc.so.6.1 ->
libc-2.0.7.so


Ignore the dates on the symlinks - I created those manually after a fudged
2.1 libc install forced me to boot from floppy and manually remove the bad
package and recreate the original layout.

Now, the thing is, it appears that *everything* works, with the sole
exception of the binutils package.  I can run "gcc".  I can run "apache".  I
can run "samba".  I can run 99% of the things that I want to run every day.
I cannot, however, run anything from binutils.  Each of the programs "ar",
"nm", "as", "ranlib", "ld", "strip", and "strings" produce the error:
(program): error in loading shared libraries
/usr/lib/libc.so.6.1: undefined symbol: _dl_initial_searchlist

I've uninstalled binutils and reinstalled them.  I've forced their
reinstallation using:
2540552 Feb 25 22:16
/usr/local/cdrom/yummy/installed/binutils-2.9.1.0.15-1.alpha.rpm

which should be the same as the one from the CD-ROM (I downloaded it off the
'net, though, so I can't say for sure).  I recently downloaded .0.23-4 as a
SRPM, but not surprisingly (but so at the time), I can't compile it.

I've checked the dependencies for binutils and forced reinstallation of
those packages.  "rpm -qR binutils" states that it depends on:
/bin/sh
/sbin/ldconfig
ld-linux.so.2
libbfd-2.9.1.0.15.so.0
libc.so.6.1
libopcodes-2.9.1.0.15.so.0

No packages seem to provide "/bin/sh" or "/sbin/ldconfig", so I'm guessing
"bash" and "ldconfig" respectively.  "rpm -qlv" of bash-1.14.7-13.alpha.rpm"
lists "/bin/sh" and of "ldconfig-1.9.5-8.alpha.rpm", "/sbin/ldconfig"; and
trying to "rpm -U" these packages rpm states that they are already
installed.

ld-linux.so.2 and libc.so.6.1 are both provided for by "glibc-2.0.7-29" and
libbfd and libopcodes are both provided by "binutils-2.9.1.0.15-1".

So performing an "rpm -U bash* binutils* glibc-2* ldconfig*" results in:
package bash-1.14.7-13 is already installed
error: bash-1.14.7-13.alpha.rpm cannot be installed
package ldconfig-1.9.5-8 is already installed
error: ldconfig-1.9.5-8.alpha.rpm cannot be installed
package binutils-2.9.1.0.15-1 is already installed
error: binutils-2.9.1.0.15-1.alpha.rpm cannot be installed
package glibc-2.0.7-29 is already installed
error: glibc-2.0.7-29.alpha.rpm cannot be installed

The same command with "--force" produces no output on stdout or stderr.  I
then, from a new command prompt (I telnet in from another machine) perform a
test:
as: error in loading shared libraries
/usr/lib/libc.so.6.1: undefined symbol: _dl_initial_searchlist

I am now at a complete loss.  I try two more things:
ldd `which as`
        libopcodes-2.9.1.0.15.so.0 => /usr/lib/libopcodes-2.9.1.0.15.so.0
(0x0000015555556000)
        libbfd-2.9.1.0.15.so.0 => /usr/lib/libbfd-2.9.1.0.15.so.0
(0x000001555566c000)
        libc.so.6.1 => /usr/lib/libc.so.6.1 (0x00000155557d8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000000000000000)

ldd `which cc`
        libc.so.6.1 => /lib/libc.so.6.1 (0x000001555555c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000000000000000)

ld-linux.so.2 both have the same entry point.  "ifconfig" has the same entry
into libc as cc.  More testing with other progrmas show that they enter libc
at varying places.  All the "broken" programs depend on libbfd it seems:
ldd `which strings`
        libbfd-2.9.1.0.15.so.0 => /usr/lib/libbfd-2.9.1.0.15.so.0
(0x0000015555556000)
        libc.so.6.1 => /usr/lib/libc.so.6.1 (0x00000155556c6000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0000000000000000)

ls -l libbfd*
lrwxrwxrwx   1 root     root           26 Apr 30 14:29
libbfd-2.9.1.0.15.so.0 -> libbfd-2.9.1.0.15.so.0.0.0
-rwxr-xr-x   1 root     root      1454276 Oct 13  1998
libbfd-2.9.1.0.15.so.0.0.0
-rw-r--r--   1 root     root      2887892 Oct 13  1998 libbfd.a
-rw-r--r--   1 root     root          482 Oct 13  1998 libbfd.la
lrwxrwxrwx   1 root     root           26 Apr 30 14:29 libbfd.so ->
libbfd-2.9.1.0.15.so.0.0.0

As far as I can see, everything should be in order here.

rpm -q --whatrequires libbfd-2.9.1.0.15.so.0
binutils-2.9.1.0.15-1
rpm -q --whatprovides libbfd-2.9.1.0.15.so.0
binutils-2.9.1.0.15-1

And `strace as`:
execve("/usr/bin/as", ["as"], [/* 18 vars */]) = 0
brk(0)                                  = 0x12014bf08
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
directory)
open("/usr/lib/libopcodes-2.9.1.0.15.so.0", O_RDONLY) = 3
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555566000
munmap(0x15555566000, 8192)             = 0
mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555666000
mprotect(0x15555672000, 1065720, PROT_NONE) = 0
mmap(0x15555766000, 1065720, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x15555766000
close(3)                                = 0
open("/usr/lib/libbfd-2.9.1.0.15.so.0", O_RDONLY) = 3
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555566000
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555568000
munmap(0x15555566000, 8192)             = 0
mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555778000
mprotect(0x155557de000, 1072496, PROT_NONE) = 0
mmap(0x155558d8000, 1072496, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x155558d8000
close(3)                                = 0
open("/usr/lib/libc.so.6.1", O_RDONLY)  = 3
mmap(0, 0, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x15555566000
munmap(0x15555566000, 8192)             = 0
mmap(0, 8192, PROT_NONE, 0 /* MAP_??? */, 0, 0) = 0x155558e4000
mprotect(0x15555a02000, 1115676, PROT_NONE) = 0
mmap(0x15555af4000, 1115676, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x15555af4000
mmap(0x15555b0e000, 1115676, PROT_NONE, 0 /* MAP_??? */, 0, 0) =
0x15555b0e000
close(3)                                = 0
write(2, "as", 2as)                       = 2
write(2, ": error in loading shared librar"..., 36: error in loading shared
libraries
) = 36
write(2, "/usr/lib/libc.so.6.1", 20/usr/lib/libc.so.6.1)    = 20
write(2, ": ", 2: )                       = 2
write(2, "undefined symbol: _dl_initial_se"..., 40undefined symbol:
_dl_initial_searchlist) = 40
write(2, "", 0)                         = 0
write(2, "", 0)                         = 0
write(2, "\n", 1
)                       = 1
exit(127)                               = ?

I am now at a complete and total loss.  I don't see anything wrong with this
at all.  Could someone be so kind as to verify some of these numbers that
I have or tell me what I should do next?  So far, nobody seems to be able to
cast much insight into this problem, and I can't do much else without a
working binutils package ...

Thanks in advance,
Christopher


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A guru problem (shared libs)
       [not found] <19990505015545.B23427@twiddle.net>
@ 1999-05-06 15:35 ` Christopher Curtis
  1999-05-06 22:18   ` Christopher Curtis
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Curtis @ 1999-05-06 15:35 UTC (permalink / raw)
  To: Richard Henderson; +Cc: axp-list

On Wed, 5 May 1999, Richard Henderson wrote:

> On Wed, May 05, 1999 at 01:32:55AM -0500, Christopher W. Curtis wrote:
> > /usr/local/cdrom/yummy/installed/binutils-2.9.1.0.15-1.alpha.rpm
> > 
> > which should be the same as the one from the CD-ROM (I downloaded it off the
> > 'net, though, so I can't say for sure).
> 
> That's probably your problem -- _dl_initial_searchlist comes from
> glibc 2.1, and rawhide has been using glibc 2.1 for a while.

This is from ftp.cdrom.com:

/.4/linux/redhat/old-releases/redhat-5.2/alpha/RedHat/RPMS
-r--r--r--  1 root  wheel  2540552 Oct 14  1998 binutils-2.9.1.0.15-1.alpha.rpm

And this is what I have installed:

-r--r--r--   1 root root   2540552 Feb 25 22:16 binutils-2.9.1.0.15-1.alpha.rpm

I looked in the "updates" section for the alpha, but there's no binutils.
This is very puzzling.  Evidently there's *something* left over from my
botched glibc 2.1 install, but I absolutely cannot find it.  I've rebuilt
the RPM database and it says I have glibc-2.0.7-29 installed and *I* can't
find any 2.1 files laying around.  Everything in /lib is linked to 2.0.7
versions.  The only possible vestages left are extra files that don't show
up in 'ldd's.

(...time passes...)

I just downloaded glibc2.1 from rawhide and did an "rpm -qvfp glibc*" and
looked at its contents, and removed the only file left (libSegFault.so)
from its install.  I then forced a reinstallation of binutils and tried to
run it, but with the same erroneous results.

From /lib, I did:
for file in * ; do rpm -q --file $file ; done 2>/dev/null |sort -u
e2fsprogs-1.12-2
egcs-1.0.3a-14
filesystem-1.3.2-3
glibc-2.0.7-29
libtermcap-2.0.8-10
pam-0.64-4
procps-1.2.9-2
pwdb-0.55-1

Comparing these against what I have for the CDROM, pam-0.64-4 was upgraded
from pam-0.64-3, but everything else is correct.  As far as I can tell,
there is nothing left of glibc2.1 and something else *must* be wrong.

The problem to me seems to point to libbfd; the only odd thing there is
that libbfd comes with the binutils package, and nobody else seems to be
having problems with it.

Here are my filesizes if someone would be so kind to check theirs:
4462177 Oct 12  1998 /lib/libc-2.0.7.so
 301815 Oct 12  1998 /lib/ld-2.0.7.so
1454276 Oct 13  1998 /usr/lib/libbfd-2.9.1.0.15.so.0.0.0
 277168 May  6 11:19 /usr/bin/as

This is a redhat 5.2 system, of course...

Thanks again,
Christopher


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A guru problem (shared libs)
  1999-05-06 15:35 ` Christopher Curtis
@ 1999-05-06 22:18   ` Christopher Curtis
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Curtis @ 1999-05-06 22:18 UTC (permalink / raw)
  To: axp-list; +Cc: Richard Henderson

Hello all,

I'd like to thank everyone who responded to me and especially
rth@twiddle.net for trying to help figure out why my binutils package was
not performing.  I'd like to say that I've successfully now figured it
out!  The problem appears to have been a rogue glibc2.1 installation into
/usr/lib.  I noticed that there were some glibc2.1 type files in that
directory and removing them has solved the problem.

Specifically what was wrong I cannot say.  libbfd.so lives in /usr/lib
instead of /lib; and binutils is the only package that depends on libbfd,
making me think that was the problem.  What appears to have happened,
though, is libbfd itself, having lived in /usr/lib, first looked in
/usr/lib for libc.so, despite ldd reporting it looking in /lib for libc.

I believe this to be improper behavior, but I would not consider myself
expert enough to make such a determination.  /lib is listed before
/usr/lib in my ld.so.conf file, and my guess is that once /lib had been
exhausted and /usr/lib was searched (for libbfd) it resumed at that point
when trying to resolve libc, rather than restarting at the beginning of
the search tree.

Would anyone care to comment on this assertation?  Such a change may want
to be propogated up the tree if it is persisting in glibc 2.1 (which I do
not want to even *think* about trying to install again!)  =)

Christopher



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-05-06 23:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-29  1:31 A guru problem (shared libs) Christopher W. Curtis
1999-05-02 20:13 ` Richard Henderson
1999-05-05  6:32   ` Christopher W. Curtis
     [not found] <19990505015545.B23427@twiddle.net>
1999-05-06 15:35 ` Christopher Curtis
1999-05-06 22:18   ` Christopher Curtis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox