From: "Martin Berger" <martin.berger@orange.net>
To: <gcc-help@gcc.gnu.org>
Subject: Re: problem with iostream
Date: Sat, 01 Apr 2000 00:00:00 -0000 [thread overview]
Message-ID: <000801bf9760$9bd75ba0$e801bc3e@default> (raw)
Message-ID: <20000401000000.MWNARH8-F9qTNicL-3rTiJRlBde-HuuCDSneOhiNyGE@z> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5277 bytes --]
> > hello, i have just upgraded to the latest
version of redhat linux > > and suddenly my g++ compiled programs fall
over.
Â
> From your description, it was not clear
whether the old binaries > stopped working on the new system, or whether
binaries created on the > new system with the new compiler would
break.
Â
thank you for your help. old binaries still work.
Only newly compiled ones coredump.
Â
> Also, it is not clear to me whether you have
installed the latest > redhat version "from scratch", or overwritten your
previous > installation. It may well be that there were still some old
files > lying around which should have been removed but
weren't.
Â
i have overwritten my previous (2 year old)
installation. i suspect that your analysis is correct. alas i am not
familiar enough with the g++ library system to work out which files are the
troublemakers. (btw: is there an easily accessible description of the
structure of g++ and its libraries, or do i have to read the code/man pages
to get the picture?)
Â
> To investigate this further, please try the
following commands:
Â
> ldd <your compiled program> > g++
-o <output file> <your source file> -v --trace-includes
Â
> rpm -qf <library name>
Â
the output is quoted below.
Â
thanks, martin
Â
i am using redhat release 6.1, kernel 2.2.12.20.
the output of ldd is:
Â
--------------------------------------------------------------------------
Â
 libm.so.6 => /lib/libm.so.6
(0x40018000) Â libc.so.6 => /lib/libc.so.6 (0x40035000) Â
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Â
--------------------------------------------------------------------------
Â
 lsl /lib/libm.so.6 Â
lrwxrwxrwx  1 root   Â
root          13 Mar 21 23:46
/lib/libm.so.6 -> libm-2.1.2.so  lsl /lib/libc.so.6 Â
lrwxrwxrwx  1 root   Â
root          13 Mar 21 23:46
/lib/libc.so.6 -> libc-2.1.2.so  lsl /lib/ld-linux.so.2 Â
lrwxrwxrwx  1 root   Â
root          11 Mar 21 23:46
/lib/ld-linux.so.2 -> ld-2.1.2.so
Â
 /lib> rpm -qf libm-2.1.2.so Â
glibc-2.1.2-11 Â /lib> rpm -qf libc-2.1.2.so Â
glibc-2.1.2-11  /lib> rpm -qf ld-2.1.2.so Â
glibc-2.1.2-11
Â
the output of g++ with the aforementioned command
line options is
as follows. --------------------------------------------------------------------------
Â
 Reading specs from
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/specs  gcc
version egcs-2.91.66 19990314 (egcs-1.1.2 release) Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/cpp -lang-c++ -v -undef
-D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -D__ELF__ -Dunix
-Di386 -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__i386__ -D__linux__
-D__unix -D__i386 -D__linux -Asystem(posix) -D__EXCEPTIONS -H -Asystem(unix)
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586
-D__i586__ -D__pentium -D__pentium__ test.cpp /tmp/ccBN0ncc.ii  GNU CPP
version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386 Linux/ELF) Â
#include "..." search starts here: Â #include <...> search starts
here: Â Â /usr/local/include/g++ Â Â
/usr/local/include  Â
/usr/local/i586-pc-linux-gnu/include  Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include  Â
/usr/include  End of search list. Â
/usr/local/include/g++/iostream  Â
/usr/local/include/g++/iostream.h   Â
/usr/local/include/g++/streambuf.h    Â
/usr/include/libio.h     Â
/usr/include/_G_config.h      Â
/usr/include/bits/types.h       Â
/usr/include/features.h        Â
/usr/include/sys/cdefs.h        Â
/usr/include/gnu/stubs.h       Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include/stddef.h      Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include/stddef.h     Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include/stdarg.h    Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/include/stdarg.h  Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/cc1plus /tmp/ccBN0ncc.ii
-quiet -dumpbase test.cc -version -o /tmp/ccIKwR7h.s  GNU C++ version
egcs-2.91.66 19990314 (egcs-1.1.2 release) (i586-pc-linux-gnu) compiled by GNU C
version egcs-2.91.66 19990314 (egcs-1.1.2 release). Â Â as -V -Qy -o
/tmp/ccVMJY2e.o /tmp/ccIKwR7h.s  GNU assembler version 2.9.1
(i386-redhat-linux), using BFD version 2.9.1.0.24 Â Â
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/collect2 -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o a.out /usr/lib/crt1.o /usr/lib/crti.o
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/crtbegin.o
-L/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66
-L/usr/local/i586-pc-linux-gnu/lib -L/usr/local/lib /tmp/ccVMJY2e.o -lstdc++ -lm
-lgcc -lc -lgcc /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.91.66/crtend.o
/usr/lib/crtn.o Â
next reply other threads:[~2000-04-01 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-26 12:18 Martin Berger [this message]
2000-03-26 13:24 ` Martin v. Loewis
2000-04-01 0:00 ` Martin v. Loewis
2000-04-01 0:00 ` Martin Berger
-- strict thread matches above, loose matches on Subject: below --
2000-03-24 3:11 martin.berger
2000-03-25 11:03 ` Martin v. Loewis
2000-04-01 0:00 ` Martin v. Loewis
2000-04-01 0:00 ` martin.berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000801bf9760$9bd75ba0$e801bc3e@default' \
--to=martin.berger@orange.net \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).