Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUDA][SYCL] Persistent compilation error with missing cstddef, cstdint header files #15432

Open
jgtong opened this issue Sep 18, 2024 · 6 comments
Labels
bug Something isn't working cuda CUDA back-end

Comments

@jgtong
Copy link

jgtong commented Sep 18, 2024

Describe the bug

Compilation of DPC++ with CUDA support keeps error'ing out at the late stage during the compilation process. The error message I see is

 /llvm/libdevice/imf/../imf_impl_utils.hpp:12:10: fatal error: 'cstddef' file not found

This error occurred after system admins upgraded the node to Ubuntu 24.04.1. The libstdc++-13-dev and libstdc++-12-dev packages are installed. We also tried setting the following variables

CC=/path/to/gcc-{12,13}/gcc
CXX=/path/to/g++-{12,13}
CPLUS_INCLUDE_PATH=/path/to/c++/{12,13}/include

and still gives the same error. The cstddef and cstdint header files do exist on the system, but not sure why the compiler is not picking them up

To reproduce

1. git clone https://github.com/intel/llvm.git -b sycl
2. cd llvm
3. python3 ./buildbot/configure.py --cuda (Note, I also have tried --use-libcxx --libcxx-include /path/to/c++/{12,13}/include --libcxx-library /path/to/c++/{12,13}/lib64
4. python3 ./buildbot/compile.py

Environment

  • OS: Ubuntu 24.04.1
  • Target device and vendor: NVIDIA H100
  • DPC++ version: commit hash at 7989104dbcc6e2fc06c071381de1e34b75b2ff9b
  • Dependencies version: Unable to retrieve because compilation fails

Additional context

No response

@jgtong jgtong added the bug Something isn't working label Sep 18, 2024
@KornevNikita
Copy link
Contributor

Hi @jgtong, do CMAKE_C_COMPILER and CMAKE_CXX_COMPILER have the right path in /.../llvm/build/CMakeCache.txt?

@JackAKirk JackAKirk added the cuda CUDA back-end label Sep 25, 2024
@JackAKirk
Copy link
Contributor

Which cuda runtime version are you using and are you sure ubuntu 24.04 supports it? cuda toolkit only supports 24.04 for latest versions, please consult cuda toolkit docs.

@jgtong
Copy link
Author

jgtong commented Sep 25, 2024

Hi @jgtong, do CMAKE_C_COMPILER and CMAKE_CXX_COMPILER have the right path in /.../llvm/build/CMakeCache.txt?

Yes, I can confirm that CMAKE_C_COMPILER and CMAKE_CXX_COMPILER have the correct gcc path. In this case, I am using gcc-13 and g++-13

@jgtong
Copy link
Author

jgtong commented Sep 25, 2024

Which cuda runtime version are you using and are you sure ubuntu 24.04 supports it? cuda toolkit only supports 24.04 for latest versions, please consult cuda toolkit docs.

Yes, I was using Ubuntu 24.04 and NV CUDA Toolkit version 12.6

@JackAKirk
Copy link
Contributor

Which cuda runtime version are you using and are you sure ubuntu 24.04 supports it? cuda toolkit only supports 24.04 for latest versions, please consult cuda toolkit docs.

Yes, I was using Ubuntu 24.04 and NV CUDA Toolkit version 12.6

I think this is likely to be an issue with incompatible gcc modules. I suggest you experiment with only having a single e.g. libstdc++-13-dev version loaded.

@jgtong
Copy link
Author

jgtong commented Sep 25, 2024

@JackAKirk

Thanks, I do have the correct module loaded and even exported the CC/CXX variables to `/path/to/{gcc-13,g++-13}' respectively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda CUDA back-end
Projects
None yet
Development

No branches or pull requests

3 participants