This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Problems using libstdc++ on LinuxPPC 2000
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: Problems using libstdc++ on LinuxPPC 2000
- From: Paul Marquis <marquis at clearway dot com>
- Date: Tue, 23 May 2000 16:47:48 -0400
Hi all,
I've built libstdc++ (2.90.8 and the latest CVS snapshot) on LinuxPPC
2000 with gcc 2.95.2 and the simple hello world program seg faults at
start up:
#include <iostream>
int main(int argc, char **argv)
{
cout << "hello world" << endl;
}
The program crashes in the static initialization of a filebuf
(__cfile_init). Here is a stack trace:
#0 chunk_free (ar_ptr=0x7f454c46, p=0x100ef80c) at malloc.c:3051
#1 0xff44e68 in free () at malloc.c:2952
#2 0x100c9d4c in basic_string<char, char_traits<char>,
allocator<char> >::_Rep\
::_M_destroy (this=0x100ef814, __a=@0x100ef80c)
at ../../../../gcc-2.95.2/libstdc++/bits/string.tcc:242
#3 0x1000c1b0 in locale::classic ()
at ../../../../gcc-2.95.2/libstdc++/bits/basic_string.h:183
#4 0x10044120 in basic_filebuf<char, char_traits<char>
>::basic_filebuf (
this=0x100ef050) at
../../../../gcc-2.95.2/libstdc++/bits/localefwd.h:302
#5 0x10004f18 in __static_initialization_and_destruction_0
(__initialize_p=1,
__priority=65535) at
../../../../gcc-2.95.2/libstdc++/src/stdstreams.cc:35
#6 0x10006084 in global constructors keyed to __cfileinit ()
at ../../../../gcc-2.95.2/libstdc++/bits/std_istream.h:72
#7 0x100c72f4 in __do_global_ctors_aux ()
at ../../gcc-2.95.2/gcc/cp/tinfo2.cc:300
#8 0x100da5a4 in _init ()
#9 0xff0b658 in __libc_start_main ()
at ../sysdeps/powerpc/elf/libc-start.c:106
#10 0x0 in ?? ()
Here are the options I used when building gcc/libstdc++:
--prefix=/usr/local/gcc
--enable-long_long
--enable-threads=posix
--disable-namespaces
--enable-languages=c++
Could this simply be a configuration issue? Any pointers?
FYI, this program works on Linux x86 (RedHat 6.0 and RedHat 6.1) with
the gcc/libstdc++ built with the same configuration options.
--
Paul Marquis
marquis@clearway.com
"The brain is a wonderful organ. It starts working the moment you
get up in the morning and does not stop until you get into the
office." -- Robert Frost