- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I realize that ICC 17 is not meant to be used in combination with GCC 7 + glibc 2.26 since those are very recent releases and might be considered unsupported, but the following problem surfaced after the release of glibc 2.26:
#include <stdlib.h>
icc -D_GNU_SOURCE -o foo foo.c
In file included from foo.c(2):
/usr/include/stdlib.h(133): error: identifier "_Float128" is undefined
extern _Float128 strtof128 (const char *__restrict __nptr,
^
In file included from foo.c(2):
/usr/include/stdlib.h(190): error: identifier "_Float128" is undefined
_Float128 __f)
^
In file included from foo.c(2):
/usr/include/stdlib.h(236): error: identifier "_Float128" is undefined
extern _Float128 strtof128_l (const char *__restrict __nptr,
^
compilation aborted for foo.c (code 2)
I believe this problem appears because of the following lines in floatn.h (included with glibc 2.26):
/* The type _Float128 exists only since GCC 7.0. */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef __float128 _Float128;
# endif
Because ICC defines __GNUC__ and __GNUC__MINOR__ to the same versions which are defined by GCC itself this typedef is not visible when GCC 7 is used as a backend. I believe GCC 7+ supports _Float128 natively (https://gcc.gnu.org/gcc-7/changes.html) and ICC should probably do so too, hopefully in one of the next releases.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bastian,
As you already know, ICC 17.0 doesn't support GCC 7.0; but ICC is compatible with supported GCC versions. If you provide us a test case, then we can test it for you when our next version (which suports GCC 7.0) becomes available.
Regards,
Viet Hoang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Viet,
thanks for your answer. Indeed, ICC 17.0 does not support GCC 7, I mostly reported this issue as a heads up, in the hope that this report will help making sure that newer release won't have this problem.
Nevertheless I have been using the ICC 17 + GCC 7 combination successfully for quite a while now, so at least for the code I compile with ICC 17.0 the compatibility is already quite good. The problem I describe here only came about when glibc 2.26 surfaced. Specifically, they have added code to stdlib.h which assumes that any compiler which defines __GNUC__ >= 7 supports _Float128 which isn't the case for ICC 17.0.
The simple test case is trying to compile the singe line '#include <stdlib.h>' where stdlib.h is from glibc 2.26, using GCC 7 as backend.
Thanks again for your help
Bastian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the heads up... We will fix this in the first update to 18.0.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error still persists:
icc --version
icc (ICC) 18.0.0 20170811
In file included from /usr/include/math.h(312),
from /home/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/include/math.h(95),
from ./source/dss_sym_c.c(3):
/usr/include/bits/mathcalls-helper-functions.h(42): error: identifier "_Float128" is undefined
__MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))
^
System: openSUSE Tumbleweed:
gcc --version
gcc (SUSE Linux) 7.2.1 20170901 [gcc-7-branch revision 251580]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Fabian,
yes indeed the problem persists in 18.0. I think Judy meant that the problem would be fixed in the first _update_ to 18.0 (i.e. 18.0.1). Anyway, for the time being I'm working around the problem by adding "-D_Float128=__float128" to my compiler flags.
Cheers, Bastian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bastian,
thank you for pointing this out! I'll try the flag, I was not aware of this workaround.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bastian B. wrote:
Hey Fabian,
yes indeed the problem persists in 18.0. I think Judy meant that the problem would be fixed in the first _update_ to 18.0 (i.e. 18.0.1). Anyway, for the time being I'm working around the problem by adding "-D_Float128=__float128" to my compiler flags.
Cheers, Bastian
I'm using openSUSE Tumbleweed with gcc7.2.1 & glibc 2.26,
this complier flag solved my problem, thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As a follow up note I'd like to mention that the problem has indeed been fixed in Intel Compiler 18 Update 1: It does not need the -D_Float128=__float128 anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Still have related problem here with libdc 2.27, libc 2.26 works, Debian 10, compiling
#define _GNU_SOURCE
#include <stdlib.h>
#include <math.h>
icc -v
icc version 18.0.2 (gcc version 7.0.0 compatibility)
icc ~/1.c -c
In file included from /barbiere/jack/1.c(2):
/usr/include/stdlib.h(140): error: identifier "_Float32" is undefined
extern _Float32 strtof32 (const char *__restrict __nptr,
^
In file included from /barbiere/jack/1.c(2):
/usr/include/stdlib.h(146): error: identifier "_Float64" is undefined
extern _Float64 strtof64 (const char *__restrict __nptr,
^
In file included from /barbiere/jack/1.c(2):
/usr/include/stdlib.h(158): error: identifier "_Float32x" is undefined
extern _Float32x strtof32x (const char *__restrict __nptr,
^
In file included from /barbiere/jack/1.c(2):
/usr/include/stdlib.h(164): error: identifier "_Float64x" is undefined
extern _Float64x strtof64x (const char *__restrict __nptr,
This works:
icc -D__PURE_INTEL_C99_HEADERS__ -D_Float32=float -D_Float64=double -D_Float128="long double" -D_Float32x=_Float64 -D_Float64x=_Float128 ~/1.c -c
GNU_SOURCE is defined to allow usage of "strict timespec" which is otherwise undefined, compilatiion of code that is trying to use timespec:
error: incomplete type is not allowed
real_t diff_clock(struct timespec start, struct timespec end)
Thanks,
Yakov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Yakov,
Yes, these new errors are specific to glibc 2.27. I have opened https://software.intel.com/en-us/forums/intel-c-compiler/topic/777003 to track this.
Cheers
Bastian

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page