cxxopts icon indicating copy to clipboard operation
cxxopts copied to clipboard

regex_error with up-to-date Intel compiler

Open susilehtola opened this issue 7 years ago • 7 comments

Trying to run the example compiled with the Intel 18 compiler

$ icpc --version
icpc (ICC) 18.0.2 20180210
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.

with

$ icpc -I../include -std=c++11 example.cpp 

fails with

$ ./a.out 
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted (core dumped)

susilehtola avatar Apr 05 '18 08:04 susilehtola

That's a bit unfortunate. Is it using an old GCC standard library or does Intel have one that claims to support regex?

jarro2783 avatar Apr 05 '18 21:04 jarro2783

It probably is using an old gcc standard library. This was on an RHEL 7 system, where IIRC G++ also gives the same error.

susilehtola avatar Apr 06 '18 05:04 susilehtola

I'm hitting this same issue of

terminate called after throwing an instance of 'std::regex_error' what(): regex_error

using

g++-5 --version g++-5 (Ubuntu 5.5.0-12ubuntu1~14.04) 5.5.0 20171010

during the include of the cxxopts header. Please let me know if I can provide additional information. I'll report back if I find a solution.

developincognito avatar Apr 26 '18 06:04 developincognito

Definitely shouldn't happen on g++-5.5.0. If you're able to get any more out of stdlib about the problem that would be great.

jarro2783 avatar Apr 26 '18 06:04 jarro2783

It would be difficult to reproduce with g++, because the Travis build uses a similar version. The Intel compiler error is even harder to reproduce because I don't have an Intel compiler, although it's probably not too hard to obtain.

If you know which version of the standard library you're running with that would be helpful. It might just be that it's out of date.

jarro2783 avatar May 07 '18 08:05 jarro2783

I am hitting the same issue using Intel compiler 19.0, libstdc++ 6.0.25, and cxxopts 2.2.0. Are there any updates on this one? Is the version of libstdc++ the cause of this behavior or could it be something else?

mriesch-tum avatar Feb 20 '20 11:02 mriesch-tum

Intel compiler may not have it's own stdc++ implementation. I think the temporary workaround is to provide icpc a different version of libstdc++ which has full c++11 support, say gcc-5 or even newer. I did this by prepend the path of a local build of gcc to my environment. My icpc works fine now.

alephpiece avatar Nov 02 '20 05:11 alephpiece