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

Compilation fails with -fno-exceptions on icpc 19 using gcc 8.2

doppler_shift
Beginner
1,224 Views

% g++-8.2 --version
g++-8.2 (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% icpc --version
icpc (ICC) 19.0.1.144 20181018
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.


% cat test.cpp

#include <memory>

int main(int argc, char** argv)
{
        return 0;
}


% icpc -gcc-name=gcc-8.2 -gxx-name=g++-8.2 -fno-exceptions -std=c++17 -o test test.cpp
In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(102): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
  ^

In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(103): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
  ^

In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(104): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
  ^

compilation aborted for test.cpp (code 2)
 

0 Kudos
9 Replies
Viet_H_Intel
Moderator
1,224 Views

This is a known issue. We have an internal case CMPLRIL0-25481 to track it.

0 Kudos
doppler_shift
Beginner
1,224 Views

Viet Hoang (Intel) wrote:

This is a known issue. We have an internal case CMPLRIL0-25481 to track it.

Thanks for the reply. Is there a workaround for now or do we have to wait for the next point release?

0 Kudos
Viet_H_Intel
Moderator
1,224 Views

I dont see a workaround suggested in the case. So, I guess you have to wait for the fix.

Thanks,

0 Kudos
doppler_shift
Beginner
1,224 Views

Any ETA for this fix? this bug is currently blocking our upgrade from ICC 18 to 19, which in turn is blocking us from using all the C++17 features that all other compilers support.

0 Kudos
doppler_shift
Beginner
1,224 Views

Still not fixed with Intel C++ 19.0 Update 2.

0 Kudos
doppler_shift
Beginner
1,224 Views

Still not fixed with Intel C++ 19.0 Update 3.

0 Kudos
Fein__Aaron_Max
Beginner
1,224 Views

this also seems like a blocker, eagerly awaiting fix :)

0 Kudos
doppler_shift
Beginner
1,224 Views

Still not fixed with Intel C++ 19.0 Update 4.

It's been nearly half a year since I originally reported this bug and we're still blocked from switching to v19. Is this ever going to get fixed or should we just give up waiting for it?

0 Kudos
Viet_H_Intel
Moderator
1,224 Views

It should be fixed in 19.0 Update 5.

0 Kudos
Reply