# Build Errors!

**URL:** https://discourse.cmake.org/t/build-errors/14394
**Category:** Usage
**Created:** [July 20, 2025, 3:01am UTC](https://discourse.cmake.org/t/build-errors/14394 "2025-07-20T03:01:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Astrox](https://discourse.cmake.org/user_avatar/discourse.cmake.org/astrox/32/5678_2.png) [@Astrox](https://discourse.cmake.org/u/Astrox)
#### Post date: [July 20, 2025, 3:01am UTC](https://discourse.cmake.org/t/build-errors/14394/1 "2025-07-20T03:01:38Z")

</div>

```auto
PS C:\Users\...\coding\other\astralixiOS\build> cmake .. 
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/arm-none-eabi-gcc.exe
-- Check for working C compiler: C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/arm-none-eabi-gcc.exe - broken
CMake Error at C:/Users/.../.pico-sdk/cmake/v3.31.5/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/arm-none-eabi-gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: 'C:/Users/.../coding/other/astralixiOS/build/CMakeFiles/CMakeScratch/TryCompile-24ynkb'

    Run Build Command(s): C:/Users/piyus/.pico-sdk/ninja/v1.12.1/ninja.exe -v cmTC_4da22
    [1/2] C:\Users\...\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe -o CMakeFiles/cmTC_4da22.dir/testCCompiler.c.obj -c C:/Users/.../coding/other/astralixiOS/build/CMakeFiles/CMakeScratch/TryCompile-24ynkb/testCCompiler.c
    [2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\...\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe CMakeFiles/cmTC_4da22.dir/testCCompiler.c.obj -o cmTC_4da22.exe -Wl,--out-implib,libcmTC_4da22.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
    FAILED: cmTC_4da22.exe
    C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\piyus\.pico-sdk\toolchain\14_2_Rel1\bin\arm-none-eabi-gcc.exe CMakeFiles/cmTC_4da22.dir/testCCompiler.c.obj -o cmTC_4da22.exe -Wl,--out-implib,libcmTC_4da22.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
    C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'
    C:/Users/.../.pico-sdk/toolchain/14_2_Rel1/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:18 (project)

-- Configuring incomplete, errors occurred!

```

---

<div class="post-metadata">

### Author: ![vito.gamberini](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vito.gamberini/32/4376_2.png) [@vito.gamberini](https://discourse.cmake.org/u/vito.gamberini)
#### Post date: [July 21, 2025, 2:59am UTC](https://discourse.cmake.org/t/build-errors/14394/2 "2025-07-21T02:59:49Z")

</div>

The immediate cause of the error is that the ARM port of ld.exe does not support `major-image-version`. So either a toolchain problem or an issue with CMake upstream for setting that unconditionally.
