Please help me : libstdc++-v3 doesn't compile with GCC-2.95.2on Sparc-Solaris 2.6

Maurizio Loreti loreti@pd.infn.it
Fri Jan 19 00:07:00 GMT 2001


On Thu, 18 Jan 2001, Benjamin Kosnik wrote:

> gcc-20010115 should be fine. Do you have results from 'make
> check-target-libstdc++-v3' ? That will tell you what is going on with
> your c++ library that you just built.

To begin with, I understand that you, libstdc++ developers, have as target
to develop a final version 3 g++; but you also, please, understand that
somebody in the real world is developing for multiplatform environments
(for me Linux, Solaris, Compaq and Irix) and must use a modern standard
library as possible compliant with ISO/IEC 14882-1998.  The first
announcement I have seen for gcc v3 was for spring 2000.

libstdc++ 2.91 is an official snapshot of the standard library.  Well, you
may OR state that it is unusable, or give CLEAR INSTRUCTIONS about how to
use it.  Your web page asserts that it is usable with a 2.97 snapshot and
gives installation instructions.

For this particular problem, here are the details: gcc/g++ has been built
following STEP BY STEP the instructions in the libstdc++ web page, with
the statements:

cd ~/work
gzip -dc /usr/archive/dist/gcc-20010115.tar.gz | tar xof -
cd gcc-20010115
gzip -dc /usr/archive/dist/libstdc++-2.91.tar.gz | tar xof -
rm -rf libstdc++-v3
mv libstdc++-2.91 libstdc++-v3
cd ..
mkdir objdir && cd objdir
../gcc-20010115/configure --prefix=/usr/local/gcc --enable-libstdcxx-v3
make bootstrap
make -k check

