Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rosdep install fails on osx indigo #339

Closed
jmtatsch opened this issue Aug 5, 2014 · 20 comments
Closed

rosdep install fails on osx indigo #339

jmtatsch opened this issue Aug 5, 2014 · 20 comments

Comments

@jmtatsch
Copy link

jmtatsch commented Aug 5, 2014

~/ros_catkin_ws » rosdep install --from-paths src --ignore-src --rosdistro indigo -y
ERROR: Rosdep experienced an internal error.
Please go to the rosdep page [1] and file a bug report with the message below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.10.30

Bad installer [homebrew]: Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/rosdep2/platforms/osx.py", line 182, in is_installed
    pkg_info = json.loads(std_out)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
@NikolausDemmel
Copy link
Contributor

I cannot reproduce this. You have the most recent version of rosdep. Have you recently called brew update?

@NikolausDemmel
Copy link
Contributor

It turns out the part of the code constructing above error message is slightly faulty and thus does not contain enough information such as for which formula this failed, and what the output that it is trying to parse is.

Would you be comfortable installing an updated version of rosdep manually to aid debugging? The instructions are as follows:

  1. Download rosdep source:
cd ~
git clone https://github.com/ros-infrastructure/rosdep.git
cd rosdep
git checkout osx_installer_debugging
  1. Uninstall pip version of rosdep and install development version:
sudo pip uninstall rosdep
cd ~/rosdep
python setup.py develop
  1. To later go back to the released version from pip, you can do the following:
cd ~/rosdep
python setup.py develop -u
sudo pip install rosdep

@jmtatsch
Copy link
Author

jmtatsch commented Aug 6, 2014

that branch osx_installer_debugging does not exist anymore

@jmtatsch
Copy link
Author

jmtatsch commented Aug 6, 2014

ah its merged into master already

rosdep install --from-paths src --ignore-src --rosdistro indigo -y

ERROR: Rosdep experienced an internal error.
Please go to the rosdep page [1] and file a bug report with the message below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.10.30

Bad installer [homebrew]: Error while parsing brew info for 'tango-icon-theme'

  • Output of brew info tango-icon-theme --json=v1:
  • Error while parsing:
    Traceback (most recent call last):
    File "/Users/tatsch/rosdep/src/rosdep2/platforms/osx.py", line 184, in is_installed
    pkg_info = json.loads(std_out)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
    return _default_decoder.decode(s)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
    ValueError: No JSON object could be decoded

@jmtatsch
Copy link
Author

jmtatsch commented Aug 6, 2014

tango-icon-theme is installed in brew but if i want to reinstall it cannot find the formula.
brew tap yields:
homebrew/science
homebrew/versions
osrf/simulation
ros/deps

@NikolausDemmel
Copy link
Contributor

Can you brew update and brew tap --repair?

the formula should be in ros/deps, see https://github.com/ros/homebrew-deps/blob/master/tango-icon-theme.rb

@jmtatsch
Copy link
Author

jmtatsch commented Aug 6, 2014

Thanks, after repairing the tap, i could reinstall icon-theme. Then rosdep more or less worked:

executing command [brew install boost --with-python]
Warning: boost-HEAD already installed
executing command [brew install gcc]
Warning: gcc-4.9.1 already installed, it's just not linked
ERROR: the following rosdeps failed to install
  homebrew: Failed to detect successful installation of [boost --with-python]
  homebrew: Failed to detect successful installation of [gcc]

@jmtatsch jmtatsch closed this as completed Aug 6, 2014
@NikolausDemmel
Copy link
Contributor

@MrTatsch thanks for trying out the current version from source. The branch had indeed been merged before you did tried it. Concerning the remaining messages you got:

executing command [brew install boost --with-python]
Warning: boost-HEAD already installed

Rosdep sees boost as "not installed", since it does not have the right options (--with-python missing). But it does not uninstall the existing install. The attempted brew install boost --with python fails with that warning.

executing command [brew install gcc]
Warning: gcc-4.9.1 already installed, it's just not linked

Similar to above, rosdep notices gcc is not linked, so it sees it as "not installed". Executing brew install gcc fails with that warning.

The above two cases are current limitations of rosdep homebrew, requiring manual intervention. Both cases don't happen on a virgin system, or when choosing the --reinstall option for rosdep (but that might not exactly be what you want either).

I suggest the following manual action to get rid of these errors for future installs:

  1. Uninstall boost and install again (brew install boost --with-python; takes a while to compile). I suspect you installed the "HEAD" version a while ago, back when the python libs where still included in the boost formula by default. "HEAD" installs will never get automatic upgrades (via brew upgrade). If you now install boost without --with-python, some ROS packages will fail to compile.
  2. Execute brew link gcc. If you get errors, it is likely because of an installed gfortran formula. This is no longer needed and gfortran now comes with gcc, so do brew uninstall -f gfortran and then again brew link gcc.

@jmtatsch
Copy link
Author

jmtatsch commented Aug 7, 2014

Your suggestions all worked very well.
Let's hope that reduces errors for future installs ;)

@tiberiusferreira
Copy link

I have a very similar problem. I have a clean Mac OS install 10.9.5. I followed http://wiki.ros.org/indigo/Installation/OSX/Homebrew/Source as well as I could but I get the error:
rosdep install --from-paths src --ignore-src --rosdistro indigo -y
executing command [brew install boost --with-python]
Warning: boost-1.56.0 already installed
ERROR: the following rosdeps failed to install
homebrew: Failed to detect successful installation of [boost --with-python]

