Skip to content

error: exception specification is incompatible with that of previous function "cospi" #378

@vluni-g

Description

@vluni-g

OS: Ubuntu 25.04
Cuda version: 12.9

After installing the Nvidia driver and CUDA driver, I always run the cuda-samples to test that it is working as expected. It has worked previously but last time I installed it, the samples cannot be compiled as they run into this issue:

usr/include/x86_64-linux-gnu/bits/mathcalls.h(79): error: exception
  specification is incompatible with that of previous function "cospi"
  (declared at line 2601 of
  /usr/local/cuda-12.9/bin/../targets/x86_64-linux/include/crt/math_functions.h)

     extern double cospi (double __x) noexcept (true); extern double __cospi (double __x) noexcept (true);
                                      ^
  /usr/include/x86_64-linux-gnu/bits/mathcalls.h(81): error: exception
  specification is incompatible with that of previous function "sinpi"
  (declared at line 2556 of
  /usr/local/cuda-12.9/bin/../targets/x86_64-linux/include/crt/math_functions.h)

     extern double sinpi (double __x) noexcept (true); extern double __sinpi (double __x) noexcept (true);
                                      ^
  /usr/include/x86_64-linux-gnu/bits/mathcalls.h(79): error: exception
  specification is incompatible with that of previous function "cospif"
  (declared at line 2623 of
  /usr/local/cuda-12.9/bin/../targets/x86_64-linux/include/crt/math_functions.h)

     extern float cospif (float __x) noexcept (true); extern float __cospif (float __x) noexcept (true);
                                     ^
  /usr/include/x86_64-linux-gnu/bits/mathcalls.h(81): error: exception
  specification is incompatible with that of previous function "sinpif"
  (declared at line 2579 of
  /usr/local/cuda-12.9/bin/../targets/x86_64-linux/include/crt/math_functions.h)


     extern float sinpif (float __x) noexcept (true); extern float __sinpif (float __x) noexcept (true);

This forum post show there are several people that have this issue across other CUDA versions and Distro's. The workaround is included in this post but this has been an issue for several months now, is there an offical solution planned for this? Running CUDA compilations through Nvidias docker image works as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions