catkin_make fails for windows

asked 2019-10-04 04:11:09 -0500

After completing the ROS for Windows installation, where everything proceeded smoothly, I was able to use the generic ros commands succedfully (roscore, etc..). However, catkin_make failed due to the spaces in the windows path definitions (eg:Program Files). This was executed in the ROS Command Window as described in the installation. I also tried to execute catkin_make_isolated, which also gave the same error.

==> Processing catkin package: 'roscpp_tutorials'
==> Creating build directory: 'build_isolated\roscpp_tutorials'
==> cmake C:\opt\ros\melodic\catkin_ws\src\. -DCATKIN_DEVEL_PREFIX=C:\opt\ros\melodic\catkin_ws\devel_isolated\roscpp_tutorials -DCMAKE_INSTALL_PREFIX=C:\opt\ros\melodic\catkin_ws\install_isolated -DCMAKE_BUILD_TYPE=RelWithDebInfo -G NMake Makefiles in 'C:\opt\ros\melodic\catkin_ws\build_isolated\roscpp_tutorials'
-- The C compiler identification is MSVC 19.23.28105.4
-- The CXX compiler identification is MSVC 19.23.28105.4
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/opt/python27amd64/Lib/site-packages/cmake/data/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/opt/ros/melodic/catkin_ws/build_isolated/roscpp_tutorials/CMakeFiles/CMakeTmp

    Run Build Command(s):nmake /nologo cmTC_99ee3\fast &&       C:\Program Files (x86)\GnuWin32\bin\make.exe -f CMakeFiles\cmTC_99ee3.dir\build.make /nologo -L                  CMakeFiles\cmTC_99ee3.dir\build
    'C:\Program' is not recognized as an internal or external command,
    operable program or batch file.
    NMAKE : fatal error U1077: 'C:\Program' : return code '0x1'
    Stop.

Could someone please help me in solving this issue?

edit retag flag offensive close merge delete

Comments

It looks like something isn't quoted correctly (note how C:\Program is the first part of C:\Program Files (x86)\..).

This seems to be happening in CMake though, so not sure how ms-iot/ROSOnWindows is involved.

In any case: ms-iot/ROSOnWindows#134 seems like a similar issue.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-04 05:10:11 -0500 )edit

You are correct about it being a CMake issue. However, its difficult to find the source where it is taking place, where the problem can somehow be avoided by using quotes or making the path to be shorthand. ms-iot/ROSOnWindows#134 solution isnt feasible for my case anyhow.

redpitaya gravatar imageredpitaya ( 2019-10-04 05:31:10 -0500 )edit

ms-iot/ROSOnWindows#134 solution isnt feasible for my case anyhow.

I did not mean to imply it was. It's not a solution, it seems to be a similar issue.

gvdhoorn gravatar imagegvdhoorn ( 2019-10-04 07:03:16 -0500 )edit