Community
cancel
Showing results for 
Search instead for 
Did you mean: 
97 Views

undefined reference to `std::__failed_assertion() with icpc on Fedora 34

Compiling the following small program

#include <vector>

int main ()
{
  std::vector<int> foo (3,100);
  std::vector<int> bar (5,200);
  foo.swap(bar);
  return 0;
}

with icpc on Fedora 34 leads to:

$ icpc -g -std=c++14 exe.cpp
ld: /tmp/icpcKut7mX.o: in function `std::vector<int, std::allocator<int> >::swap(std::vector<int, std::allocator<int> >&)':
/usr/include/c++/11/bits/stl_vector.h:1483: undefined reference to `std::__failed_assertion()'

Also see:  https://github.com/kokkos/ci-containers/issues/15

Labels (1)
0 Kudos
4 Replies
ArpitaP_Intel
Moderator
70 Views

Hi,


Thanks for reaching out to us.

We tried the reproducer in GCC 10 and GCC 11. It worked fine with GCC 10 but we could reproduce the same error with GCC 11.

 It works fine with GCC 11, if icpx compiler is used. So, if compiler is not an issue you can use the above combination. Please find more about icpx compiler in the below links:


https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-gui...


https://software.intel.com/content/www/us/en/develop/articles/porting-guide-for-icc-users-to-dpcpp-o...

 

We are working internally on the error, we will get back to you when we have some updates.  


Regards,

Arpita


Viet_H_Intel
Moderator
63 Views

Fedora* 34 is not yet an OS support by current Intel compilers.

Please refer Intel® oneAPI HPC Toolkit System Requirements for the list of OS supported.

Let us know if you still encounter the error on a supported OS.

Thanks,


53 Views

The last Fedora listed as supported is Fedora 31, which is end-of-life since end of 2020.

Using Fedora 33 for now seems to be a reasonable workaround.

I made a toy reproducer using docker here:
https://github.com/junghans/intel_icpc/blob/main/Dockerfile
Viet_H_Intel
Moderator
50 Views

Future Intel Compilers will support Fedora* 34. Can we close this thread for now?

Thanks,


Reply