This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: Compiling libstdc++-2.90.7 on Solaris 7



> This was fixed shortly after the release. Use the CVS sources and you
> should be fine for Solaris 6 and Solaris 7 and linux.
>
> Sorry about the confusion.
>
> -benjmamin

Benjamin,

	Thanks, I was able to compile the library successfully with the
CVS sources. However, when I try to #include <iostream> in a program, it
segfaults. I've attached some information below. Please let me know what
could be causing this. I don't do much C++ programming and am trying to
get this installed by request of one of our users. Thanks for any help.

Viraj.

env |grep STDC
STDC3LIB=/usr/local/libstdc++-v3/lib
STDC3INC=/usr/local/libstdc++-v3/include/g++-v3

cat cool.cc
#include <iostream>

int main()
{
        return 0;
}
g++ -Wall -I$STDC3INC -L$STDC3LIB cool.cc -o cool

ldd cool
        libstdc++.so.3 =>        /usr/local/libstdc++-v3/lib/libstdc++.so.3
        libm.so.1 =>     /usr/lib/libm.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1

g++ --version
2.95.2

gdb ./cool
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...
(gdb) run
Starting program: ./cool 

Program received signal SIGSEGV, Segmentation fault.
0xff295564 in ctype<char>::ctype (this=0x2c408, __table=0x0, __del=false, 
    __refs=0) at ../../libstdc++/bits/locale_facets.h:320
320           : _Ctype_nois<char>(__refs), _M_table(__table == 0 ? _S_table: __table), 
Current language:  auto; currently c++
(gdb) bt
#0  0xff295564 in ctype<char>::ctype (this=0x2c408, __table=0x0, __del=false, 
    __refs=0) at ../../libstdc++/bits/locale_facets.h:320
#1  0xff291098 in locale::classic () at ../../libstdc++/src/locale.cc:331
#2  0xff2eaaa8 in locale::_S_initialize ()
    at ../../libstdc++/bits/localefwd.h:303
#3  0xff2e9a84 in locale::locale (this=0x2aee8)
    at ../../libstdc++/bits/localefwd.h:410
#4  0xff2aa958 in basic_streambuf<char, char_traits<char> >::basic_streambuf (
    this=0x2aec0) at ../../libstdc++/bits/std_streambuf.h:286
#5  0xff2ae77c in basic_filebuf<char, char_traits<char> >::basic_filebuf (
    this=0x2aec0, __fd=1, __mode=2) at ../../libstdc++/bits/fstream.tcc:66
#6  0xff28de98 in ios_base::Init::Init (this=0x2ac80)
    at ../../libstdc++/src/ios.cc:88
#7  0x142c4 in __static_initialization_and_destruction_0 ()
#8  0x14300 in global constructors keyed to main ()
#9  0x182b8 in __do_global_ctors_aux ()
    at ../../gcc-2.95.2/gcc/cp/tinfo2.cc:300
#10 0x182f0 in _init () at ../../gcc-2.95.2/gcc/cp/tinfo2.cc:300
(gdb) 




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