# No known features for CXX compiler "GNU" version 12.3.1 (arm-none-eabi)

**URL:** <https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797>\
**Category:** Code\
**Created:** [May 3, 2024, 5:59pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797 "2024-05-03T17:59:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bjorn\_Johansson](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/d9b06d/32.png) [@Bjorn\_Johansson](https://discourse.cmake.org/u/Bjorn_Johansson)\
**Post date:** [May 3, 2024, 5:59pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/1 "2024-05-03T17:59:49Z")

</div>

Hi,

We are cross-compiling C++20 for an ARM AArch32 bare-metal target (arm-none-eabi). This usually works fine. However, when we try to include the fmt library ([GitHub - fmtlib/fmt: A modern formatting library](https://github.com/fmtlib/fmt) version 10.2.1), with

find\_package(fmt CONFIG REQUIRED)  
target\_link\_libraries(${TARGET\_NAME} PUBLIC fmt::fmt)

we get the following error message:  
[cmake] No known features for CXX compiler  
[cmake]  
[cmake] “GNU”  
[cmake]  
[cmake] version 12.3.1.  
[cmake]  
[cmake]  
[cmake] CMake Generate step failed. Build files cannot be regenerated correctly.

We use the compiler arm-gnu-toolchain-12.3.rel1-x86\_64-arm-none-eabi with the following toolchain file: [mcux-sdk/tools/cmake\_toolchain\_files/armgcc.cmake at a6bf851f65020c437704e53d2d9587ae21789d65 · nxp-mcuxpresso/mcux-sdk · GitHub](https://github.com/nxp-mcuxpresso/mcux-sdk/blob/a6bf851f65020c437704e53d2d9587ae21789d65/tools/cmake_toolchain_files/armgcc.cmake)

I tried with the latest CMake 3.29.2, but that did not help.

Any ideas on how to fix this?

Thanks,  
Björn

---

<div class="post-metadata">

**Author:** ![developer](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@developer](https://discourse.cmake.org/u/developer)\
**Post date:** [July 10, 2024, 3:54pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/2 "2024-07-10T15:54:19Z")

</div>

I see a very similar issue trying to compile Boost with an arm-non-eabi compiler with CMake version 3.29.3. I also saw the same issue above with the fmt library. Any update on this issue?

---

<div class="post-metadata">

**Author:** ![Bjorn\_Johansson](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/d9b06d/32.png) [@Bjorn\_Johansson](https://discourse.cmake.org/u/Bjorn_Johansson)\
**Post date:** [July 15, 2024, 9:04am UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/3 "2024-07-15T09:04:45Z")

</div>

No solution yet.

---

<div class="post-metadata">

**Author:** ![developer](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@developer](https://discourse.cmake.org/u/developer)\
**Post date:** [August 26, 2024, 1:24pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/4 "2024-08-26T13:24:31Z")

</div>

Any updates to share? Or input from Kitware?

---

<div class="post-metadata">

**Author:** ![developer](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@developer](https://discourse.cmake.org/u/developer)\
**Post date:** [August 27, 2024, 8:11pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/5 "2024-08-27T20:11:45Z")

</div>

In our particular case, it looks like these options in our toolchain file were the offenders causing this issue. Removing them fixed my similar issue. I don’t know if we add this mistakenly or the STM32 CMake generation did.

```auto
set(CMAKE_C_COMPILER_FORCED TRUE)
set(CMAKE_CXX_COMPILER_FORCED TRUE)

```

---

<div class="post-metadata">

**Author:** ![Bjorn\_Johansson](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/d9b06d/32.png) [@Bjorn\_Johansson](https://discourse.cmake.org/u/Bjorn_Johansson)\
**Post date:** [August 28, 2024, 6:10am UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/6 "2024-08-28T06:10:02Z")

</div>

No updates unfortunately. We did a “hacky” workaround.

---

<div class="post-metadata">

**Author:** ![Bjorn\_Johansson](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/d9b06d/32.png) [@Bjorn\_Johansson](https://discourse.cmake.org/u/Bjorn_Johansson)\
**Post date:** [August 28, 2024, 6:11am UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/7 "2024-08-28T06:11:22Z")

</div>

Great that you found a way to solve it for your case. I will investigate that. Thanks!

---

<div class="post-metadata">

**Author:** ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)\
**Post date:** [August 29, 2024, 8:50pm UTC](https://discourse.cmake.org/t/no-known-features-for-cxx-compiler-gnu-version-12-3-1-arm-none-eabi/10797/8 "2024-08-29T20:50:51Z")

</div>

Removing those lines is the solution.  
Forcing a compiler disables information gathering of CMake.

Forcing a compiler is deprecated, please see the [module doc](https://cmake.org/cmake/help/latest/module/CMakeForceCompiler.html) for details.
