Skip to content

" CUDA device code does not support variadic functions" regression in 20.1.8=*_2 #384

@traversaro

Description

@traversaro

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

It seems that #383 change the behavior in compilation of minimal cuda, program, minimal pixi.toml to reproduce:

[project]
name = "clang-variadic-repro"
version = "0.0.1"
description = "Reproducer for cuda compilation fail"
channels = ["conda-forge"]
platforms = ["linux-64"]

# ---- Environments ----
[environments]
clang20old = { features = ["clang20old"] }
clang20 = { features = ["clang20"] }
clang21 = { features = ["clang21"] }

# ---- Features / deps ----
[feature.clang20old.dependencies]
clangdev = {version="==20.1.8", build-number="1"}

[feature.clang20.dependencies]
clangdev = {version="==20.1.8", build-number="2"}

[feature.clang21.dependencies]
clangdev = ">=21,<22"

# ---- Tasks ----
[tasks]
init = """
bash -euo pipefail -c '
cat > repro_math.cu <<\"EOF\"
#include <cmath>

EOF
echo \"Wrote repro_math.cu\"
'
"""

[tasks.repro]
# run 'init' first automatically
depends-on = ["init"]
cmd = "clang -x cuda -nocudainc -nocudalib --cuda-device-only --cuda-gpu-arch=sm_80 -std=c++17 -c repro_math.cu"

output:

traversaro@IITBMP014LW012:~/pixiclangreproducer$ pixi run -e clang20old repro
✨ Pixi task (init in clang20old): bash -euo pipefail -c '
cat > repro_math.cu <<"EOF"
#include <cmath>

EOF
echo "Wrote repro_math.cu"
'                                                                                                                       Wrote repro_math.cu
                                                                                                                        ✨ Pixi task (repro in clang20old): clang -x cuda -nocudainc -nocudalib --cuda-device-only --cuda-gpu-arch=sm_80 -std=c++17 -c repro_math.cu                                                                                                    traversaro@IITBMP014LW012:~/pixiclangreproducer$ pixi run -e clang20 repro
✨ Pixi task (init in clang20): bash -euo pipefail -c '
cat > repro_math.cu <<"EOF"
#include <cmath>

EOF
echo "Wrote repro_math.cu"
'                                                                                                                       Wrote repro_math.cu
                                                                                                                        ✨ Pixi task (repro in clang20): clang -x cuda -nocudainc -nocudalib --cuda-device-only --cuda-gpu-arch=sm_80 -std=c++17 -c repro_math.cu                                                                                                       In file included from repro_math.cu:1:
