Catkin-make fails due to a bad variable name: WSL $PATH variable is wrong

asked 2020-08-10 01:37:44 -0500

riella gravatar image

I downloaded Ubuntu 18.04LTS, WSL, and ros-melodic on my computer.
Then, I tried to create a workspace. But catkin_make does not even work.
Build used to work, but once it gets errors after I change CMakeLists.txt, it showed same error.
I thought the problem was because of the python version, but I am not certain at this point.
catkin_make clean doesn't even work for me.
The error starts when going through files on C/Program Files/
I am not sure if it is relevant with environment variables, but please help..
Below is the error code:
wooriel@DESKTOP-S2934ST:/mnt/c/retina_analyzer_ros/catkin_ws$ catkin_make
Base path: /mnt/c/retina_analyzer_ros/catkin_ws
Source space: /mnt/c/retina_analyzer_ros/catkin_ws/src
Build space: /mnt/c/retina_analyzer_ros/catkin_ws/build
Devel space: /mnt/c/retina_analyzer_ros/catkin_ws/devel
Install space: /mnt/c/retina_analyzer_ros/catkin_ws/install
#### Running command: "cmake /mnt/c/retina_analyzer_ros/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/mnt/c/retina_analyzer_ros/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/mnt/c/retina_analyzer_ros/catkin_ws/install -G Unix Makefiles" in "/mnt/c/retina_analyzer_ros/catkin_ws/build" ####
-- Using CATKIN_DEVEL_PREFIX: /mnt/c/retina_analyzer_ros/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2")
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /mnt/c/retina_analyzer_ros/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17")
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.26
/mnt/c/retina_analyzer_ros/catkin_ws/devel/ 4: export: Files/Haskell/bin:/mnt/c/Program: bad variable name
Traceback (most recent call last):
File "/mnt/c/retina_analyzer_ros/catkin_ws/build/catkin_generated/", line 22, in <module>
code = generate_environment_script('/mnt/c/retina_analyzer_ros/catkin_ws/devel/')
File "/opt/ros/melodic/lib/python2.7/dist-packages/catkin/", line 62, in generate_environment_script
output = subprocess.check_output([env_script, sys.executable, '-c', python_code])
File "/usr/lib/python2.7/", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/mnt/c/retina_analyzer_ros/catkin_ws/devel/', '/usr/bin/python2', '-c', 'import os; print(dict(os.environ))']' returned non-zero exit status 2
CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/usr/bin/python2 "/mnt/c/retina_analyzer_ros/catkin_ws/build/catkin_generated/")
returned error code 1
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/all.cmake:208 (safe_execute_process)
/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:56 (find_package)

-- Configuring incomplete, errors occurred!
See also "/mnt/c/retina_analyzer_ros/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/retina_analyzer_ros/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

edit retag flag offensive close merge delete