[Bug 1895358] Re: [Bug] A simple code including tgmath.h cannot be compiled with icc with Ubuntu 20.04 OS

Łukasz Zemczak 1895358 at bugs.launchpad.net
Thu Apr 8 09:28:52 UTC 2021


Hello pragyansri.pathi at intel.com, or anyone else affected,

Accepted glibc into groovy-proposed. The package will build now and be
available at https://launchpad.net/ubuntu/+source/glibc/2.32-0ubuntu3.2
in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
groovy to verification-done-groovy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-groovy. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Tags removed: verification-done verification-done-groovy
** Tags added: verification-needed verification-needed-groovy

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1895358

Title:
  [Bug] A simple code including tgmath.h cannot be compiled with icc
  with Ubuntu 20.04 OS

Status in glibc package in Ubuntu:
  Fix Released
Status in glibc source package in Focal:
  Fix Released
Status in glibc source package in Groovy:
  Fix Committed

Bug description:
  [Impact]

   A simple code including tgmath.h cannot be compiled with icc with
  Ubuntu 20.04 OS and later releases.

  [Test Case]
  icc:
   Compile the following code with Intel compiler (icc) by running “icc -c test.c”

  $ cat test.c
  #include <tgmath.h>

  There should not be any compilation error

  
  [Where problems could occur]

  The fix is dropping compile time check preventing using float128 with
  icc. In case of a mistake using float128 becomes prevented in other
  compilers as well, but this is highly unlikely, since the vanilla
  upstream code is known to work.

  Older icc compilers (for which the patch has been introduced) will
  stop compiling code with the _fixed_ tgmath.h because of LP: #1717257.

  Users can still install older icc compilers from 3rd party sources,
  but there is no good way of avoiding that. They can still override the
  packaged tgmath.h.

  [Original Bug Text]

  [Summary]: A simple code including tgmath.h cannot be compiled with
  icc with Ubuntu 20.04 OS

  [Ubuntu OS version]: 20.04

  [Reproduce Steps]: Compile the following code with Intel compiler
  (icc) by running “icc -c test.c”

  $ cat test.c
  #include <tgmath.h>

  [Results]
  Expected: There should not be any compilation error

  Actual: The following error is produced:

  $ icc -c test.c
  In file included from /localdisk2/mkl/aakkas/20200721_rls/lnx/compiler/latest/linux/bin/intel64/../../compiler/include/icc/tgmath.h(25),
                   from test.c(1):
  /usr/include/tgmath.h(54): error: #error directive: "Unsupported combination of types for <tgmath.h>."
    #  error "Unsupported combination of types for <tgmath.h>."
       ^

  compilation aborted for test.c (code 2)

  [Additional Information on Test setup]:

  ICC compiler supports the __float128 type if the reference compiler is
  more recent than GNU version 4.4. Therefore, __HAVE_FLOAT128 should be
  set to 1 when ICC compiler is used with GNU version higher than 4.4.
  Based on this, I believe that the red part below in floatn.h, which
  comes with Ubuntu OS, should be updated/removed.

  #if (defined __x86_64__                                                 \
       ? __GNUC_PREREQ (4, 3)                                             \
       : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \
       &&  !defined(__CUDACC__) && !defined(__ICC)
  # define __HAVE_FLOAT128 1
  #else
  # define __HAVE_FLOAT128 0
  #endif

  Currently, when the tgmath.h system header file is included on Ubuntu
  20.04 OS system,  __HAVE_FLOAT128 is set to zero and __HAVE_FLOAT64X
  set to 1 for ICC. And this is not a supported combination as checked
  in the new tgmath.h system header file:

  # if ((__HAVE_FLOAT64X && !__HAVE_FLOAT128)             \
        || (__HAVE_FLOAT128 && !__HAVE_FLOAT64X))
  #  error "Unsupported combination of types for <tgmath.h>."
  # endif

  Upstream bug: Not known
  =========================================

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1895358/+subscriptions



More information about the foundations-bugs mailing list