I tried what you suggested "Uninstall boost and install again (brew install boost --with-python; takes a while to compile). " and everything goes fine :

mbp-de-tiberio:ros_catkin_ws tiberio$ brew uninstall boost
Uninstalling /usr/local/Cellar/boost/1.56.0...
mbp-de-tiberio:ros_catkin_ws tiberio$ brew install boost --with-python
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/boost-1.56.0.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/boost-1.56.0.mavericks.bottle.tar.gz
==> Pouring boost-1.56.0.mavericks.bottle.tar.gz
🍺 /usr/local/Cellar/boost/1.56.0: 10471 files, 438M

But the error continues.

If I try to go on and do ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
it results in:

==> Processing catkin package: 'catkin'
==> cmake /Users/tiberio/ros_catkin_ws/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/tiberio/ros_catkin_ws/devel_isolated/catkin -DCMAKE_INSTALL_PREFIX=/Users/tiberio/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release in '/Users/tiberio/ros_catkin_ws/build_isolated/catkin'
-- Using CATKIN_DEVEL_PREFIX: /Users/tiberio/ros_catkin_ws/devel_isolated/catkin
-- Using CMAKE_PREFIX_PATH:
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Could NOT find PY_em (missing: PY_EM)
CMake Error at cmake/empy.cmake:29 (message):
Unable to find either executable 'empy' or Python module 'em'... try
installing the package 'python-empy'
Call Stack (most recent call first):
cmake/all.cmake:146 (include)
CMakeLists.txt:8 (include)

-- Configuring incomplete, errors occurred!
See also "/Users/tiberio/ros_catkin_ws/build_isolated/catkin/CMakeFiles/CMakeOutput.log".
<== Failed to process package 'catkin':
Command 'cmake /Users/tiberio/ros_catkin_ws/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/tiberio/ros_catkin_ws/devel_isolated/catkin -DCMAKE_INSTALL_PREFIX=/Users/tiberio/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release' returned non-zero exit status 1

Reproduce this error by running:
==> cd /Users/tiberio/ros_catkin_ws/build_isolated/catkin && cmake /Users/tiberio/ros_catkin_ws/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/tiberio/ros_catkin_ws/devel_isolated/catkin -DCMAKE_INSTALL_PREFIX=/Users/tiberio/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release

Command failed, exiting.

@burrimi
Copy link

burrimi commented Oct 3, 2014

brew switched the boost formula recently.
brew install boost --with-python
does not work anymore. instead use
brew install boost-python

unfortunately rosdep still complains and I don't know how to fix it, but the catkin_ws compiled fine after installing boost-python.

@tiberiusferreira
Copy link

Thanks!

@ghost
Copy link

ghost commented Oct 7, 2014

but how did you install the other dependencies with rosedep complaining?
i also installed boost-python, but /src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release fails!

@jmtatsch
Copy link
Author

jmtatsch commented Oct 8, 2014

how exactly does it fail?

@jmtatsch
Copy link
Author

jmtatsch commented Jun 1, 2015

Now the same thing with jade, repairing the taps did not help.

rosdep install --from-paths src --ignore-src --rosdistro jade -y

ERROR: Rosdep experienced an internal error.
Please go to the rosdep page [1] and file a bug report with the message below.
[1] : http://www.ros.org/wiki/rosdep

rosdep version: 0.11.2

Bad installer [homebrew]: Error while parsing brew info for 'pcl'

  • Output of brew info pcl --json=v1:
  • Error while parsing:
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/site-packages/rosdep2/platforms/osx.py", line 184, in is_installed
    pkg_info = json.loads(std_out)
    File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
    return _default_decoder.decode(s)
    File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
    ValueError: No JSON object could be decoded

@jmtatsch jmtatsch reopened this Jun 1, 2015
@jmtatsch
Copy link
Author

jmtatsch commented Jun 1, 2015

brew info pcl --json=v1
Error: Formulae found in multiple taps:

  • homebrew/science/pcl
  • ros/deps/pcl

Please use the fully-qualified name e.g. homebrew/science/pcl to refer the formula.

@wjwwood
Copy link
Contributor

wjwwood commented Jun 1, 2015

@jmtatsch thanks for digging into the issue, can you open a pull request against ros/rosdistro to change the rule to use the homebrew/science/pcl instead of just pcl?

@812406210
Copy link

I have a issue,can you help me to resovel


ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies (ROS distro is not set. Make sure ROS_DISTRO environment variable is set, or use --rosdistro option to specify the distro, e.g. --rosdistro indigo):
cartographer_ros_msgs: Cannot locate rosdep definition for [geometry_msgs]
cartographer: Cannot locate rosdep definition for [catkin]
cartographer_ros: Cannot locate rosdep definition for [rosunit]
cartographer_rviz: Cannot locate rosdep definition for [rviz]
ceres-solver: Cannot locate rosdep definition for [catkin]


i can't resovel it

@tfoote
Copy link
Member

tfoote commented Mar 15, 2017

@812406210 please ask for help on http://answers.ros.org following our Support policy. Your question is unrelated to this thread.

@wjwwood
Copy link
Contributor

wjwwood commented Jul 28, 2017

Closing for now, I can reopen if anyone thinks it should be.

@wjwwood wjwwood closed this as completed Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants