Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Problem with icc for Linux and STL

steffenw
Beginner
419 Views
Hello everybody,
I have installed the icc V10.1.012 on a OpenSuSE 10.3, using the gcc-4.2. If I now try to compile a file that includes a STL-header I get error messages like this:

/usr/include/c++/4.2.1/bits/stl_algobase.h(321): error: ostreambuf_iterator is not a template
ostreambuf_iterator<_CharT> >::__type

or that:

/usr/include/c++/4.2.1/ext/atomicity.h(66): error: variable "__gnu_cxx::_Atomic_word" is not a type name
static inline _Atomic_word



Has anybody an idea, what goes wrong?

greetings,
Steffen
0 Kudos
4 Replies
TimP
Honored Contributor III
419 Views
Apparently, the previous thread in this forum on this topic has been removed. This appears to be a special version of a gnu extension, possibly peculiar to g++ 4.2.1. Note that icpc doesn't claim compatibility with g++ 4.2.1 The bug is discussed in
http://bugs.gentoo.org/show_bug.cgi?id=201596
Among the ways to deal with it are to edit atomicity.h to disable the section
beginning with #if defined _GLIBCXX_ATOMIC_BUILTINS.
0 Kudos
steffenw
Beginner
419 Views
That seems to be only part of my problem. I have switched to g++ 4.2.0. And I still get error messages of the type:

/opt/gcc-420/lib/gcc/i586-suse-linux/4.2.0/include/c++/bits/stl_algobase.h(321): error: ostreambuf_iterator is not a template
ostreambuf_iterator<_CharT> >::__type

Additionally, I have also commented out the "atomic builtins" in atomicity.h, but that has no effect to the error messages above.



0 Kudos
TimP
Honored Contributor III
419 Views
The change I made in g++ 4.2.1 atomicity.h is to set
#if 0 && defined _GLIBCXX_ATOMIC_BUILTINS
so that the #else section of that header must be in force.
Others have reported different solutions, including use of 4.2.2, as well as the supported choice of g++ 4.1.
I suspect that compatibility with 4.3.0 is a more serious problem, now that it has been released.
0 Kudos
steffenw
Beginner
419 Views
Hi,

I get the same error also with gcc 4.1.3. I could not try this until now with 4.1.0, because I did not find the rpms, but I will try this also, if it could help.

I also used your construction (&& 0) to comment out the section of the header. It did not help.



0 Kudos
Reply