Build failure on Ubuntu 24.04 (GCC 13.3.0) cuda13.1: "target_compile_features no known features"
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 9.6k
- Forks
- 2.4k
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
Description
I am unable to build cuda-samples on a fresh installation of Ubuntu 24.04. When running CMake, the configuration fails with target_compile_features no known features for CXX compiler "GNU" version 13.3.0 across multiple samples (e.g., cudaGraphsPerfScaling, transpose).
It appears that CMake is failing to map the feature set for GCC 13.3.0 when the project languages are mixed with CUDA, or the C++ standard detection is failing during the initial compiler check.
Environment
- OS: Ubuntu 24.04 LTS
- Compiler: GCC / G++ 13.3.0
- CUDA Toolkit: 13.1 (Targeting architecture
sm_90) - CMake: 3.28.3
Steps to Reproduce
- Clone the repository.
- mkdir build && cd build
- Run
cmake .. -DCMAKE_CUDA_ARCHITECTURES=90 -DCMAKE_CUDA_COMPILER=/usr/local/cuda-13.1/bin/nvcc
Generates Error
CMake Error at Samples/6_Performance/transpose/CMakeLists.txt:28 (target_compile_features):
target_compile_features no known features for CXX compiler
"GNU"
version 13.3.0.
Attempted Fixes
- I have tried forcing
CMAKE_CXX_STANDARD=17via command line arguments.
It seems that despite enabling the CXX language, CMake cannot retrieve the compile features list for this specific GCC version when invoked within this project structure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the configuration command with CMake 3.28.3, GCC 13.3.0, and CUDA 13.1. Inspect Samples/6_Performance/transpose/CMakeLists.txt at the reported target_compile_features call, then compare the setup used by other affected samples such as cudaGraphsPerfScaling. Done means the affected samples configure without the reported unknown-features error on the stated environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100