Skip to content

CMake Error - No Known features for CXX compiler "GNU" #124

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

Closed
davideger opened this issue Feb 9, 2022 · 4 comments
Closed

CMake Error - No Known features for CXX compiler "GNU" #124

davideger opened this issue Feb 9, 2022 · 4 comments

Comments

@davideger
Copy link

I'm running Ubuntu 21.10 (Impish Indra) and CMake fails with the following

$ cmake . -B build
...
-- Configuring done
CMake Error in CMakeLists.txt:
  No known features for CXX compiler

  "GNU"

  version 11.2.0.

CMake Generate step failed.  Build files cannot be regenerated correctly.

Probably I'm doing something silly wrong? Here's my cmake and g++ install info:

apt info cmake
Package: cmake
Version: 3.22.2-0kitware1ubuntu20.04.1
APT-Manual-Installed: yes
APT-Sources: https://apt.kitware.com/ubuntu focal/main amd64 Packages

apt info g++
Package: g++
Version: 4:11.2.0-1ubuntu1
APT-Manual-Installed: yes
APT-Sources: http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages

@davideger
Copy link
Author

Bizarre. After downgrading cmake and deleting build/..., both an older cmake (=3.21.3-0kitware1ubuntu20.04.1) and the newer ones work. Feels like a holdover of a failed cmake run when CUDA SDK was not installed.

@Ednaordinary
Copy link

Just deleting ./build worked to solve this error for me, thanks for making this issue or I might not have figured it out

@wzqvip
Copy link

wzqvip commented Jun 3, 2023

Met the same. And deal with the same.

@MitchellAugustin
Copy link

For future people googling this same issue:

Deleting build/ and running cmake from the cuda_samples root dir also worked for me, for the same error on GCC 13 and Ubuntu 24.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants