intel / intel/llvm

fatal error: 'climits' file not found

Open
#15,910 7 comments 0 reactions 0 assignees View on GitHub
bug cuda
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

### 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 not found.

### To reproduce

Reproducer:
```
#include
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
| ^~~~~~~~~
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
| ^~~~~~~~~~~~~~~~~~
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.