Compile error
Closed this issue · 2 comments
Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 7.3.1
[cmake] -- The ASM compiler identification is GNU
[cmake] -- Found assembler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe
[cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe - broken
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
[cmake] The C compiler
[cmake]
[cmake] "C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeTmp
[cmake]
[cmake] Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_ac190 && [1/2] Building C object CMakeFiles/cmTC_ac190.dir/testCCompiler.c.obj
[cmake] [2/2] Linking C executable cmTC_ac190.exe
[cmake] FAILED: cmTC_ac190.exe
[cmake] cmd.exe /C "cd . && C:\PROGRA2\GNUTOO1\72018-1\bin\AR19DD1.EXE CMakeFiles/cmTC_ac190.dir/testCCompiler.c.obj -o cmTC_ac190.exe -Wl,--out-implib,libcmTC_ac190.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ."
[cmake] c:/progra2/gnutoo1/72018-1/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'2/gnutoo
[cmake] c:/progra1/72018-1\72018-1/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information2\GNUTOO
[cmake] collect2.exe: error: ld returned 1 exit status
[cmake] ninja: build stopped: subcommand failed.
[cmake]
[cmake]
[cmake]
[cmake]
[cmake]
[cmake] CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:7 (project)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeError.log".
[main] Configuring folder: nRF5-cmake-framework-master
[proc] Executing command: "C:/Program Files/CMake/bin/cmake.exe" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release "-DCMAKE_C_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Tools Arm Embedded\7 2018-q2-update\bin\arm-none-eabi-gcc.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:\Program Files (x86)\GNU Tools Arm Embedded\7 2018-q2-update\bin\arm-none-eabi-g++.exe" -Hd:/nRF5-cmake-framework-master/nRF5-cmake-framework-master -Bd:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The C compiler identification is GNU 7.3.1
[cmake] -- The ASM compiler identification is GNU
[cmake] -- Found assembler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe
[cmake] -- Check for working C compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe - broken
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
[cmake] The C compiler
[cmake]
[cmake] "C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update/bin/arm-none-eabi-gcc.exe"
[cmake]
[cmake] is not able to compile a simple test program.
[cmake]
[cmake] It fails with the following output:
[cmake]
[cmake] Change Dir: D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeTmp
[cmake]
[cmake] Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_9d5e3 && [1/2] Building C object CMakeFiles/cmTC_9d5e3.dir/testCCompiler.c.obj
[cmake] [2/2] Linking C executable cmTC_9d5e3.exe
[cmake] FAILED: cmTC_9d5e3.exe
[cmake] cmd.exe /C "cd . && C:\PROGRA1\bin\AR19DD1.EXE CMakeFiles/cmTC_9d5e3.dir/testCCompiler.c.obj -o cmTC_9d5e3.exe -Wl,--out-implib,libcmTC_9d5e3.dll.a -Wl,--major-image-version,0,--minor-image-version,0 && cd ."
[cmake] c:/progra2/gnutoo1/72018-1/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: unrecognized option '--major-image-version'2/gnutoo~1/72018-~1/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: use the --help option for usage information
[cmake] c:/progra
[cmake] collect2.exe: error: ld returned 1 exit status
[cmake] ninja: build stopped: subcommand failed.
[cmake]
[cmake]
[cmake]
[cmake]
[cmake]
[cmake] CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:7 (project)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "D:/nRF5-cmake-framework-master/nRF5-cmake-framework-master/build/CMakeFiles/CMakeError.log".
Hi @Ahsan-Averos well, to begin with, your problem it seems that you are using windows and I used this project for ubuntu, so I don't know how to board this.
- The error I can identify from your output is the C compiler in your CMake program. Personally, when I am working on windows I use MinGW to compile with gcc or g++, so the problem might be with your gcc installation since it seems CMake can't find it and that's why is the error.
Detecting C compiler ABI info - failed
Try to compile a simple C/C++ program with your CMake and see if is compiling fine.
Thanks for your quick response, yes I understood the OS problem,