Skip to content

fatal error: 'climits' file not found #15910

Open
@vidyalathabadde

Description

@vidyalathabadde

Describe the bug

I'm unable to compile a SYCL migrated code on NVIDIA CUDA backend (H100) getting climits not found error
tried fixing it manually by including the path of climits throws another error which says <bits/c++config.h> not found.

To reproduce

Reproducer:

#include<sycl/sycl.hpp>
int main()
{
return 0;
}

To compile:
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda test.cpp

Error:

In file included from test.cpp:1:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/sycl.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/detail/core.hpp:21:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/accessor.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/access/access.hpp:14:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/__spirv/spirv_ops.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/__spirv/spirv_types.hpp:11:
vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/detail/defines.hpp:14:10: fatal error: 'climits' file not found
   14 | #include <climits>
      |          ^~~~~~~~~
1 error generated.

Tried fixing it manually by passing the path of climits but ended up with another error

To compile:

clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda -I /usr/include/c++/11/ -L /usr/lib/gcc/x86_64-linux-gnu/11/ -lstdc++ test.cpp

Error:

In file included from test.cpp:1:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/sycl.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/detail/core.hpp:21:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/accessor.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/access/access.hpp:14:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/__spirv/spirv_ops.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/__spirv/spirv_types.hpp:11:
In file included from vidya/new_wmma_sample/clang_2024-10-25/bin/../include/sycl/detail/defines.hpp:14:
/usr/include/c++/11/climits:41:10: fatal error: 'bits/c++config.h' file not found
   41 | #include <bits/c++config.h>
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.

Environment

  • OS: Linux
  • Target device and vendor: NVIDIA H100 PCIe
  • clang++ --version:
clang version 20.0.0git (https://github.com/intel/llvm 7b9615c8784c83745159e11668cc15f6026bdce2)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: vidya/new_wmma_sample/clang_2024-10-25/bin
Build config: +assertions

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcudaCUDA back-end

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions