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

ROS melodic updates #126

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

berkaydeniz
Copy link

This current version requires intervention for force linking pyyaml. No intervention needed on catkin build.

this modified version requires intervention for force linking pyYaml.
I introduced -p flag during some tests under some other context, it's truly redundant.
@mikepurvis
Copy link
Owner

Looks fantastic, thank you very much for getting this all into one place!

install Outdated
@@ -137,26 +142,32 @@ do_install()
pushd src
# Avoid downloading opencv3; we already installed it from homebrew.
wstool merge file://$(pwd)/../${WS}.rosinstall
wstool remove opencv3
#wstool remove opencv3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this stuff altogether vs just commenting it out— as of Melodic, opencv is back to using the system-packaged version with not entry in the rosdistro.

install Outdated
if [ -d catkin ]; then
curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in
if [ -d bond_core ]; then
curl curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This double curl doesn't look quite right. Please fix that and put in a comment indicating what we're waiting on for the patch to go away (in this case, bond_core 1.8.3 to be released, since ros/bond_core#37 is already merged).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird it works like that. Will fix it and add comments indicating the releases.

install Outdated
# https://github.com/ros-perception/image_common/pull/82
if [ -d image_common ]; then
curl https://raw.githubusercontent.com/meyerj/image_common/51be08ba5dc352597a2ad5baabb7e92c6baa2634/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt
fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks super-gross. Basically any ROS package which wants to link to Python is going to have to do this dance on macOS. I'm fine to go this route for now just to get things moving along, but I wonder if perhaps a more transparent way might be to prepend CMAKE_PREFIX_PATH within ros-install-osx and have a small suite of wrapper CMake modules that provide the necessary indirection.

Thoughts?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that my pull request links are wrong. @meyerj has a better idea on how to address this, which is independent of the OS.

* removed opencv3 removal
* introduced comments on all the manual changes pending merge and/or release
* eliminated the double curl
the pull request references for the updates addressing Boost Python library corrected.
@asimonov
Copy link

asimonov commented Aug 8, 2018

works for me, but I have deleted line

echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

because it would completely disable my handcrafted .profile.

also my version has two extra options at the end of this line:

rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no --skip-keys google-mock --skip-keys gtest

@berkaydeniz
Copy link
Author

berkaydeniz commented Aug 8, 2018 via email

@berkaydeniz
Copy link
Author

also, I would recommend moving your personal changes on .profile back into .bash_profile

@berkaydeniz
Copy link
Author

berkaydeniz commented Aug 9, 2018

DRAFT WALKTHROUGH:

  • Start with uninstalling your homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
  • Remove everything inside /usr/local with sudo privileges:
sudo rm -rf /usr/local/*
  • Remove the following lines from your ~/.bash_profile
export PATH=/usr/local/bin:$PATH
source /opt/ros/melodic/setup.bash # or any previous distribution
  • close the terminal and open a new one
  • go to the repository and run ./install
  • during rosdep installations yaml-cpp fails to link. Run:
brew link --overwrite yaml-cpp

and then run ./install again

@berkaydeniz
Copy link
Author

berkaydeniz commented Aug 9, 2018

Unfortunately there is a quite recently emerged problem: ros-infrastructure/catkin_pkg#234
I will have a commit with a temporary fix while this issue is resolved.

Copy link

@NikolausDemmel NikolausDemmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks. I added a few comments from my experience with just installing melodic on sierra.

curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in
# Pending release https://github.com/ros/bond_core/pull/37
if [ -d bond_core ]; then
curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note: Maybe applying the patch instead of taking the files as is would be slightly more future proof, in case of a new release with other unrelated changes but this PR not merged. It also means just one line per PR and you get the latest version when the PR is updated.

curl https://patch-diff.githubusercontent.com/raw/ros/bond_core/pull/37.patch | patch -p1 --dir bond_core

Same for the other fixes from PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: overall I needed the following changes (from PRs) on Sierra for melodic:

    # See: https://github.com/ros/catkin/pull/784
    if [ -d catkin ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros/catkin/pull/784.patch | patch -p1 --dir catkin
    fi

    # See: https://github.com/ros/bond_core/pull/37
    if [ -d bond_core ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros/bond_core/pull/37.patch | patch -p1 --dir bond_core
    fi

    # See: https://github.com/ros-perception/image_common/pull/85
    if [ -d image_common ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros-perception/image_common/pull/85.patch | patch -p1 --dir image_common
    fi

    # See: https://github.com/ros-perception/vision_opencv/pull/239
    if [ -d vision_opencv ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros-perception/vision_opencv/pull/239.patch | patch -p1 --dir vision_opencv
    fi

    # See: https://github.com/ros/actionlib/pull/111
    # See: https://github.com/ros/actionlib/pull/105
    if [ -d actionlib ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros/actionlib/pull/111.patch | patch -p1 --dir actionlib
        curl https://patch-diff.githubusercontent.com/raw/ros/actionlib/pull/105.patch | patch -p1 --dir actionlib
    fi

    # See: https://github.com/ros-perception/laser_assembler/pull/16
    if [ -d laser_assembler ]; then
        curl https://patch-diff.githubusercontent.com/raw/ros-perception/laser_assembler/pull/16.patch | patch -p1 --dir laser_assembler
    fi

# based on https://stackoverflow.com/questions/45693149/openssl-aes-h-file-not-found-on-mac
cd /usr/local/include
ln -fs ../opt/openssl/include/openssl .
cd -

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had fixed this with adding some find_package(OpenSSL) in the cmake lists. But it is not clean yet (doesn't propagate to depending packages), so I'm not sure if it is worth the effort if this also works just as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: I noticed another issue with this. Since you only set the include path, the linker still links to the system ssl and crypto libraries. I guess that might lead to wired issues...

$ otool -L /opt/ros/melodic/lib/librosbag_storage.dylib | grep /usr/lib
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
	/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
	/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got around that by passing -DCMAKE_CXX_FLAGS="-I/usr/local/opt/openssl/include" to it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Karsten1987, you mean as an alternative to ln -fs ... or adding find_package ...? I guess it doesn't address the linker issue still?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative to the ln -fs. For finding the library in the first place, I added the openssl to my DYLD_LIBRARY_PATH:

export DYLD_LIBRARY_PATH=`brew --prefix openssl`/lib:$DYLD_LIBRARY_PATH

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes that would fix it also for dynamic linking. Thanks! 👍


# temporary fix for catkin_pkg issue with unicode characters reported in https://github.com/ros-infrastructure/catkin_pkg/issues/234
if [ -d roslisp ]; then
curl https://raw.githubusercontent.com/berkaydeniz/roslisp/03826c6dd92fd348ffd7a74de1f361c13a92346c/manifest.xml > roslisp/manifest.xml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this has been fixed.

@grafoteka
Copy link

Hi @berkaydeniz,
I'm trying to use your script on a fresh installation of OS X High Sierra.

First I had this error: Collecting pycurl

Which I solved from:

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

Then I run again your script but I have the next error:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rosbag: No definition of [python-gnupg] for OS [osx]
gazebo_dev: No definition of [libgazebo9-dev] for OS [osx]
rosbag_storage: No definition of [libgpgme-dev] for OS [osx]

But I don't know how to solve it.

Thank you,
Jorge

@kdorsel
Copy link

kdorsel commented Oct 8, 2018

I ran through this this weekend and a few comments which might help someone:
Before installing pycurl I did this:

brew install openssl
export PYCURL_SSL_LIBRARY=openssl

I also had to manually link the openssl headers for cmake to find them during the build.

$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl .

I had an issue with yaml-cpp and gtest conflicts. yaml-cpp tried installing its own version of gtest.

I had to modify the yaml-cpp homebrew formula:

option "without-tests", "Do not include gtest"
...
if build.without? "tests"
      args << "-DYAML_CPP_BUILD_TESTS=OFF"
end

and build from source:

brew install --build-from-source yaml-cpp --without-tests

@grafoteka
Copy link

grafoteka commented Oct 8, 2018

Hi @kdorsel,
didn't you have any problem with:

rosbag: No definition of [python-gnupg] for OS [osx]
gazebo_dev: No definition of [libgazebo9-dev] for OS [osx]
rosbag_storage: No definition of [libgpgme-dev] for OS [osx]

I try to install again today, and still getting stuck here.

Also, if I try to install manually python-gnupg, it says that I have it already install it.

Jorges-MacBook-Pro:ros-install-osx jorge$ pip install python-gnupg
Requirement already satisfied: python-gnupg in /usr/local/lib/python2.7/site-packages (0.4.3)

Finally, I tried to install python-gnupg, but still having the same error.

https://github.com/vsajip/python-gnupg

@kdorsel
Copy link

kdorsel commented Oct 9, 2018

@grafoteka No, I did not have any of those issues. I had other smaller errors of brew/pip conflicting and not linking, but that's a quick fix.

Do you have the following packages installed in brew? gnupg, gazebo9, gpgme

@grafoteka
Copy link

@grafoteka No, I did not have any of those issues. I had other smaller errors of brew/pip conflicting and not linking, but that's a quick fix.

Do you have the following packages installed in brew? gnupg, gazebo9, gpgme

@kdorsel, yes I have installed those packages

packages installed

I don't know where is the problem...

@kdorsel
Copy link

kdorsel commented Oct 9, 2018

Can you maybe make a gist of the all the terminal output when running this scrript?

@grafoteka
Copy link

@kdorsel, here is the terminal output

Also, I don't know if I should have a problem with CMake, I have this warnings when installing Gazebo and gnupg:

==> Caveats
==> gettext
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> Pouring hdf5-1.10.3.high_sierra.bottle.tar.gz
Warning: hdf5 dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
🍺  /usr/local/Cellar/hdf5/1.10.3: 262 files, 15MB

==> Pouring flann-1.9.1_5.high_sierra.bottle.tar.gz
Warning: flann dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
🍺  /usr/local/Cellar/flann/1.9.1_5: 64 files, 11.5MB

==> Pouring icu4c-62.1.high_sierra.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

For pkg-config to find icu4c you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

==> Pouring dartsim-6.6.1_2.high_sierra.bottle.tar.gz
Warning: dartsim dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
🍺  /usr/local/Cellar/dartsim/6.6.1_2: 1,368 files, 46.1MB

==> Pouring gazebo9-9.4.1.high_sierra.bottle.tar.gz
Warning: osrf/simulation/gazebo9 dependency gcc was built with a different C++ standard
library (libstdc++ from clang). This may cause problems at runtime.
🍺  /usr/local/Cellar/gazebo9/9.4.1: 1,238 files, 125.8MB

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

Successfully merging this pull request may close these issues.

7 participants