This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ Hello World segfaults


Hi
I've checked out the source from CVS and tried to make it run
on an i686-pc-linux-gnu with glibc-2.1.3.  All compiled fine.
--> config.status
#!/bin/sh
# This file was generated automatically by configure.  Do not edit.
# This directory was configured as follows:
../gcc/configure 
--with-gcc-version-trigger=/home/fmi/DownLoads/gcc/gcc/version.c 
--host=i686-pc-linux-gnu --prefix=/home/tools/gcc-devel 
--enable-threads=posix --enable-libstdcxx-v3 --norecursion
#  using "mt-frag"

When I'm trying to compile this...
#include <iostream>
using namespace std;
int main(void) {
   cout << "Hello world ..." << endl;
   return 0;
}                                                                       
                                                                        
                 
I get a SEGV. This SEGV appears even with a -static option.
Here's GDB output
(gdb) where
#0 0x0 in ?? ()
#1 0x804992e in __register_frame_info (begin=0x80b8ae8, ob=0x80c52a0)
at ../../gcc/gcc/frame-dwarf2.c:563
#2 0x80481c1 in frame_dummy ()
#3 0x80480d9 in _init ()
#4 0x804a9be in __libc_start_main (main=0x80481e0 <main>, argc=1,
argv=0xbffff964, init=0x80480b4 <_init>, fini=0x80ac2b0 <_fini>,
rtld_fini=0, stack_end=0xbffff95c) at ../sysdeps/generic/libc-start.c:85
en with -static.


Are there any option I should pass when configuring ???
And is there a special build procedure (as it seems make bootstrap does not
work anymore when building java.) ?

I've compiled gcc-2.95.2 a few days ago with no problem.

Thanx for any information.


Francis



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]