build 'make check' in tests/cxx: error in tests.h (HAVE_SSTREAM configure bug)

anirkko at insel.ch anirkko at insel.ch
Wed Apr 25 21:22:48 CEST 2007


Hi
gmp-4.2.1 build aborts during 'make check' in tests/cxx/
because HAVE_SSTREAM is not set in line 421 of file tests/tests.h
(see output below).
Error during configure? Header file with definition of HAVE_SSTREAM
not included?

Workaround for my system: Replace
  #if HAVE_SSTREAM
by
  #if 1
then everything works and all tests PASS.

Looking at the whole directory tree closer with grep, the only two
files which contain HAVE_SSTREAM are the above tests/tests.h
and the file config.in, which has only '#undef HAVE_SSTREAM'
However, sstream is standard nowadays according to the gcc-4.1.2 messages.

Best regards,
Arto


-------------------------------------------------------------------
Version:           GMP version 4.2.1
Test program:      none necessary (run 'make check' on my platform).
Description:       see above
Screen output:     see below
Configuration:
    setenv CFLAGS = '-O3 -mcpu=supersparc -mno-app-regs'
    setenv CXXFLAGS = '-O3 -mcpu=supersparc -mno-app-regs'
    setenv MPN_PATH " sparc32/v8 sparc32 generic"
    configure \
        --prefix=/usr/local/...
        --disable-nls \
        --with-gnu-as \
        --with-gnu-ld \
        --enable-static \
        --disable-shared \
        --enable-cxx=detect \
        --enable-mpbsd \
      |& /bin/tee -a "$FILE_LOG" || exit 2
Compiler:          gcc-4.1.2
System:            SunOS workstation 5.6 Generic_105181-14 sun4u sparc SUNW,Ultra-1
config.guess:      sparcv9-sun-solaris2.6
configfsf.guess:   sparc-sun-solaris2.6
config.log:
     has a size of 170 kByte. If you need it, contact me.
     a grep reveals that it doesn't contain any HAVE_SSTREAM.
     (in fact, neither has configure).
     % grep -i STREAM config.log
     Test compile: std iostream
     %


-------------------------------------------------------------------
Output of build ('make check'):
...
...
gmake[4]: Entering directory `/build/gmp-4.2.1_static-obj5_g412-b2175020070420-O3-mcpu=supersparc-mno-app-regs/tests/cxx'
g++ -DHAVE_CONFIG_H -I. -I/build/gmp-4.2.1/tests/cxx -I../.. -I/build/gmp-4.2.1 -I/build/gmp-4.2.1/tests    -O3 -mcpu=supersparc -mno-app-regs -c -o t-assign.o /build/gmp-4.2.1/tests/cxx/t-assign.cc
In file included from /usr/local/gcc/gcc-4.1.2/bin/../lib/gcc/sparc-sun-solaris2.6/4.1.2/include/c++/backward/strstream:51,
                 from /build/gmp-4.2.1/tests/tests.h:425,
                 from /build/gmp-4.2.1/tests/cxx/t-assign.cc:30:
/usr/local/gcc/gcc-4.1.2/bin/../lib/gcc/sparc-sun-solaris2.6/4.1.2/include/c++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/build/gmp-4.2.1/tests/tests.h:429: error: 'string' does not name a type
gmake[4]: *** [t-assign.o] Error 1
...
...


-------------------------------------------------------------------
And text from
/usr/local/gcc/gcc-4.1.2/bin/../lib/gcc/sparc-sun-solaris2.6/4.1.2/include/c++/backward/strstream:

// WARNING: The classes defined in this header are DEPRECATED.  This
// header is defined in section D.7.1 of the C++ standard, and it
// MAY BE REMOVED in a future standard revision.  You should use the
// header <sstream> instead.



More information about the gmp-bugs mailing list