Error when installing package for the second time.

asked 2018-04-25 07:59:27 -0500

stefanvan gravatar image

updated 2018-04-25 19:58:56 -0500

I am trying to install ceres-solver for my project in ubuntu 16.04. The installation is completed successfully only once, I got an error when trying to install the second time. After I removed the /build_isolated and /devel_isolated directories from the first installation, this output appeared during the second installation:

dauker@dauker-asus:~/cambot_ws$ catkin_make_isolated --install --install-space /home/dauker/ros_library --use-ninja --pkg ceres-solver
Base path: /home/dauker/cambot_ws
Source space: /home/dauker/cambot_ws/src
Build space: /home/dauker/cambot_ws/build_isolated
Devel space: /home/dauker/cambot_ws/devel_isolated
Install space: /home/dauker/ros_library
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~  traversing 15 packages in topological order:
~~  - cambot
~~  - cambot_description
~~  - cambot_gazebo
~~  - cambot_pantilt_controller
~~  - cambot_purepursuit_controller
~~  - cambot_ros
~~  - cambot_teleop
~~  - cartographer_ros_msgs
~~  - ceres-solver (plain cmake)
~~  - cartographer (plain cmake)
~~  - cartographer_ros
~~  - cartographer_cambot
~~  - cartographer_rviz
~~  - imu_hi219m
~~  - rplidar_ros
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Skipping package: 'cambot'
Skipping package: 'cambot_description'
Skipping package: 'cambot_gazebo'
Skipping package: 'cambot_pantilt_controller'
Skipping package: 'cambot_purepursuit_controller'
Skipping package: 'cambot_ros'
Skipping package: 'cambot_teleop'
Skipping package: 'cartographer_ros_msgs'

==> Processing plain cmake package: 'ceres-solver'
==> Building with env: '/home/dauker/ros_library/env.sh'
==> cmake /home/dauker/cambot_ws/src/ceres-solver -DCMAKE_INSTALL_PREFIX=/home/dauker/ros_library -G Ninja in '/home/dauker/cambot_ws/build_isolated/ceres-solver/install'
Unhandled exception of type 'OSError':
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 981, in build_workspace_isolated
    number=index + 1, of=len(ordered_packages)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 691, in build_package
    destdir=destdir, use_ninja=use_ninja
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 513, in build_cmake_package
    run_command_colorized(cmake_cmd, build_dir, quiet)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 187, in run_command_colorized
    run_command(cmd, cwd, quiet=quiet, colorize=True, add_env=add_env)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 205, in run_command
    raise OSError("Failed command '%s': %s" % (cmd, e))
OSError: Failed command '['/home/dauker/ros_library/env.sh', 'cmake', '/home/dauker/cambot_ws/src/ceres-solver', '-DCMAKE_INSTALL_PREFIX=/home/dauker/ros_library', '-G', 'Ninja']': [Errno 2] No such file or directory
<== Failed to process package 'ceres-solver': 
  Failed command '['/home/dauker/ros_library/env.sh', 'cmake', '/home/dauker/cambot_ws/src/ceres-solver', '-DCMAKE_INSTALL_PREFIX=/home/dauker/ros_library', '-G', 'Ninja']': [Errno 2] No such file or directory
Command failed, exiting.
edit retag flag offensive close merge delete

Comments

1

Can you try without specifying that ninja should be used (so don't specify anything)?

gvdhoorn gravatar image gvdhoorn  ( 2018-04-25 09:44:54 -0500 )edit

@gvdhoorn I execute catkin_make_isolated --install --install-space /home/dauker/ros_library --use-ninja --pkg ceres-solver cartographer cartographer_ros on the first installation . I tried to remove --use-ninja as you said but got the same error.

stefanvan gravatar image stefanvan  ( 2018-04-25 20:01:39 -0500 )edit
1

So both times you did no add --use-ninja? And you did first rm -rf build_isolated install_isolated devel_isolated?

gvdhoorn gravatar image gvdhoorn  ( 2018-04-26 02:35:16 -0500 )edit

@gvdhoorn I add --use-ninja for the first installation, and remove it for the second installation as you suggested. And I did first execute rm -rf build_isolated install_isolated devel_isolated. But no matter what I do, I will get the error message posted in the question.

stefanvan gravatar image stefanvan  ( 2018-04-26 02:39:48 -0500 )edit
1

I may have been unclear: I suggested to not add --use-ninja ever. So not for the first, neither the second run.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-26 02:40:55 -0500 )edit

@gvdhoorn I'm very sorry that I misunderstood what you mean. However, the current situation is that with or without --use-ninja, there will be some output of error.

stefanvan gravatar image stefanvan  ( 2018-04-26 02:51:49 -0500 )edit
1

No need to apologise, it may have just been unclear.

Ok, I just wanted to know whether the ninja support was perhaps broken in some way.

If this always happens with Cartographer -- but not without Cartographer -- then perhaps this is something to report to Google itself.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-26 02:57:56 -0500 )edit

This may not be related to the cartographer or cartographer_ros. When I compile the ceres-solver separately with the command catkin_make_isolated --install --use-ninja --pkg ceres-solver, the error showed up again.

stefanvan gravatar image stefanvan  ( 2018-04-26 03:14:50 -0500 )edit