zephyr: Build fails with gcc-arm-none-eabi-9-2019-q4-major
Describe the bug There is a Toolchain issue with gnuarmemb 9.2 (current version) under Windows
To Reproduce Steps to reproduce the behaviour: Just follow getting started and 3rd party toolchain
I installed to c:/gnuarmemb but I don’t think this should matter
Expected behavior
west -b nucleo_f401re samples\hello_world should work but I get error (see below)
Impact Showstopper for new developers should be easy fixable for people with knowledge to cross compile on windows
Screenshots or console output
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
Build flags:
Id flags:
The output was:
1
c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
Build flags:
Id flags:
The output was:
1
c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2.exe: error: ld returned 1 exit status
Environment (please complete the following information):
- Windows
- gnuarmemb 9.2
- v2.1.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 24 (4 by maintainers)
Like last comment, this worked for me on Windows 10 (Powershell):
I’m having the same issue. in window10.when I delete the contents of the “zephyr\.cache\ToolchainCapabilityDatabase” folder, the problem is solved
Can reproduce on Linux by deleting build folder and
~/.cache/zephyrand then trying to build with either CMake 3.19.0 or 3.19.1The third point seems relevant: https://cmake.org/cmake/help/latest/release/3.19.html#modules
After downgrading CMake to 3.18.5 the error is resolved.