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

macOS High Sierra installation #116

Closed
michtesar opened this issue Mar 1, 2018 · 68 comments
Closed

macOS High Sierra installation #116

michtesar opened this issue Mar 1, 2018 · 68 comments

Comments

@michtesar
Copy link

Hi,

I have tried to install ROS Kinetic Kame with this tutorial about 6 months ago. Is there any progress?

After hours of building I haven't managed to install ROS at all. I was only able to run roscore but anything else (RViz, rqt etc.) didn't work. It would be very pleasant for me to run ROS natively, now I run it in VM and it is not very great solution.

My question is, is there any working tutorial to install it? And does it working?

Back in time when I was trying to install ROS build failed with matplotlib and Qt, but I had the right versions and proper paths in terminal.

Thank you,

Michael

@grafoteka
Copy link

Hi @neuropacabra,
I'm in the same point as you. I try the installation last year, and now again and I have no good results, so I have to continue using ubuntu in a partition.

@michtesar
Copy link
Author

Hi @grafoteka it is great to hear :-) i mean it. I read all over the place that everyone can run ROS under macOS High Sierra, but I have actually never seen anyone around me to successfully run it. One way (I am thinking about) is Docker. But even with Docker I had no luck. Unfortunately I have latest Macbook Pro 2017 which has basically no Linux support (no susspension, no audio, no inbuild peripherals etc.)

@quinnabrvau
Copy link

This dockerfile will easily run the command line options but no GUI

FROM ros:kinetic-ros-base-xenial
RUN apt-get update
RUN apt-get install -y ros-kinetic-perception=1.3.1-0*
RUN apt-get install -y nano
RUN rm -rf /var/lib/apt/lists/*

# add ros path to bash profile
RUN echo "source /opt/ros/kinetic/setup.bash" >> /root/.bashrc

# create catkin workspace
RUN /bin/bash -c 'source /opt/ros/kinetic/setup.bash && \
    mkdir -p /root/catkin_ws/src && cd /root/catkin_ws && catkin_make && \
    echo "source /root/catkin_ws/devel/setup.bash" >> /root/.bashrc'```

@horagong
Copy link

I am using it natively on mac High Sierra with Rviz, Rqt, Moveit. It's possible but you will have to look around issues of each git repo.

@michtesar
Copy link
Author

@horagong Can you please guide me a little? This is what I tried so far. It did not work for me at all.[
ROS install macOS.txt
](url)

@berkaydeniz
Copy link

I would highly recommend installing Lunar, which works almost out-of-the-box.

@michtesar
Copy link
Author

@berkaydeniz OK, finally I got into complitation :-) I stucked on rostime package which has boost dependency. I installed boost with brew install boost and brew install python-boost and event downloaded and compiled from source. Even then I end up with TypeError: coercing to Unicode: need string or buffer, NoneType found when passing boost into terminal. I cannot solve this. Can you give a hint what to do?

@berkaydeniz
Copy link

@neuropacabra, unfortunately I don't have any advice on this matter because I didn't have such a problem. One grave advice I can give you is, in order for this to work with little to no problem, you kinda need to wipe out everything you installed before. Last time I used this script, I started with a fresh OS X installation.

The correct version of boost should be installed by the script itself. The problem you are having is potentially due to a previous installation of the library messing things up but this is just speculation.

@michtesar
Copy link
Author

@berkaydeniz Oh, I was thinking about this 👍 I will try in virtual and then I will write a report in case anyone would find it useful. Thanks a lot!

@Arsapol
Copy link

Arsapol commented May 2, 2018

@neuropacabra, unfortunately I don't have any advice on this matter because I didn't have such a problem. One grave advice I can give you is, in order for this to work with little to no problem, you kinda need to wipe out everything you installed before. Last time I used this script, I started with a fresh OS X installation. The correct version of boost should be installed by the script itself. The problem you are having is potentially due to a previous installation of the library messing things up but this is just speculation.

@berkaydeniz Oh, I was thinking about this 👍 I will try in virtual and then I will write a report in case anyone would find it useful. Thanks a lot!

I have just tried to install ros in Parallels Desktop with clean High Sierra install and it didn't work. Error still be rostime and it is the same error as I saw before.

Sorry for my poor English.

@michtesar
Copy link
Author

@IcyZKunGz I have same experience.

I was able to cpmpile like 36 out of 250 packages. I always endup with rostime errors I described eralier. I think it's boost related.

Without rostime all packages then fail. So I ended up my ROS on macOS desire. I get another machine and enjoy my life again :-)

@NcJie
Copy link

NcJie commented May 3, 2018

@neuropacabra I ran into the same problem, I was able to compile it with boost 1.63. Ros-lunar does not seem to be compatible with boost 1.67

  1. Uninstall / unlink the latest boost version (1.67)
    • brew uninstall boost
    • brew unlink boost
  2. Install boost 1.63 and boost-python 1.63
    • brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2898efab0f331be9663a640c2fae8b191b9538b2/Formula/boost.rb
    • brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/a82238a3936a2691a17a516fc1fd6c67055160fa/Formula/boost-python.rb
    • The formula link is obtained from https://github.com/Homebrew/homebrew-core/commits/master/Formula/boost.rb. I selected the updated 1.63 commit
    • Note that, Xcode 9.3 is required
  3. Re-run install.sh

@grafoteka
Copy link

@NcJie I have try your tips, but I have the next error:

Errors << rostime:make /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/logs/rostime/build.make.000.log
In file included from /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/duration.cpp:35:
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/include/ros/impl/duration.h:182:31: error: no matching conversion for functional-style cast from 'double' to 'bt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
return bt::seconds(sec) + bt::microseconds(nsec/1000.0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/duration.cpp:75:18: note: in instantiation of member function 'ros::DurationBaseros::Duration::toBoost' requested here
template class DurationBase;
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral, void>::type* = 0) :
^
In file included from /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/duration.cpp:35:
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/include/ros/impl/duration.h:182:31: error: no matching conversion for functional-style cast from 'double' to 'bt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
return bt::seconds(sec) + bt::microseconds(nsec/1000.0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/duration.cpp:76:18: note: in instantiation of member function 'ros::DurationBaseros::WallDuration::toBoost' requested here
template class DurationBase;
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral, void>::type* = 0) :
^
2 errors generated.
make[2]: *** [CMakeFiles/rostime.dir/src/duration.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:41:
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/include/ros/impl/time.h:170:35: error: no matching conversion for functional-style cast from 'double' to 'pt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
return pt::from_time_t(sec) + pt::microseconds(nsec/1000.0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:590:18: note: in instantiation of member function 'ros::TimeBase<ros::Time, ros::Duration>::toBoost' requested here
template class TimeBase<Time, Duration>;
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral, void>::type* = 0) :
^
In file included from /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:41:
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/include/ros/impl/time.h:170:35: error: no matching conversion for functional-style cast from 'double' to 'pt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
return pt::from_time_t(sec) + pt::microseconds(nsec/1000.0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:591:18: note: in instantiation of member function 'ros::TimeBase<ros::WallTime, ros::WallDuration>::toBoost' requested here
template class TimeBase<WallTime, WallDuration>;
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral, void>::type* = 0) :
^
In file included from /Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:41:
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/include/ros/impl/time.h:170:35: error: no matching conversion for functional-style cast from 'double' to 'pt::microseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000000>')
return pt::from_time_t(sec) + pt::microseconds(nsec/1000.0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jorge/Downloads/ros-install-osx/lunar_desktop_full_ws/src/roscpp_core/rostime/src/time.cpp:592:18: note: in instantiation of member function 'ros::TimeBase<ros::SteadyTime, ros::WallDuration>::toBoost' requested here
template class TimeBase<SteadyTime, WallDuration>;
^
/usr/local/include/boost/date_time/time_duration.hpp:270:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'double' to 'const boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000000>' for 1st argument
class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
^
/usr/local/include/boost/date_time/time_duration.hpp:286:59: note: candidate template ignored: disabled by 'enable_if' [with T = double]
typename boost::enable_if<boost::is_integral, void>::type* = 0) :
^
3 errors generated.
make[2]: *** [CMakeFiles/rostime.dir/src/time.cpp.o] Error 1
make[1]: *** [CMakeFiles/rostime.dir/all] Error 2
make: *** [all] Error 2

And I can only compile 33 packages.

@Arsapol
Copy link

Arsapol commented May 3, 2018

@NcJie I followed your advice and rostime is passed. But I found tf2 error. (I'm upgrading my Xcode to 9.3)

@grafoteka I used to have error like you. I recheck boost version and it stills 1.67.
If I'm not wrong you can solve it by
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/2898efab0f331be9663a640c2fae8b191b9538b2/Formula/boost.rb

@guhur
Copy link

guhur commented May 9, 2018

For the tf2 error, you need to apply this patch: https://github.com/ros/geometry2/pull/279/files (I suppose you are building lunar)

@asimonov
Copy link

asimonov commented May 9, 2018

did anyone build ROS (kinetic or lunar) on Mac OS using anaconda's environment rather than 'brew' python?

@asimonov
Copy link

asimonov commented May 9, 2018

@NcJie I can go to boost 1.63. but trying to install boost-python 1.63 gives me errors that I cannot understand/fix:

$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/a82238a3936a2691a17a516fc1fd6c67055160fa/Formula/boost-python.rb
######################################################################## 100.0%
Warning: boost-python 1.67.0 is available and more recent than version 1.63.0.
==> Downloading https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.bz2
Already downloaded: /Users/alexeysimonov/Library/Caches/Homebrew/boost-python-1.63.0.tar.bz2
sh: python3: command not found
sh: python3: command not found
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost-python/1.63.0 --libdir=/usr/local/Cellar/boost-python/1.63.0/lib --with-libraries=python --with-python=python3 --with-python-root=
==> ./b2 --build-dir=build-python3 --stagedir=stage-python3 python= --prefix=/usr/local/Cellar/boost-python/1.63.0 --libdir=/usr/local/Cellar/boost-python/1.63.0/lib -d2 -j8 --layout=tag
Last 15 lines from /Users/alexeysimonov/Library/Logs/Homebrew/boost-python/02.b2:
--layout=tagged
--user-config=user-config.jam
threading=multi,single
link=shared,static

/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/build/property.jam:293: in validate1 from module property
error: Invalid property '<python>': No value specified for feature 'python'.
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/build/property.jam:302: in property.validate from module property
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/build/build-request.jam:228: in convert-command-line-element from module build-request
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/build/build-request.jam:179: in build-request.convert-command-line-elements from module build-request
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/build-system.jam:691: in load from module build-system
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/kernel/modules.jam:295: in import from module modules
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/private/tmp/boost-python-20180509-42311-1pscz18/boost_1_63_0/boost-build.jam:17: in module scope from module


Do not report this issue to Homebrew/brew or Homebrew/core!


Error: You have MacPorts or Fink installed:
  /opt/local/bin/port

This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.

  sudo mv /opt/local ~/macports

it seems to try to install it for python3. but I want just python2. and i do not seem to have any way of telling it to ignore python3

@asimonov
Copy link

asimonov commented May 9, 2018

re: above comment. I have given up on trying to use 'conda' env with python 2.7. reinstalled brew and now trying to make the install script run from scratch.
again, seeing boost 1.67 issue.
is there a plan to change main script to use boost 1.63?

@guhur
Copy link

guhur commented May 9, 2018

There is a PR going-on: ros/roscpp_core#79. It might allow you to use only boost 1.67, I did not try.

@mikepurvis
Copy link
Owner

Can Homebrew let you install versions other than the current one? I thought you could pretty much just switch between linking the different versions you happened to already have present on your machine.

In any case, my preference would be to see the issue with Boost 1.67 resolved.

@asimonov
Copy link

asimonov commented May 9, 2018

right, I think it is enough to just have boost 1.63. boost-python that I have is 1.67 and i can go past that boost compile error

@asimonov
Copy link

asimonov commented May 9, 2018

i can install older versions of boost and boost-python as suggested by @NcJie . but boost-python does not install. shows the error highlighed above

@asimonov
Copy link

asimonov commented May 9, 2018

I managed to install (semi-manually) boost-python/boost 1.64. now I get the following, which relates to Apple Clang, as it seems:

Errors     << camera_calibration_parsers:make /Users/alexeysimonov/dev/ros-install-osx/lunar_desktop_full_ws/logs/camera_calibration_parsers/build.make.000.log                                                                                                                           
In file included from /Users/alexeysimonov/dev/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:10:
/usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/parser.h:41:3: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions]
  explicit operator bool() const;
  ^~~~~~~~
In file included from /Users/alexeysimonov/dev/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:14:
/usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:100:47: error: a space is required between consecutive right angle brackets (use '> >')
    const T&, typename disable_if<is_numeric<T>>::type* = 0) {
                                              ^~
                                              > >
/usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:112:50: error: a space is required between consecutive right angle brackets (use '> >')
    const T& key, typename enable_if<is_numeric<T>>::type* = 0) {
                                                 ^~
                                                 > >
/usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:123:11: error: exception specification of overriding function is more lax than base version
  virtual ~Exception() YAML_CPP_NOEXCEPT;

did anyone see/overcome this?

@asimonov
Copy link

this is this issue: ros-perception/image_common#78

@asimonov
Copy link

fixed by using ' -DCMAKE_CXX_STANDARD=14 ' in catkin config

@asimonov
Copy link

pcl_ros gives this strange error, which seems to be related to brew version of pcl

Errors     << pcl_ros:make /Users/alexey/dev/ros-install-osx/lunar_desktop_full_ws/logs/pcl_ros/build.make.001.log                                      
make[2]: *** No rule to make target `/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/Python', needed by `/Users/alexey/dev/ros-install-osx/lunar_desktop_full_ws/devel/.private/pcl_ros/lib/pcl_ros/pointcloud_to_pcd'.  Stop.
make[1]: *** [CMakeFiles/pointcloud_to_pcd.dir/all] Error 2
make: *** [all] Error 2

@asimonov
Copy link

fixed by installing brew formula from python@2 2.7.14_3
and finally I have working lunar build on OS X!

@guhur
Copy link

guhur commented May 10, 2018

Do you have any error about std::vector when you start roscore?

@asimonov
Copy link

asimonov commented May 10, 2018 via email

@berkaydeniz
Copy link

As an additional note, on melodic, rviz terminates gracefully!

@mikepurvis
Copy link
Owner

@berkaydeniz Awesome, thank you for powering through with this! Please send a PR which makes the necessary modifications so that Melodic works. :)

@asimonov
Copy link

asimonov commented Jun 15, 2018 via email

@cmaclell
Copy link

Hey everyone, I'm trying to get Melodic to work on High Sierra and your notes have been incredibly helpful.

What is the best way that you've all found to fix all the float vs uint32? Are you just manually editing the downloaded source files and then rerun the catkin build (without rerunning the ros-install-osx ./install script which rebuilds the workspace overwriting any changes I've made to the source files)?

@berkaydeniz
Copy link

@cmaclell after the install reached the catkin build phase, after every error, I corrected the problems, and ran catkin build again.

@mikepurvis I will properly create forks with fixes to be included in the modified install script, test it and create a PR as soon as I can.

@cmaclell
Copy link

cmaclell commented Jun 16, 2018

@berkaydeniz Thanks. Also, you mention adding python27 to the CMakeLists.txt for cv_bridge and camera_calibration_parsers. Where are the CMakeLists.txt files located? There does not seem to be folders for cv_bridge and camera_calibration_parsers in melodic_desktop_full_ws/src, which is where I expected them to be.

Ah, nevermind, I found them in src/vision_opencv/cv_bridge and src/image_common/camera_calibration_parsers.

For the record, I was able to get everything working and am now up and running on MacOS High Sierra, thanks for all your breadcrumbs 👍

@raskolnikov-reborn
Copy link

@berkaydeniz Hi. I would like to collaborate on getting melodic to work on high Sierra with you. Can you send me a message and lets divide up the workload and prepare a wiki/doc to get stuff moving?

@meyerj
Copy link

meyerj commented Aug 2, 2018

For the record:

fix the boost_python cmake problem with Boost 1.67 as suggested in #116 (comment). I did not find this thread before.

@berkaydeniz
Copy link

@meyerj, I have pull requests with exact same fixes linked above under my June 15 comment. I will try to submit a PR within the next 48 hours.

@berkaydeniz
Copy link

berkaydeniz commented Aug 4, 2018

@meyerj after looking at your approach, it makes more sense to me, I will close my pull requests for those repositories and use yours. One question, though, why do you think your pull request for image_common fails the Travis CI check?

@michtesar
Copy link
Author

I volunteer in any case of testing and especially writing documentation - finalize a sh script.

@berkaydeniz
Copy link

pull request created: #126
Please feel free to test it and let everybody know what kind of problems you come across.

@asimonov
Copy link

asimonov commented Aug 8, 2018

hi!
i have tried the PR, but ran commands from install script manually.
had few hiccups, but i think it has worked.

roscore can start ok.

cannot start rviz. should it be available just by running rviz?

PS
do you recommend removing homebrew before installation? I have started from existing homebrew install

@berkaydeniz
Copy link

hey, your existing homebrew explains why you needed to run several commands manually, it will manually make you upgrade packages you have.

I would recommend purging homebrew and trying again.

I think there are still two instances the script fails with homebrew telling you what to do. You simply run the given command and then run the install script again. One of these is that weird force linking of pyyaml and the other happens only when you start after purging homebrew. Especially once you reach catkin you shouldn't need to interfere.

roscore, message interfaces, rviz, gazebo, rqt_plot, rqt_tree are all working for me. as long as you source your .bash_profile, just rviz should be enough.

@asimonov
Copy link

asimonov commented Aug 8, 2018

the pull request works for me!

I had to purge Homebrew to make it happen.

High Sierra 10.13.6

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@grafoteka
Copy link

Hi all,
finally I could install and compile ROS Lunar on OSX High Sierra.

Unfortunately, I have the error:

[ERROR] [1538702529.917543000]: [registerService] Failed to contact master at [Jorges-MacBook-Pro.local:11311]. Retrying...

I have read this issue #1357 but my files are like that.

Also, if I want to launch Gazebo, I have the next error:

dyld: Symbol not found: __ZNK5boost16re_detail_10670031cpp_regex_traits_implementationIcE17transform_primaryEPKcS4_
  Referenced from: /usr/local/opt/sdformat5/lib/libsdformat.5.dylib
  Expected in: /usr/local/opt/boost/lib/libboost_regex-mt.dylib
 in /usr/local/opt/sdformat5/lib/libsdformat.5.dylib
/opt/ros/lunar/lib/gazebo_ros/gzserver: line 41:  1980 Abort trap: 6           GAZEBO_MASTER_URI="$desired_master_uri" GAZEBO_MODEL_DATABASE_URI="$desired_model_database_uri" gzserver $final
[gazebo-1] process has died [pid 1909, exit code 134, cmd /opt/ros/lunar/lib/gazebo_ros/gzserver -e ode /Volumes/almacen/WS/catkin_ws/src/arm_gazebo/worlds/empty.world __name:=gazebo __log:=/Users/jorge/.ros/log/13dd8666-c83d-11e8-8dc2-c82a1416cda2/gazebo-1.log].
log file: /Users/jorge/.ros/log/13dd8666-c83d-11e8-8dc2-c82a1416cda2/gazebo-1*.log

Has anyone else had the same problem?

Thank you,
Jorge

@michtesar
Copy link
Author

@grafoteka Hi! Awesome! Can you provide a way how did you installed?

@grafoteka
Copy link

Hi @michtesar sure! I will try to explain you in the next lines.

I have an MacBook Pro early 2011, with 16GB RAM and SSD, and a fresh installation of OSX High Sierra.

I download this repo and start the installation with the script ./install.

Here are the next errors that I had:

Solution: sudo xcodebuild -license accept

  • Error Warn about PCL > 1.7.x #2:
    Error: Cask 'brew-cask' is unavailable: '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/brew-cask.rb' does not exist.
    Updating Homebrew...
    ==> Satisfying dependencies
    ==> Downloading https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
    ######################################################################## 100.0%
    ==> Verifying SHA-256 checksum for Cask 'xquartz'.
    ==> Installing Cask xquartz
    ==> Creating Caskroom at /usr/local/Caskroom
    ==> We'll set permissions properly so we won't need sudo in the future.
    Password:
    ==> Running installer for xquartz; your password may be necessary.
    ==> Package installers may write to any location; options such as --appdir are i
    installer: Package name is XQuartz 2.7.11
    installer: Installing at base path /
    installer: The install was successful.
    🍺 xquartz was successfully installed!
    Log out and in to finalize XQuartz setup.

Solution: Log out and init session

Solution:
https://stackoverflow.com/questions/37232601/errnoeperm-operation-not-permitted-dir-s-rmdir/37233446#37233446
sudo chmod 1777 /usr/local

Solution:
brew install python2

Collecting pycurl
  Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Using curl-config (libcurl 7.54.0)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/sr/bvv3t_fx6rzds8ps0y2p5l9w0000gn/T/pip-install-UAasPc/pycurl/setup.py", line 913, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/private/var/folders/sr/bvv3t_fx6rzds8ps0y2p5l9w0000gn/T/pip-install-UAasPc/pycurl/setup.py", line 582, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/private/var/folders/sr/bvv3t_fx6rzds8ps0y2p5l9w0000gn/T/pip-install-UAasPc/pycurl/setup.py", line 99, in __init__
        self.configure()
      File "/private/var/folders/sr/bvv3t_fx6rzds8ps0y2p5l9w0000gn/T/pip-install-UAasPc/pycurl/setup.py", line 316, in configure_unix
        specify the SSL backend manually.''')
    __main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sr/bvv3t_fx6rzds8ps0y2p5l9w0000gn/T/pip-install-UAasPc/pycurl/

Solution:
pycurl/pycurl#526

sudo pip uninstall pycurl
export PYCURL_SSL_LIBRARY=openssl
export LDFLAGS=-L/usr/local/opt/openssl/lib;export CPPFLAGS=-I/usr/local/opt/openssl/include;pip install pycurl --compile --no-cache-dir
oslisp: No definition of [google-mock] for OS [osx]
catkin: No definition of [google-mock] for OS [osx]

Solution:
Add in rosdeps.yaml
google-mock:
osx:
homebrew:
packages: []

Error: An exception occured within a child process: Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/Cellar/gtest/1.7.0
ERROR: the following rosdeps failed to install homebrew: command [brew install gtest] failed

Solution:
Add in rosdeps.yaml
gtest:
osx:
homebrew:
packages: []

Error: Could not symlink include/gtest
Target /usr/local/include/gtest
already exists. You may want to remove it:
  rm '/usr/local/include/gtest'

Solution:
rm '/usr/local/include/gtest'

Solution:
https://github.com/ros/geometry2/pull/279/files


Errors compiling ROS:

Every time I had an error compiling because a package was not found, I start again compiling from that package. Like in the next example:

  • Error:
    Errors << rospy_tutorials:cmake
    CMake Error at /Users/jorge/ros-install-osx/lunar_desktop_full_ws/src/ros_tutorials/rospy_tutorials/CMakeLists.txt:112 (add_rostest):
    Unknown CMake command "add_rostest".

Solution:
catkin build --start-with ros_test

Solution:
1 Uninstall / unlink the latest boost version (1.67)

brew uninstall boost
brew unlink boost
2	Install boost 1.63 and boost-python 1.63
◦	brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2898efab0f331be9663a640c2fae8b191b9538b2/Formula/boost.rb —with-python
◦	brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/a82238a3936a2691a17a516fc1fd6c67055160fa/Formula/boost-python.rb
◦	The formula link is obtained from https://github.com/Homebrew/homebrew-core/commits/master/Formula/boost.rb. I selected the updated 1.63 commit
◦	Note that, Xcode 9.3 is required
3	Re-run install.sh

Once, you have compile the compile everything, if you have the error that:

roscore: command not found

After that, I was able to launch ros core and some packages, but with the problems that there were no connections to localhost. (I don't remember the correct error, but was similar)

Also, installing boost 1.63 I think that is the fail by which Gazebo 8 can't be started.

Hope this can help you.
Jorge

Then, you have to do a new catkin build.

@grafoteka
Copy link

Hi all! I continue trying to install ROS in my mac.

Now, I'm having the laser_assembler error.

I have read the solution from @berkaydeniz, but I don't understand exactly where to modify unit32_t

I change in line 138:

uint32_t result = RUN_ALL_TESTS();
But still having the same problem.

Can someone guide me with this error?

Thank you, Jorge

@berkaydeniz
Copy link

berkaydeniz commented Oct 19, 2018 via email

@grafoteka
Copy link

Thank you for your answer @berkaydeniz

I found the difference in the line 120.

I try removing only the ´f´and not the decimal part.

    cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000.0));

    cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000));

@grafoteka
Copy link

Hi again! Finally I could compile everything correctly.

Now I'm trying to compile my workspace. But now I have question, maybe a stupid question.

To install all the dependencies of the package, normally in ubuntu you installed through the binaries (sudo apt-get install ros-lunar-...)

In OS X, the unique option is to add all the dependencies in the ws/src?

Thank you!
Jorge

@berkaydeniz
Copy link

berkaydeniz commented Oct 19, 2018 via email

@grafoteka
Copy link

grafoteka commented Oct 19, 2018 via email

@connorsoohoo
Copy link

I'm getting an error building image_common. It is related to the yaml-cpp dependency not being the right version. But I have the latest version of yaml-cpp (0.6.2). I got this error immediately after applying the boost-python fix. Can anyone advise?

screen shot 2019-02-05 at 5 21 03 am

@connorsoohoo
Copy link

Fixed it. Need to explicitly specify C++11 standards in the respective CMakeLists.txt file.

# Set minimum C++ to 2011 standards
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

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