catkin: Building catkin Workspace fails - install-layout not recognized
Hello, as I tried building ROS in catkin workspace today I got following error after invoking
catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
/usr/bin/env PYTHONPATH=/home/ecke/catkin_ws/install_isolated/lib/python3/dist-packages:/home/ecke/catkin_ws/build_isolated/catkin/lib/python3/dist-packages::/usr/local/lib/paraview-4.3/site-packages/:/usr/local/lib/veloview-3.1/site-packages/:/usr/local/lib/paraview-4.3/:/usr/local/lib/paraview-4.3/site-packages/vtk/ CATKIN_BINARY_DIR=/home/ecke/catkin_ws/build_isolated/catkin /home/ecke/miniconda3/bin/python /home/ecke/catkin_ws/src/catkin/setup.py build --build-base /home/ecke/catkin_ws/build_isolated/catkin install –install-layout=deb --prefix=/home/ecke/catkin_ws/install_isolated --install-scripts=/home/ecke/catkin_ws/install_isolated/bin usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …] or: setup.py --help [cmd1 cmd2 …] or: setup.py --help-commands or: setup.py cmd --help
error: option --install-layout not recognized CMake Error at catkin_generated/safe_execute_install.cmake:4 (message):
execute_process(/home/ecke/catkin_ws/build_isolated/catkin/catkin_generated/python_distutils_install.sh) returned error code Call Stack (most recent call first): cmake_install.cmake:149 (include)
Makefile:61: die Regel für Ziel „install“ scheiterteros make: *** [install] Fehler 1 <== Failed to process package ‘catkin’: Command ‘[‘make’, ‘install’]’ returned non-zero exit status 2
Upto this point I followed the ROS-setup-tutorial to make sure I’m not missing out on any step.
Checking dependencies
rosdep update && rosdep install --from-paths /home/ecke/catkin_ws/src --ignore-src --os=ubuntu:xenial
resolved in
#All required rosdeps installed successfully
system-info:
uname -a
Linux mechlab-GL552JX 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
python --version
Python 3.6.0 :: Continuum Analytics, Inc.
which python
/home/ecke/miniconda3/bin/python
Might there be an issue with python 3.6 through miniconda being the system default?
Thanks in advance for your help.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (4 by maintainers)
Keeping on searching I finally found a work around the
--install-layoutissue here. Invoking./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DSETUPTOOLS_DEB_LAYOUT=OFFdid it.@icolwell-as
Confirmed, 20.04 noetic downgrading setuptools works!
I just ran into this problem on Ubuntu 20.04 using ROS Noetic trying to build Autoware.ai. To summarize on what some others in this thread have suggested, there are 3 options to fix this:
Credit for this solution goes to this PR: https://github.com/usdot-fhwa-stol/carma-base/pull/111
-DSETUPTOOLS_DEB_LAYOUT=OFFoption and forget about it. If you are using colcon, you can add this to your default file located at ~/.colcon/defaults.yaml. Here’s an example:This way you don’t have to specify it on the command line every time.
PYTHONUSERBASEenv variable might work for you to switch to the system-installed python.I tested all 3 of these options and they all seem to resolve the issue. Option 1 seems like the cleanest solution.
EDIT: Added another option to resolve the issue.
FYI: --install-layout is a debian modification to Pythons “distutils” module. That option is maintained by and only shipped with Debian(-derivates), it is not part of the official Python release. So anyone using other python releases cannot use --install-layout.
For people who use catkin tools (like
catkin build) and choose to go with option 1 that @icolwell-as wrote above, add the CMake flag before runningcatkin_buildlike this:catkin config --cmake-args -DSETUPTOOLS_DEB_LAYOUT=OFFcatkin_build