0

I have a very small test C program, in a file called test.c:

#include <math.h>

int main()
{
    return 0;
}

If I try to compile this using icc test.c, I get the following errors, that seem to be complaining about math.h:

In file included from /usr/include/math.h(420),
                 from     /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(21): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value))
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(25): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __signbit,, (_Mdouble_ __value))
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(30): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(33): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(36): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(39): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(39): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y));
  ^

In file included from /usr/include/math.h(420),
             from /admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(95),
             from test.c(1):
/usr/include/bits/mathcalls-helper-functions.h(42): error: identifier "_Float128" is undefined
  __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))
  ^

In file included from test.c(1):
/admin/apps/rhel7/intel/compilers_and_libraries_2017.4.196/linux/compiler/include/math.h(1300): error: identifier "_LIB_VERSION_TYPE" is undefined
  _LIBIMF_EXT _LIB_VERSIONIMF_TYPE _LIBIMF_PUBVAR _LIB_VERSIONIMF;
          ^

compilation aborted for test.c (code 2)

I'm using icc (ICC) 17.0.4 20170411. This was not a problem before, but I'm not sure if the system admins changed the version of the Intel compilers. Either way, something as simple as math.h should work, no? How do I make sense of this error?

sodiumnitrate
  • 328
  • 2
  • 6
  • 19
  • You will need to edit your question once you have asked your system administrator what changes they recently made to your system. – Ramhound Jan 11 '21 at 18:38
  • @Ramhound already asked them, waiting for a reply. – sodiumnitrate Jan 11 '21 at 18:40
  • FYI: This question belongs on Stack Overflow not Super User. [I would try and be specific about which header file you want to use.](https://stackoverflow.com/questions/5168242/library-include-paths-with-same-header-name) – Ramhound Jan 11 '21 at 18:40
  • 1
    @Ramhound okay, I can migrate it there. I figured it was more about the system setup and compilers than the code itself. – sodiumnitrate Jan 11 '21 at 18:41
  • [ICC 17.0.4 + GCC 7 + glibc 2.26: error: identifier "_Float128" is undefined](https://community.intel.com/t5/Intel-C-Compiler/ICC-17-0-4-GCC-7-glibc-2-26-error-identifier-quot-Float128-quot/td-p/1170601) hopefully this helps. According to the forum, adding the compiler flag `-D_Float128=__float128` is a workaround. You can check the forum to see if it's of any help. – DrZoo Jan 11 '21 at 19:23
  • @DrZoo Thanks! That did get rid of all but one errors. – sodiumnitrate Jan 11 '21 at 19:53

0 Answers0