configure thinks that my g++ does not support STL or ISO C++ standard library
Jay F Shachter
jay@m5.chi.il.us
Sun Mar 17 13:41:00 GMT 2002
I don't assert that this is a gcc bug; it is more likely that I am
doing something wrong, and I hope that you can tell me how to fix it.
The ImageMagick "configure" script, as I indicated, thinks that my g++
does not support either the Standard Template Library, or the ISO C++
standard library.
Here is my output from gcc -v:
Reading specs from /gnu/lib/gcc-lib/sparc-sun-solaris2.7/3.0.3/specs
Configured with: /gnu/src/gcc-3.0.3/configure --prefix=/gnu --with-gnu-as --with-gnu-ld --with-system-zlib : (reconfigured) /gnu/src/gcc-3.0.3/configure --prefix=/gnu --with-gnu-as --with-gnu-ld --with-system-zlib --enable-languages=c,c++,fortran : (reconfigured) /gnu/src/gcc-3.0.3/configure --prefix=/gnu --with-gnu-as --with-gnu-ld --with-system-zlib --enable-languages=c,c++,fortran,objc : (reconfigured) /gnu/src/gcc-3.0.3/configure --prefix=/gnu --with-gnu-as --with-gnu-ld --with-system-zlib
Thread model: posix
gcc version 3.0.3
Here are the relevant excerpts from the configure output:
First, the STL test:
configure:24704: checking whether the compiler supports Standard Template Library
configure:24734: g++ -c -O2 -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/src/x/ImageMagick/lcms/src -I/usr/src/x/ImageMagick/ttf/include -I/opt/jay/include -I/usr/openwin/include -I/usr/openwin/include/X11 conftest.cc >&5
In file included from /gnu/include/g++-v3/cstdio:31,
from /gnu/include/g++-v3/sparc-sun-solaris2.7/bits/c++io.h:35,
from /gnu/include/g++-v3/bits/fpos.h:39,
from /gnu/include/g++-v3/bits/std_iosfwd.h:41,
from /gnu/include/g++-v3/bits/stl_algobase.h:77,
from /gnu/include/g++-v3/bits/std_list.h:61,
from /gnu/include/g++-v3/list:31,
from configure:24718:
/gnu/include/g++-v3/bits/std_cstdio.h:97: `fgetpos' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:99: `fopen' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:104: `freopen' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:107: `fsetpos' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:126: `tmpfile' not declared
configure:24737: $? = 1
configure: failed program was:
#line 24717 "configure"
#include "confdefs.h"
#include <list>
#include <deque>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif
int
main ()
{
list<int> x; x.push_back(5);
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
;
return 0;
}
Second, the ISO test:
configure:24639: checking whether the compiler supports ISO C++ standard library
configure:24669: g++ -c -O2 -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/src/x/ImageMagick/lcms/src -I/usr/src/x/ImageMagick/ttf/include -I/opt/jay/include -I/usr/openwin/include -I/usr/openwin/include/X11 conftest.cc >&5
In file included from /gnu/include/g++-v3/cstdio:31,
from /gnu/include/g++-v3/sparc-sun-solaris2.7/bits/c++io.h:35,
from /gnu/include/g++-v3/bits/fpos.h:39,
from /gnu/include/g++-v3/bits/std_iosfwd.h:41,
from /gnu/include/g++-v3/bits/std_ios.h:39,
from /gnu/include/g++-v3/bits/std_ostream.h:39,
from /gnu/include/g++-v3/bits/std_iostream.h:40,
from /gnu/include/g++-v3/iostream:31,
from configure:24653:
/gnu/include/g++-v3/bits/std_cstdio.h:97: `fgetpos' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:99: `fopen' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:104: `freopen' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:107: `fsetpos' not declared
/gnu/include/g++-v3/bits/std_cstdio.h:126: `tmpfile' not declared
configure:24672: $? = 1
configure: failed program was:
#line 24652 "configure"
#include "confdefs.h"
#include <iostream>
#include <map>
#include <iomanip>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif
int
main ()
{
return 0;
;
return 0;
}
I went to ftp.gnu.org and retrieved the most recent version of
libstdc++ and determined that it was version 2.90.8; and for that
reason, I did not install it, because the version of libstdc++
currently on my system is version 3.0.2 (apparently libstdc++ is now
incorporated into gcc, and is no longer updated as a separate product).
Why is g++ generating the above compile-time errors, which lead
configure to conclude that I have neither STD nor ISO C++, and what
must I do to produce successful compilation of the test programs?
I thank you in advance for your reply.
Jay F. Shachter
6424 N Whipple St
Chicago IL 60645-4111
(1-773)7613784
jay@m5.chi.il.us
More information about the Gcc-bugs
mailing list