Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: build broken -groff and c++ compiler



Hi,

Christos Zoulas wrote:
#include <iostream>
int
main(int argc, char *argv[])
{
         std::cerr << "Hello World" << std::endl;
         return 0;
}
it compiles, but fails:

grid$ g++ hello.cc
grid$ ./a.out
[1]   Segmentation fault (core dumped) ./a.out

grid$ ldd a.out
a.out:
        -lstdc++.7 => /usr/lib/libstdc++.so.7
        -lgcc_s.1 => /usr/lib/libgcc_s.so.1
        -lm.0 => /usr/lib/libm.so.0
        -lc.12 => /usr/lib/libc.so.12

Program received signal SIGSEGV, Segmentation fault.
0xbbb5c338 in std::ostream::sentry::sentry(std::ostream&) ()
   from /usr/lib/libstdc++.so.7
(gdb) bt
#0  0xbbb5c338 in std::ostream::sentry::sentry(std::ostream&) ()
   from /usr/lib/libstdc++.so.7
#1 0xbbb5cae9 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int) () from /usr/lib/libstdc++.so.7 #2 0xbbb5cf1c in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) () from /usr/lib/libstdc++.so.7
#3  0x0804898e in main ()


Riccardo

PS: building gcc naively as I proposed, fails when compiling "libm"...




Home | Main Index | Thread Index | Old Index