* upgrade causing segmentation faults and version `GLIBC_PRIVATE' not found
@ 2003-03-22 2:49 Jeremy C. Reed
2003-03-22 21:10 ` LLeweLLyn Reese
0 siblings, 1 reply; 2+ messages in thread
From: Jeremy C. Reed @ 2003-03-22 2:49 UTC (permalink / raw)
To: gcc-help
I built glibc-2.3.2 with glibc-linuxthreads.
My prefix was /usr and "make install" broke because /lib/ld-linux.so.2 is
removed and the next command "ln" didn't exist. I modified Makerules to
not delete that file and just do "ln -fs" instead, but ln then has a
segmentation fault.
So I installed with install_root defined.
Then I used pax to copy all those new files to /.
Then all was broken again.
I added backed up my /lib to /libold, so I could do:
LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ls
An example, of using my /bin/ls with the new libs:
$ LD_LIBRARY_PATH=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib
/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/ld-linux.so.2
/bin/ls
Segmentation fault
Another example:
$ LD_LIBRARY_PATH=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib
LD_PRELOAD=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/ld-linux.so.2
/usr/bin/ls
/usr/bin/ls: /lib/ld-linux.so.2: version `GLIBC_PRIVATE' not found
(required by
/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/libc.so.6)
My original system:
glibc-2.1.2-15 (rpm version?)
glibc-devel-2.1.2-15 (rpm version?)
glibc-profile-2.1.2-15 (rpm version?)
(but most of that is overwritten)
/lib/libc-2.0.7.so
/lib/libc-2.1.2.so
/lib/libc.so.5 -> libc.so.5.4.38
/lib/libc.so.5.4.38
/lib/libc.so.6 -> /lib/libc-2.1.2.so
Linux 2.2.14-3 kernel.
It was Turbo Linux 6.0 English Server (Coyote). But many utilities have
changed. I have been replacing all software from building recent from
source.
It had binutils-2.9.1.0.25-7 installed. But I overwrote it with
binutils-2.13.2.1 (which I built from source).
It has gcc 2.95.2. "rpm -q -a" shows:
gcc-2.95.2-2
gcc-compat-2.7.2.3-2
gcc-g++-2.95.2-2
gcc-objc-2.95.2-2
I built gcc 3.2.1 from source and installed to /usr/gcc-3.2.1/. I used it
to build glibc.
My gmake is 3.80 (also built from source).
I looked through INSTALL and FAQ, and out-dated glibc2 howto, and the old
Installing glibc-2 on Linux howto,
To fix my problem, I simply fix the links back to:
ld-linux.so.2 -> ld-2.1.2.so
libc.so.6 -> libc-2.1.2.so
Many of the rest of the libs point to the 2.3.2 versions, like:
libdl.so.2 -> libdl-2.3.2.so
I would guess that ld-2.3.2.so and libc-2.3.2.so would be compatible, but
they don't seem to be.
Some more examples:
$ /usr/bin/ldd /usr/bin/ldd
lddlibc4: /lib/libc.so.6: version `GCC_3.0' not found (required by
lddlibc4)
$ /usr/bin/ldd /bin/ls
libc.so.6 => /lib/libc.so.6 (0x2aac6000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000)
$ /usr/bin/ldd /sbin/init
libc.so.6 => /lib/libc.so.6 (0x2aac6000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000)
$ /usr/bin/ldd --version | head -1
ldd (GNU libc) 2.3.2
$ /sbin/ldconfig -V | head -1
ldconfig (GNU libc) 2.3.2
Everything is fine now, but ...
# /sbin/ldconfig
$ ls
Segmentation fault
$ LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ls -l
/lib/ld-linux.so.2 /lib/libc.so.6
lrwxrwxrwx 1 root root 11 Mar 21 17:41 /lib/ld-linux.so.2
-> ld-2.3.2.so
lrwxrwxrwx 1 root root 13 Mar 21 17:41 /lib/libc.so.6 ->
libc-2.3.2.so
# LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ln -sf /lib/libc
libc-2.0.7.so libc.so.5 libcom_err.so.2 libcrypt-2.1.2.so
libc-2.1.2.so libc.so.5.4.38 libcom_err.so.2.0 libcrypt-2.3.2.so
libc-2.3.2.so libc.so.6 libcrypt-2.0.7.so libcrypt.so.1
# LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ln -sf /lib/libc-2.1.2.so /lib/libc.so.6
$ /bin/ls -l /lib/ld-linux.so.2 /lib/libc.so.6
lrwxrwxrwx 1 root root 16 Mar 21 17:43 /lib/ld-linux.so.2
-> /lib/ld-2.1.2.so
lrwxrwxrwx 1 root root 18 Mar 21 17:44 /lib/libc.so.6 ->
/lib/libc-2.1.2.so
(The example above showed that ldconfig making new links made my system
basically unusable until I repaired only the two links.)
Any suggestions?
Jeremy C. Reed
http://bsd.reedmedia.net/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: upgrade causing segmentation faults and version `GLIBC_PRIVATE' not found
2003-03-22 2:49 upgrade causing segmentation faults and version `GLIBC_PRIVATE' not found Jeremy C. Reed
@ 2003-03-22 21:10 ` LLeweLLyn Reese
0 siblings, 0 replies; 2+ messages in thread
From: LLeweLLyn Reese @ 2003-03-22 21:10 UTC (permalink / raw)
To: Jeremy C. Reed; +Cc: gcc-help
"Jeremy C. Reed" <reed@reedmedia.net> writes:
> I built glibc-2.3.2 with glibc-linuxthreads.
glibc is a separate project, not part of gcc. Unfortunately I can't
seem to find the appropriate help forum for it - maybe
libc-alpha@gnu.org , or bug-glibc@gnu.org .
> My prefix was /usr and "make install" broke because /lib/ld-linux.so.2 is
> removed and the next command "ln" didn't exist. I modified Makerules to
> not delete that file and just do "ln -fs" instead, but ln then has a
> segmentation fault.
It's been some years since I did this, but I when I did, I built
staticly linked versions of all the tools used by make install. I
don't know if that's the best way, and I don't have the complete
list of tools - at the very least, gnu fileutils, gnu bash, and
gnu make. (I recall bash and fileutils have configure options to
build staticly, but I'm not sure about make.) I built all those
tools with --prefix=/root/, and put /root/bin first in my path
before running make install.
> So I installed with install_root defined.
>
> Then I used pax to copy all those new files to /.
>
> Then all was broken again.
You might find the FAQ helpful, particularly
http://sources.redhat.com/glibc/glibc-faq.html#s-2.3
>
> I added backed up my /lib to /libold, so I could do:
>
> LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ls
>
> An example, of using my /bin/ls with the new libs:
>
> $ LD_LIBRARY_PATH=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib
> /usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/ld-linux.so.2
> /bin/ls
> Segmentation fault
>
> Another example:
>
> $ LD_LIBRARY_PATH=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib
> LD_PRELOAD=/usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/ld-linux.so.2
> /usr/bin/ls
> /usr/bin/ls: /lib/ld-linux.so.2: version `GLIBC_PRIVATE' not found
> (required by
> /usr/pkgsrc/devel/glibc/work.tahoma/glibc-installed/lib/libc.so.6)
>
> My original system:
>
> glibc-2.1.2-15 (rpm version?)
2.1.2 is the glibc version. 15 is the rpm version - tweaks needed to
get packaging just right.
> glibc-devel-2.1.2-15 (rpm version?)
> glibc-profile-2.1.2-15 (rpm version?)
> (but most of that is overwritten)
>
> /lib/libc-2.0.7.so
> /lib/libc-2.1.2.so
> /lib/libc.so.5 -> libc.so.5.4.38
> /lib/libc.so.5.4.38
> /lib/libc.so.6 -> /lib/libc-2.1.2.so
>
> Linux 2.2.14-3 kernel.
>
> It was Turbo Linux 6.0 English Server (Coyote). But many utilities have
> changed. I have been replacing all software from building recent from
> source.
>
> It had binutils-2.9.1.0.25-7 installed. But I overwrote it with
> binutils-2.13.2.1 (which I built from source).
>
> It has gcc 2.95.2. "rpm -q -a" shows:
> gcc-2.95.2-2
> gcc-compat-2.7.2.3-2
> gcc-g++-2.95.2-2
> gcc-objc-2.95.2-2
>
> I built gcc 3.2.1 from source and installed to /usr/gcc-3.2.1/. I used it
> to build glibc.
>
> My gmake is 3.80 (also built from source).
>
> I looked through INSTALL and FAQ, and out-dated glibc2 howto, and the old
> Installing glibc-2 on Linux howto,
>
> To fix my problem, I simply fix the links back to:
> ld-linux.so.2 -> ld-2.1.2.so
> libc.so.6 -> libc-2.1.2.so
>
> Many of the rest of the libs point to the 2.3.2 versions, like:
> libdl.so.2 -> libdl-2.3.2.so
>
> I would guess that ld-2.3.2.so and libc-2.3.2.so would be compatible, but
> they don't seem to be.
>
> Some more examples:
>
> $ /usr/bin/ldd /usr/bin/ldd
> lddlibc4: /lib/libc.so.6: version `GCC_3.0' not found (required by
> lddlibc4)
>
> $ /usr/bin/ldd /bin/ls
> libc.so.6 => /lib/libc.so.6 (0x2aac6000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000)
>
> $ /usr/bin/ldd /sbin/init
> libc.so.6 => /lib/libc.so.6 (0x2aac6000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000)
>
> $ /usr/bin/ldd --version | head -1
> ldd (GNU libc) 2.3.2
>
> $ /sbin/ldconfig -V | head -1
> ldconfig (GNU libc) 2.3.2
>
> Everything is fine now, but ...
>
> # /sbin/ldconfig
>
> $ ls
> Segmentation fault
>
> $ LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ls -l
> /lib/ld-linux.so.2 /lib/libc.so.6
> lrwxrwxrwx 1 root root 11 Mar 21 17:41 /lib/ld-linux.so.2
> -> ld-2.3.2.so
> lrwxrwxrwx 1 root root 13 Mar 21 17:41 /lib/libc.so.6 ->
> libc-2.3.2.so
>
> # LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ln -sf /lib/libc
> libc-2.0.7.so libc.so.5 libcom_err.so.2 libcrypt-2.1.2.so
> libc-2.1.2.so libc.so.5.4.38 libcom_err.so.2.0 libcrypt-2.3.2.so
> libc-2.3.2.so libc.so.6 libcrypt-2.0.7.so libcrypt.so.1
>
> # LD_LIBRARY_PATH=/libold /libold/ld-linux.so.2 /bin/ln -sf /lib/libc-2.1.2.so /lib/libc.so.6
>
> $ /bin/ls -l /lib/ld-linux.so.2 /lib/libc.so.6
> lrwxrwxrwx 1 root root 16 Mar 21 17:43 /lib/ld-linux.so.2
> -> /lib/ld-2.1.2.so
> lrwxrwxrwx 1 root root 18 Mar 21 17:44 /lib/libc.so.6 ->
> /lib/libc-2.1.2.so
>
> (The example above showed that ldconfig making new links made my system
> basically unusable until I repaired only the two links.)
>
> Any suggestions?
>
> Jeremy C. Reed
> http://bsd.reedmedia.net/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-22 2:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-22 2:49 upgrade causing segmentation faults and version `GLIBC_PRIVATE' not found Jeremy C. Reed
2003-03-22 21:10 ` LLeweLLyn Reese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).