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

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

ChristophJunghans
1,587 Views

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
7 Replies
ArpitaP_Intel
Moderator
1,560 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-guide-and-reference/top/compiler-setup/using-the-command-line/invoking-the-compiler.html


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

 

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


Regards,

Arpita


0 Kudos
Viet_H_Intel
Moderator
1,553 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,


0 Kudos
ChristophJunghans
1,543 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
0 Kudos
Viet_H_Intel
Moderator
1,540 Views

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

Thanks,


0 Kudos
Viet_H_Intel
Moderator
1,482 Views

Let's close this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks,


0 Kudos
ChristophJunghans
1,473 Views

Is there an ETA for when Fedora 34 (and Fedora 35+) will be supported?

0 Kudos
Viet_H_Intel
Moderator
1,467 Views

I don't have an ETA, but will update you when it's available.

0 Kudos
Reply