I'm trying to compile nvidia Maxine with cmake but am getting this error
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:7 (project):
No CMAKE_CXX_COMPILER could be found.
Configuring incomplete, errors occurred!```
Related
I'm trying to compile the latest version of yaml-cpp on my MacOS but I got the following error message:
cmake -G "Xcode" -DYAML_BUILD_SHARED_LIBS=on ..
-- The CXX compiler identification is AppleClang 13.0.0.13000029 CMake Error at CMakeLists.txt:10 (project): No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred! See also "/Users/surrutiaquir/Software/yaml-cpp/build/CMakeFiles/CMakeOutput.log".
What am I doing wrong here? Thanks in advance.
I get the following error when I try to use cmake to compile a source code:
$ sudo cmake -DUSE_QT5=1 -DCMAKE_INSTALL_PREFIX=/home/linux/myYade ../trunk
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:35 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/home/linux/myYade/trunk/CMakeFiles/CMakeOutput.log".
See also "/home/linux/myYade/trunk/CMakeFiles/CMakeError.log".
Any help to get this resolved?
I am experiencing a problem in a project, when upgrading from CMake 3.8 to 3.14. I have reduced this to the following issue. Note that project is before find_package (the other way around I do not have the issue I am describing).
cmake_minimum_required(VERSION 3.2.1)
find_package(MPI REQUIRED)
project(Test CXX)).
When I build with CMake 3.8, the output is as follows:
build3_8$ cmake ../source/
-- The CXX compiler identification is Intel 17.0.5.20170817
-- Check for working CXX compiler: (...)/linux/bin/intel64/icpc
-- Check for working CXX compiler: (...)/linux/bin/intel64/icpc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: (...)/build3_8
With CMake 3.14 I get the following output:
build3_14$ cmake ../source/
CMake Error at (...)/CMake/3.14.0/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:211 (message):
No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()
Call Stack (most recent call first):
(...)/CMake/3.14.0/share/cmake-3.14/Modules/FindMPI.cmake:1672 (find_package_handle_standard_args)
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
I wonder why this is happening with the newer CMake version (although FindMPI.cmake is completely different)?
Also, what can I do to solve this? Do I need to write my own config?
(I cannot just change the order of project and find_package, because wrappers are created for the compilers (not my choice, please don't blame me))
I would like to download LightGbm and i followed this website for doing it. But suddenly stopped with an error. Please post a solution.
Thankshttps://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#macos
Error:
cmake ..
CMake Error at /usr/local/Cellar/cmake/3.13.0/share/cmake/Modules/CMakeDetermineCCompiler.cmake:48 (message):
Could not find compiler set in environment variable CC:
gcc-7.
Call Stack (most recent call first):
CMakeLists.txt:7 (PROJECT)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/Users/kj/LightGBM/build/CMakeFiles/CMakeOutput.log".
Your environment variable CC is set to gcc-7 but this compiler can't be access with your $PATH variable.
Try to write gcc-7 in a terminal you should get a Command not found error.
I have some trouble doing a migration from IAR IDE to Cmake/IAR compiler for arm:
According to my understanding, with a correct CMakeList.txt, I try:
/c/CMake/bin/cmake.exe -G"MSYS Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:\CMake\bin\Modules\Compiler\iar.cmake" -DCMAKE_C_COMPILER="C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe" -DCMAKE_ASM_COMPILER="C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe" ..
I get:
-- The C compiler identification is IAR
-- The ASM compiler identification is IAR
-- Found assembler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe
-- Check for working C compiler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe
CMake Error at C:/CMake/bin/Modules/Compiler/IAR.cmake:41 (message):
The IAR compiler for this architecture is not yet supported by CMake.
Please go to https://gitlab.kitware.com/cmake/cmake/issues and enter a
feature request there.
Call Stack (most recent call first):
C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/3.7.2/CMakeSystem.cmake:6 (include)
C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeOutput.log".
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeError.log".
This sounds strange because if I read the IAR.cmake, the case where this fatal error rises is when the compiler does not match "arm" neither avr.
So I put a message output with the CMAKE_C_COMPILER argument and I get:
-- CMAKE_C_COMPILER={C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe}
-- The C compiler identification is IAR
-- The ASM compiler identification is IAR
-- Found assembler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iasmarm.exe
-- Check for working C compiler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm/bin/iccarm.exe
CMake Error at C:/CMake/bin/Modules/Compiler/IAR.cmake:41 (message):
The IAR compiler for this architecture is not yet supported by CMake.
Please go to https://gitlab.kitware.com/cmake/cmake/issues and enter a
feature request there.
Call Stack (most recent call first):
C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/3.7.2/CMakeSystem.cmake:6 (include)
C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeTmp/CMakeLists.txt:2 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Configuring incomplete, errors occurred!
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeOutput.log".
See also "C:/Projects/LabPadIntegration/lpd_firmware/LABPAD_IAR/FIRMWARE/build/CMakeFiles/CMakeError.log".
So I get the trace with CMAKE_C_COMPILER which matches well the value I entered, but the MATCH tells it does not match "arm"...
Any idea ?
I've been successfully using CMake to build with the IAR C/C++ Compilers.
The CMake's find_program() function worked nicely for finding CMAKE_<LANG>_COMPILER when installed in the usual locations.
As one example, the CMake toolchain file from this IAR tutorial worked for me on both Windows and Linux compilers.
However, it is also possible to set environment variables CC, CXX and ASM. CMake will use such environment variables to set the full path to the compiler. For example:
On Windows, using the IAR Embedded Workbench:
set CC="%PROGRAMFILES%/IAR Systems/Embedded Workbench 9.1/arm/bin/iccarm.exe"
set CXX="%PROGRAMFILES%/IAR Systems/Embedded Workbench 9.1/arm/bin/iccarm.exe"
set ASM="%PROGRAMFILES%/IAR Systems/Embedded Workbench 9.1/arm/bin/iasmarm.exe"
On Linux, using the IAR Build Tools:
export CC=/opt/iarsystems/bxarm/arm/bin/iccarm
export CXX=/opt/iarsystems/bxarm/arm/bin/iccarm
export ASM=/opt/iarsystems/bxarm/arm/bin/iasmarm
I just got some support from the Cmake issue tracker:
My misunderstanding, this is because the file i give as an arg is not a toolchain file