Public bug reported:

In a simple default installation of Ubuntu 26.04 and CUDA (via the new
meta package cuda-toolkit), a minimal program fails to compile. The host
compiler libraries are incompatible with the CUDA libraries.

A way to reproduce the issue:

docker run -it ubuntu:26.04
apt update && apt upgrade -y && apt install cuda-toolkit -y
printf "int main() {}" > main.cu
/usr/local/cuda/bin/nvcc main.cu

The error:

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

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

2 errors detected in the compilation of "main.cu".

-------------------------------------------------------------

The issue was also discussed here:
https://forums.developer.nvidia.com/t/fedora-43-and-nvcc-cuda13-1-error-
exception-specification-is-incompatible-rsqrt-rsqrtf/354510

Applying the proposed patch in the first post fixes the issue.

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: cuda-toolkit 13.1.1-0ubuntu1
ProcVersionSignature: Ubuntu 6.17.0-22.22~24.04.1-generic 6.17.13
Uname: Linux 6.17.0-22-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CloudBuildName: ubuntu-oci:minimized
CloudSerial: 20260421
Date: Thu Jun  4 08:36:14 2026
ProcEnviron:
 PATH=(custom, no user)
 TERM=xterm
SourcePackage: cuda-meta-13-1
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: cuda-meta-13-1 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug cloud-image resolute

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

Title:
  cuda-toolkit cannot compile minimal example

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cuda-meta-13-1/+bug/2155233/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to