While trying to follow the procedure for building OSRM under Windows,
I get the following error from the build-script:
deleting build dir...
Extracting archive: osrm-deps-win-x64-14.0.7z
OSRMDEPSDIR : D:\Apps\myapp\osrm-backend/osrm-deps
PREFIX : D:\Apps\myapp\osrm-backend/osrm-deps/libs
BOOST_ROOT : D:\Apps\myapp\osrm-backend/osrm-deps/boost
BOOST_LIBRARYDIR : D:\Apps\myapp\osrm-backend/osrm-deps/boost/lib
TBB_INSTALL_DIR : D:\Apps\myapp\osrm-backend/osrm-deps/tbb
TBB_ARCH_PLATFORM : intel64/vc14
calling cmake ....
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:52 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:52 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "D:/Apps/myapp/osrm-backend/build/CMakeFiles/CMakeOutput.log".
See also "D:/Apps/myapp/osrm-backend/build/CMakeFiles/CMakeError.log".
~~~~~~~~~~~~~~~~~~~~~~ ERROR D:\Apps\myapp\osrm-backend\appveyor-build.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERRORLEVEL: 1
~~~~~~~~~~~~~~~~~~~~~~ DONE D:\Apps\myapp\osrm-backend\appveyor-build.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~ ERROR D:\Apps\myapp\osrm-backend\build-local.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERRORLEVEL: 1
~~~~~~~~~~~~~~~~~~~~~~ DONE D:\Apps\myapp\osrm-backend\build-local.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that I have installed a more recent cmake so I had to force the script to accept using cmake-3.7.2 instead of 3.7.1.
Could this be the problem?
Looks like CMake can't find a C++ compiler on your Windows system.
Are you sure there is one installed?
Yes I have MinGW.
Try to pass
-DCMAKE_C_COMPILER="C:/MinGW/bin/gcc" -DCMAKE_CXX_COMPILER="C:/MinGW/bin/g++"
(or where ever you have the binaries installed) to cmake.
Now I have another error:
calling cmake ....
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: D:/Apps/MinGW/bin/gcc.exe
-- Check for working C compiler: D:/Apps/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: D:/Apps/MinGW/bin/g++.exe
-- Check for working CXX compiler: D:/Apps/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Building on a 64 bit system
CMake Warning at CMakeLists.txt:157 (message):
GNU gold linker isn't available.
-- Configuring OSRM in release mode
-- Configuring release mode optimizations
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Failed
CMake Error at CMakeLists.txt:288 (if):
if given arguments:
"STREQUAL" "Clang"
Unknown arguments specified
-- Configuring incomplete, errors occurred!
See also "D:/Apps/osrm-backend/build/CMakeFiles/CMakeOutput.log".
See also "D:/Apps/osrm-backend/build/CMakeFiles/CMakeError.log".
~~~~~~~~~~~~~~~~~~~~~~ ERROR D:\Apps\osrm-backend\appveyor-build.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERRORLEVEL: 1
~~~~~~~~~~~~~~~~~~~~~~ DONE D:\Apps\osrm-backend\appveyor-build.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~ ERROR D:\Apps\osrm-backend\build-local.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERRORLEVEL: 1
~~~~~~~~~~~~~~~~~~~~~~ DONE D:\Apps\osrm-backend\build-local.bat ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looks like we should be quoting some things in our CMakeLists.txt file. However, your system is still failing to set ${CMAKE_CXX_COMPILER_ID}, which is not good.
@vinci1it2000 Can you please edit CMakeLists.txt and put quotes around anywhere you see ${VARIABLE} used, then try again?
Closing this as not actionable on our side. Unfortunately we're not using Windows for development.
You have to figure out how to make CMake recognize your compiler.
please reinstall cmake
sudo apt install g++
Most helpful comment
sudo apt install g++