The part of "make check" relevant to libstdc++ shows:
Detailed test results in ./testsuite/20010119-mkcheck.txt
+: pass, -b: build failure, -r: run failure, x: disabled
------------------------------------------------------------------------
static	shared	test
------------------------------------------------------------------------
-r	-r	17_intro/header_ciso646.cc
-r	-r	17_intro/header_fstream.cc
-r	-r	17_intro/header_iomanip.cc
-r	-r	17_intro/header_ios.cc
-r	-r	17_intro/header_iosfwd.cc
-r	-r	17_intro/header_iostream.cc
-r	-r	17_intro/header_istream.cc
-r	-r	17_intro/header_ostream.cc
-r	-r	17_intro/headers.cc
-r	-r	17_intro/header_sstream.cc
-r	-r	17_intro/header_streambuf.cc
-r	-r	18_support/numeric_limits.cc
-b	-b	20_util/auto_ptr.cc
-r	-r	21_strings/append.cc
-r	-r	21_strings/capacity.cc
-r	-r	21_strings/char_traits.cc
-r	-r	21_strings/compare.cc
-r	-r	21_strings/ctor_copy_dtor.cc
-r	-r	21_strings/element_access.cc
-r	-r	21_strings/find.cc
-r	-r	21_strings/insert.cc
-r	-r	21_strings/inserters_extractors.cc
-r	-r	21_strings/invariants.cc
-r	-r	21_strings/nonmember.cc
-r	-r	21_strings/operations.cc
-r	-r	21_strings/replace.cc
-r	-r	21_strings/rfind.cc
-r	-r	21_strings/substr.cc
-r	-r	22_locale/codecvt_char_char.cc
-r	-r	22_locale/codecvt_unicode_char.cc
-r	-r	22_locale/codecvt_unicode_wchar_t.cc
-r	-r	22_locale/codecvt_wchar_t_char.cc
-r	-r	22_locale/ctor_copy_dtor.cc
-r	-r	22_locale/ctype.cc
-r	-r	22_locale/ctype_char_members.cc
-r	-r	22_locale/ctype_wchar_t_members.cc
-r	-r	22_locale/facet.cc
-r	-r	22_locale/global_templates.cc
-r	-r	22_locale/operators.cc
-r	-r	22_locale/static_members.cc
-r	-r	23_containers/bitset_ctor.cc
-r	-r	23_containers/bitset_shift.cc
-b	-b	23_containers/map_operators.cc
-r	-r	23_containers/multiset.cc
-b	-b	23_containers/set_operators.cc
-r	-r	23_containers/vector_capacity.cc
-r	-r	23_containers/vector_ctor.cc
-r	-r	23_containers/vector_element_access.cc
-r	-r	23_containers/vector_modifiers.cc
-r	-r	24_iterators/istreambuf_iterator.cc
-r	-r	24_iterators/iterator.cc
-r	-r	25_algorithms/lower_bound.cc
-r	-r	25_algorithms/min_max.cc
-r	-r	26_numerics/binary_closure.cc
-r	-r	26_numerics/buggy_complex.cc
-r	-r	26_numerics/c_math.cc
-r	-r	26_numerics/complex_inserters_extractors.cc
-r	-r	26_numerics/complex_value.cc
-r	-r	26_numerics/valarray.cc
-r	-r	27_io/filebuf.cc
-r	-r	27_io/filebuf_members.cc
-r	-r	27_io/fpos.cc
-r	-r	27_io/ifstream_members.cc
-r	-r	27_io/ios_base_callbacks.cc
-r	-r	27_io/ios_base_members_static.cc
-r	-r	27_io/ios_ctor.cc
-r	-r	27_io/ios_manip_basefield.cc
-r	-r	27_io/ios_manip_fmtflags.cc
-r	-r	27_io/ios_members.cc
-r	-r	27_io/istream.cc
-r	-r	27_io/istream_extractor_arith.cc
-r	-r	27_io/istream_extractor_char.cc
-r	-r	27_io/istream_extractor_other.cc
-r	-r	27_io/istream_manip.cc
-r	-r	27_io/istream_seeks.cc
-r	-r	27_io/istream_sentry.cc
-r	-r	27_io/istream_unformatted.cc
-r	-r	27_io/istringstream_members.cc
-r	-r	27_io/narrow_stream_objects.cc
-r	-r	27_io/ofstream_members.cc
-r	-r	27_io/ostream.cc
-r	-r	27_io/ostream_inserter_arith.cc
-r	-r	27_io/ostream_inserter_char.cc
-r	-r	27_io/ostream_inserter_other.cc
-r	-r	27_io/ostream_manip.cc
-r	-r	27_io/ostream_seeks.cc
-r	-r	27_io/ostream_unformatted.cc
-r	-r	27_io/streambuf.cc
-r	-r	27_io/stringbuf.cc
-r	-r	27_io/stringstream.cc
-r	-r	27_io/wide_stream_objects.cc
-r	-r	ext/headers.cc
testrun == 1835 seconds

After a "make install" and a chenge in PATH, LD_LIBRARY_PATH and so on in
order to use this gcc-20010115 + libstdc++-2.91 environment, the following
well known program gives:

MLO@mlinux 11 $ cat hello.cxx
#include <iostream>

int main() {
  std::cout << "Hello, world!" << std::endl;
}
MLO@mlinux 12 $ g++ -ansi -Wall -fhonor-std -g -o hello hello.cxx
MLO@mlinux 13 $ ./hello
Segmentation fault (core dumped)
MLO@mlinux 14 $ gdb ./hello core
GNU gdb 5.0
Copyright 2000 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 "i686-pc-linux-gnu"...
Core was generated by `./hello'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/gcc/lib/libstdc++.so.3...done.
Loaded symbols for /usr/local/gcc/lib/libstdc++.so.3
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x40015047 in ?? () from /usr/local/gcc/lib/libstdc++.so.3
(gdb) where
#0  0x40015047 in ?? () from /usr/local/gcc/lib/libstdc++.so.3
#1  0x400d6690 in __libc_global_ctors () at soinit.c:53
#2  0x400d67df in _init (arg=0x1) at
../sysdeps/unix/sysv/linux/init-first.c:90
(gdb) quit

Tha last usable libstdc++ I have is 2.90.8 built with gcc 2.95.2.1 .

-- 
Maurizio Loreti                         http://www.pd.infn.it/~loreti/mlo.html
Univ. of Padova, Dept. of Physics - Padova, Italy            loreti@pd.infn.it




More information about the Libstdc++ mailing list