In file included from /home/traversaro/pixiclangreproducer/.pixi/envs/clang20/lib/clang/20/include/cuda_wrappers/cmath:28:
In file included from /home/traversaro/pixiclangreproducer/.pixi/envs/clang20/bin/../lib/gcc/x86_64-conda-linux-gnu/15.1.0/../../../gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/cmath:46:
In file included from /home/traversaro/pixiclangreproducer/.pixi/envs/clang20/bin/../lib/gcc/x86_64-conda-linux-gnu/15.1.0/../../../gcc/x86_64-conda-linux-gnu/15.1.0/include/c++/bits/requires_hosted.h:31:
/home/traversaro/pixiclangreproducer/.pixi/envs/clang20/lib/clang/20/include/cuda_wrappers/bits/c++config.h:39:1: error: CUDA device code does not support variadic functions
   39 | __glibcxx_assert_fail(...) noexcept {
      | ^
1 error generated when compiling for sm_80.

Installed packages

traversaro@IITBMP014LW012:~/pixiclangreproducer$ pixi list -e clang20
Environment: clang20
Package                   Version  Build               Size       Kind   Source
_libgcc_mutex             0.1      conda_forge         2.5 KiB    conda  https://conda.anaconda.org/conda-forge/
_openmp_mutex             4.5      2_gnu               23.1 KiB   conda  https://conda.anaconda.org/conda-forge/
binutils_impl_linux-64    2.44     h4bf12b8_1          3.6 MiB    conda  https://conda.anaconda.org/conda-forge/
clang                     20.1.8   default_h36abe19_2  24.6 KiB   conda  https://conda.anaconda.org/conda-forge/
clang-20                  20.1.8   default_h99862b1_2  791.9 KiB  conda  https://conda.anaconda.org/conda-forge/
clang-format              20.1.8   default_h99862b1_2  25.1 KiB   conda  https://conda.anaconda.org/conda-forge/
clang-format-20           20.1.8   default_h99862b1_2  67.4 KiB   conda  https://conda.anaconda.org/conda-forge/
clang-tools               20.1.8   default_h99862b1_2  20.9 MiB   conda  https://conda.anaconda.org/conda-forge/
clangdev                  20.1.8   default_h99862b1_2  50.3 MiB   conda  https://conda.anaconda.org/conda-forge/
clangxx                   20.1.8   default_h363a0c9_2  24.9 KiB   conda  https://conda.anaconda.org/conda-forge/
icu                       75.1     he02047a_0          11.6 MiB   conda  https://conda.anaconda.org/conda-forge/
kernel-headers_linux-64   4.18.0   he073ed8_8          1.2 MiB    conda  https://conda.anaconda.org/conda-forge/
ld_impl_linux-64          2.44     h1423503_1          660.2 KiB  conda  https://conda.anaconda.org/conda-forge/
libclang                  20.1.8   default_h99862b1_2  25.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libclang-cpp              20.1.8   default_h99862b1_2  25.1 KiB   conda  https://conda.anaconda.org/conda-forge/
libclang-cpp20.1          20.1.8   default_h99862b1_2  20.3 MiB   conda  https://conda.anaconda.org/conda-forge/
libclang13                20.1.8   default_h746c552_2  11.8 MiB   conda  https://conda.anaconda.org/conda-forge/
libgcc                    15.1.0   h767d61c_5          804.9 KiB  conda  https://conda.anaconda.org/conda-forge/
libgcc-devel_linux-64     15.1.0   h4c094af_105        2.6 MiB    conda  https://conda.anaconda.org/conda-forge/
libgcc-ng                 15.1.0   h69a702a_5          28.5 KiB   conda  https://conda.anaconda.org/conda-forge/
libgomp                   15.1.0   h767d61c_5          436.7 KiB  conda  https://conda.anaconda.org/conda-forge/
libiconv                  1.18     h3b78370_2          771.7 KiB  conda  https://conda.anaconda.org/conda-forge/
libllvm20                 20.1.8   hf7376ad_1          41.9 MiB   conda  https://conda.anaconda.org/conda-forge/
liblzma                   5.8.1    hb9d3cd8_2          110.2 KiB  conda  https://conda.anaconda.org/conda-forge/
libstdcxx                 15.1.0   h8f9b012_5          3.7 MiB    conda  https://conda.anaconda.org/conda-forge/
libstdcxx-devel_linux-64  15.1.0   h4c094af_105        14 MiB     conda  https://conda.anaconda.org/conda-forge/
libstdcxx-ng              15.1.0   h4852527_5          28.5 KiB   conda  https://conda.anaconda.org/conda-forge/
libxml2                   2.15.0   h26afc86_0          44.2 KiB   conda  https://conda.anaconda.org/conda-forge/
libxml2-16                2.15.0   ha9997c6_0          545.9 KiB  conda  https://conda.anaconda.org/conda-forge/
libzlib                   1.3.1    hb9d3cd8_2          59.5 KiB   conda  https://conda.anaconda.org/conda-forge/
llvm-tools                20.1.8   hb700be7_1          85.8 KiB   conda  https://conda.anaconda.org/conda-forge/
llvm-tools-20             20.1.8   h3b15d91_1          25.3 MiB   conda  https://conda.anaconda.org/conda-forge/
llvmdev                   20.1.8   h3b15d91_1          62.3 MiB   conda  https://conda.anaconda.org/conda-forge/
sysroot_linux-64          2.28     h4ee821c_8          23.1 MiB   conda  https://conda.anaconda.org/conda-forge/
tzdata                    2025b    h78e105d_0          120.1 KiB  conda  https://conda.anaconda.org/conda-forge/
zstd                      1.5.7    hb8e6e7a_2          554.3 KiB  conda  https://conda.anaconda.org/conda-forge/

Environment info

traversaro@IITBMP014LW012:~/pixiclangreproducer$ pixi info
System
------------
       Pixi version: 0.55.0
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=6.6.87.2=0
                   : __glibc=2.39=0
                   : __cuda=12.3=0
                   : __archspec=1=skylake
          Cache dir: /home/traversaro/.cache/rattler/cache
       Auth storage: /home/traversaro/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/traversaro/.pixi/bin
    Environment dir: /home/traversaro/.pixi/envs
       Manifest dir: /home/traversaro/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: clang-variadic-repro
            Version: 0.0.1
      Manifest file: /home/traversaro/pixiclangreproducer/pixi.toml
       Last updated: 18-09-2025 15:45:11

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge
   Dependency count: 0
   Target platforms: linux-64
    Prefix location: /home/traversaro/pixiclangreproducer/.pixi/envs/default
              Tasks: repro, init

        Environment: clang20old
           Features: clang20old, default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: clangdev
   Target platforms: linux-64
    Prefix location: /home/traversaro/pixiclangreproducer/.pixi/envs/clang20old
              Tasks: repro, init

        Environment: clang20
           Features: clang20, default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: clangdev
   Target platforms: linux-64
    Prefix location: /home/traversaro/pixiclangreproducer/.pixi/envs/clang20
              Tasks: repro, init

        Environment: clang21
           Features: clang21, default
           Channels: conda-forge
   Dependency count: 1
       Dependencies: clangdev
   Target platforms: linux-64
    Prefix location: /home/traversaro/pixiclangreproducer/.pixi/envs/clang21

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions