Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Wani__Nehal
Beginner
615 Views

Intel Compiler & stdc++fs & debug mode doesn't work

$ cat main.x.cpp 
#include <iostream>
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
int main()
{
    std::cout << "Current path is " << fs::current_path() << '\n';
}

$ icpc main.x.cpp -lstdc++fs -std=c++14   # Works!


$ icpc main.x.cpp -lstdc++fs -std=c++14 -g   # Doesn't work
/spare/scratch/icpcNgdXiG.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::experimental::filesystem::v1::path::string<char, std::char_traits<char>, std::allocator<char> >(std::allocator<char> const&) const':
/spare/scratch/tmp-e31ZpjU-infra/gcc/5.4.0/include/c++/5.4.0/experimental/fs_path.h:822: undefined reference to `std::codecvt_utf8<char, 1114111ul, (std::codecvt_mode)0>::codecvt_utf8(unsigned long)'
/spare/scratch/tmp-e31ZpjU-infra/gcc/5.4.0/include/c++/5.4.0/experimental/fs_path.h:822: undefined reference to `std::codecvt_utf8<char, 1114111ul, (std::codecvt_mode)0>::~codecvt_utf8()'
/spare/scratch/tmp-e31ZpjU-infra/gcc/5.4.0/include/c++/5.4.0/experimental/fs_path.h:825: undefined reference to `std::codecvt_utf8<char, 1114111ul, (std::codecvt_mode)0>::~codecvt_utf8()'

$ icpc main.x.cpp -lstdc++fs -std=c++14 -g -mGLOB_opt_level=1  # Works!


This has been tested with Intel compilers 16 to 19 and the behavior is same.

0 Kudos
5 Replies
RahulV_intel
Moderator
615 Views

Hi,

It looks like a bug. We are able to reproduce this error. We will escalate this issue to the concerned team.

 

Rahul

Viet_H_Intel
Moderator
615 Views

I've opened a case with the compiler Developer. Case# is CMPLRIL0-32514. Thanks,

Viet_H_Intel
Moderator
177 Views

Can you use one of these workarounds?

$ icpc t3.cpp -std=c++14  -lstdc++fs -g -O1

$ icpc t3.cpp -std=c++14  -lstdc++fs -g -O2

$ icpc t3.cpp -std=c++14  -lstdc++fs -g -O3

$ icpx t3.cpp -std=c++14  -lstdc++fs -g

$


Thanks,





ArpitaP_Intel
Moderator
142 Views

Hi Nehal,


Could you please let us know if your issue is resolved or not?


Regards,

Arpita


PrasanthD_intel
Moderator
123 Views

Hi Nehal,


We are closing this thread as we haven't heard back from you. We will no longer respond to 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


Regards

Prasanth


Reply