Ask Your Question
2

Installing groovy from source fails

asked 2013-01-11 03:46:41 -0500

Miguel S. gravatar image

updated 2013-01-16 02:51:06 -0500

Hello!

I'm trying to install ros-groovy from source in an open-nao1.14 virtual machine (a gentoo derivative for NAO). The idea is to be able to then copy&paste the contents of /opt/ros/groovy and associated dependencies and have ROS working on an actual NAO.

After downloading ros-comm I execute (as per the instructions on the wiki )

./src/catkin/bin/catkin_make_isolated --install --install-space /opt/ros/groovy

But when the script calls make install installation fails because catkin's setup.py cannot recognise the option --install-layout=deb which the script is automatically adding. This is the exact error message:

+ /usr/bin/env PYTHONPATH=/opt/ros/groovy/lib/python2.7/dist-packages:/home/nao/ros/build_isolated/catkin/lib/python2.7/dist-packages:/opt/ros/groovy/lib/python2.7/dist-packages:/opt/ros/pydeps/lib/python2.7/site-packages/ CATKIN_BINARY_DIR=/home/nao/ros/build_isolated/catkin /usr/bin/python /home/nao/ros/src/catkin/setup.py build --build-base /home/nao/ros/build_isolated/catkin install --install-layout=deb --prefix=/opt/ros/groovy --install-scripts=/opt/ros/groovy/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/nao/ros/build_isolated/catkin/catkin_generated /python_distutils_install.sh)
  returned error code
Call Stack (most recent call first):
  cmake_install.cmake:115 (INCLUDE)

Any ideas on how to get it to compile?

Thanks!

Update: Here's the output of the commands requested.

Calling catkin's build & install command straight from python:

$ python setup.py build install --install-layout=deb
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

Python version:

$ /usr/bin/python --version
Python 2.7.2

Update 2: setup.py instructions

Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message
  --no-user-cfg   ignore pydistutils.cfg in your home directory

Options for 'install' command:
  --prefix            installation prefix
  --exec-prefix       (Unix only) prefix for platform-specific files
  --home              (Unix only) home directory to install under
  --user              install in user site-package
                  '/home/nao/.local/lib/python2.7/site-packages'
  --install-base      base installation directory (instead of --prefix or --
                  home)
  --install-platbase  base installation directory for platform-specific files
                  (instead of --exec-prefix or --home)
  --root              install everything relative to this alternate root
                  directory
  --install-purelib   installation directory for pure Python module
                  distributions
  --install-platlib   installation directory for non-pure module distributions
  --install-lib       installation directory for all module distributions
                  (overrides --install-purelib and --install-platlib)
  --install-headers   installation directory for C/C++ headers
  --install-scripts   installation directory for Python scripts
  --install-data      installation directory for data files
  --compile (-c)      compile .py to .pyc [default]
  --no-compile        don't compile .py files
  --optimize (-O)     also compile with optimization: -O1 for "python -O", -O2
                  for "python -OO", and -O0 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2013-01-11 05:08:46 -0500

KruseT gravatar image

updated 2013-01-16 02:37:12 -0500

This is strange. Can you please run in catkin:

$ python setup.py build install --install-layout=deb

and post the result? It should still give an error, but maybe a different one. Also tell us the result of

/usr/bin/python --version
/usr/bin/python --help install

My current best guess is that you use a very old python version (2.5.x) which does not have the --install-layout option.

Possibly you can set SETUPTOOLS_DEB_LAYOUT to OFF. Note there is no need for you to run catkin_make_isolated, just using catkin_make (or only cmake and make) should be fine. E.g.:

src/catkin/bin/catkin_make -DSETUPTOOLS_DEB_LAYOUT=OFF

Update:

Sorry, what we need is rather the output of

/usr/bin/python setup.py --help install

when invoked in the catkin folder. But still good to know you have found a solution to make it work....

Update2: It seems someone else already had the same problem on Gentoo with fuerte: https://code.ros.org/lurker/message/20120426.064234.46e82b4e.en.html Since as you say the NAo also uses a Gentoo derivative, I think it is likely that there is something in the overall buildchain in Gentoo that behaves differently from Ubuntu, maybe a different cmake version.

edit flag offensive delete link more

Comments

I got it to compile by invoking ./src/catkin/bin/catkin_make -DSETUPTOOLS_ARG_EXTRA="" and then calling make install from the build directory

Miguel S. gravatar image Miguel S.  ( 2013-01-16 01:59:50 -0500 )edit
KruseT gravatar image KruseT  ( 2013-01-16 02:56:34 -0500 )edit

Thanks for log, so for you, python setup.py really does not even offer --install-layout in the help. Weird.

KruseT gravatar image KruseT  ( 2013-01-16 02:57:37 -0500 )edit

It may not be a bug after all. The code compiles just fine with ./src/catkin/bin/catkin_make -DSETUPTOOLS_DEB_LAYOUT=OFF on a clean install. It seems catkin_make only updates the cmake variables if you haven't called it before; which is why I thought the command didn't work the first time around.

Miguel S. gravatar image Miguel S.  ( 2013-01-16 03:06:24 -0500 )edit

Yes, it's what the ticket said (also what Dirk said in his response).

KruseT gravatar image KruseT  ( 2013-01-16 21:20:45 -0500 )edit
1

answered 2013-01-16 13:03:24 -0500

Dirk Thomas gravatar image

The problem is that based on the first invocation of CMake the value of the SETUPTOOLS_DEB_LAYOUT determines SETUPTOOLS_ARG_EXTRA. These values are than cached and not changed anymore (until explicitly set by the user). This is even the case when you set -DSETUPTOOLS_DEB_LAYOUT=OFF which will not change the value of SETUPTOOLS_ARG_EXTRA.

As a workaround for now you can remove the CMakeCache.txt and run CMake again with the desired SETUPTOOLS_DEB_LAYOUT.

In the meantime catkin has been modified as stated in https://github.com/ros/catkin/issues/314 to always correctly update SETUPTOOLS_ARG_EXTRA when SETUPTOOLS_DEB_LAYOUT are changed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-01-11 03:46:41 -0500

Seen: 1,924 times

Last updated: Jan 16 '13