CMake Error
IronBit-0 opened this issue · 1 comments
IronBit-0 commented
Following this tutorial, I'm running into the error below after running cmake ..
in owl/build.
I'm on a Raspberry Pi 3 Model B V1.2, and it's running Raspberry Pi OS Lite (32-Bit). I'm running cmake version 3.18.4.
root@raspberrypi:/home/pi/owl/build# cmake ..
CMake Error at /usr/share/cmake-3.18/Modules/CMakeDetermineCCompiler.cmake:49 (message):
Could not find compiler set in environment variable CC:
/home/pi/nexmon/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-armv7l/bin/arm-none-eabi-.
Call Stack (most recent call first):
CMakeLists.txt:3 (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 "/home/pi/owl/build/CMakeFiles/CMakeOutput.log".
output in CMakeOutput.log:
The system is: Linux - 5.10.92-v7+ - armv7l
IronBit-0 commented
I found a fix which is adding
set( CMAKE_CXX_COMPILER "/pathto/g++" )
set( CMAKE_C_COMPILER "/pathto/gcc" )
to the beginning of CMakeLists.txt, replacing the paths with the location of g++ and gcc, which for me was /usr/bin/g++ and /usr/bin/gcc. I found the paths using which g++
and which gcc
. Found from this link.