Skip to content

Instantly share code, notes, and snippets.

@bgromov
Last active August 31, 2019 20:56
Show Gist options
  • Save bgromov/23a74bbe846d965964b150080cb2d574 to your computer and use it in GitHub Desktop.
Save bgromov/23a74bbe846d965964b150080cb2d574 to your computer and use it in GitHub Desktop.

My attempt to install ROS Melodic on macOS Mojave (10.14) with https://github.com/mikepurvis/ros-install-osx

Dependencies

rosdeps.yaml

Use the file attached.

pycurl

Install it manually:

PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl

ROS packages

C++11 / C++14

Compile everything with:

catkin build -DCMAKE_CXX_STANDARD=14

## c++11 support for class_loader

Enable c++11 for the following packages:

  • pluginlib_tutorials
  • diagnostics_aggregator
  • nodelet
  • rosbag_storage

Add c++11 flag to CMakeLists.txt:

add_definitions(-std=c++11)

Boost Python

If you are using Boost 1.67, then the python component should be changed to python27, e.g.:

find_package(Boost REQUIRED COMPONENTS filesystem python27)

in the following packages:

  • cv_bridge
  • camera_calibration_parsers

rosbag_storage

OpenSSL

In the terminal:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"

Add the following to CMakeLists.txt:

find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)
pkg_check_modules(LibCrypto REQUIRED libcrypto)
find_package(Gpgmepp CONFIG REQUIRED)

# Add OpenSSL includes, modify the line
include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${OpenSSL_INCLUDE_DIRS})


link_directories(${LibCrypto_LIBRARY_DIRS})

Also change the line in if-block:

  set(AES_ENCRYPT_LIBRARIES "crypto" "gpgme")

to

  set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp")

rosbag and pcl_ros

OpenSSL

In the terminal:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"

In the CMakeLists.txt:

# Find OpenSSL
find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)

# Add it includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
  ${BZIP2_INCLUDE_DIR}
  ${OpenSSL_INCLUDE_DIRS}
)

diagnostics_aggregator

Replace local GTest copy with the system one.

In CMakeLists.txt:

find_package(GTest REQUIRED)
# Add corresponding includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS})

# Remove dependency to local gtest
add_executable(analyzer_loader test/analyzer_loader.cpp)

# Link libraries
target_link_libraries(analyzer_loader diagnostic_aggregator ${GTEST_BOTH_LIBRARIES})

actionlib and laser_assembler

No matching conversion from double to boost milliseconds

Happens with Boost 1.67, similar to ros/roscpp_core#79.

To fix, change the line in actionlib/src/connection_monitor.cpp:

boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));

to

boost::posix_time::milliseconds(int(time_left.toSec() * 1000.0f)));

Similarly for laser_assembler/test/test_assembler.cpp:

Change

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

to

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

image_view

Pango

In the CMakeLists.txt:

find_package(PkgConfig REQUIRED)
pkg_check_modules(Pango REQUIRED pango)

link_directories(${Pango_LIBRARY_DIRS})

#...

include_directories(
  #...
  ${Pango_INCLUDE_DIRS}
)

target_link_libraries(
  #...
  ${Pango_LIBRARIES}
)
#!/bin/bash
# Software License Agreement (BSD)
#
# Author Mike Purvis <mpurvis@clearpathrobotics.com>
# Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that
# the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this list of conditions and the
# following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
# following disclaimer in the documentation and/or other materials provided with the distribution.
# * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or
# promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
ROS_DISTRO=${ROS_DISTRO:-melodic}
ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full}
ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-}
ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}}
do_install()
{
set -e
# Homebrew
if ! hash brew 2>/dev/null; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
brew doctor
fi
brew update
# XQuartz
if ! hash xquartz 2>/dev/null; then
brew install caskroom/cask/brew-cask
brew cask install xquartz
echo "Log out and in to finalize XQuartz setup."
exit 0
fi
# Check for pip packages in the system Python directory.
if [ $(ls /Library/Python/2.7/site-packages/ | wc -l) -gt 1 ]; then
echo "These instructions are about to install Python from Homebrew. However, there are already"
echo "pip packages installed against the system python, in the following path:"
echo
echo " /Library/Python/2.7/site-packages/"
echo
echo "If you have problems, please uninstall these packages:"
echo
echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done"
echo
echo "Then delete the build directory and start over again from scratch."
fi
# Check for root-owned stuff in /usr/local
if [ $(find /usr/local/* -maxdepth 3 -type d -user root | wc -l) -gt 1 ]; then
echo "Looks like you have some stuff owned by the root user in /usr/local. The installation can"
echo "continue, but if there are pip packages which were installed using sudo, this will be a"
echo "problem if rosdep tries to update them. If you have issues installing dependencies, consider"
echo "nuking your Homebrew installation and starting from scratch:"
echo
echo " https://gist.github.com/mxcl/1173223"
echo
echo "Alternatively, you could try chowning the contents of /usr/local to yourself:"
echo
echo " sudo chown -R $USER:admin /usr/local/*"
fi
# Brewed Python
if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then
brew install python
mkdir -p ~/Library/Python/2.7/lib/python/site-packages
echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth
fi
# Gives us console_bridge, urdfdom, and gtest.
brew tap ros/deps
# This tap gives us formulae for Gazebo and its dependencies, including SDF.
brew tap osrf/simulation
# ROS infrastructure tools
brew install libyaml || true
pip2 install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl
# Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula,
# so add its location to the prefix path in order for workspace packages to be able to find it.
brew install qt5 pyqt5 sip
export CMAKE_PREFIX_PATH=$(brew --prefix qt5)
# This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466
pushd /usr/local/share/sip
if [ ! -e PyQt5 ]; then
ln -s Qt5 PyQt5
fi
popd
# Get homebrew's opencv3 from a bottle so that we don't have to build it.
brew install opencv3
# Mock out python and pip so that we get the brewed versions when rosdep and other programs call them.
# Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation.
export PATH=$(pwd)/shim:$PATH
# Initialize and update rosdep
if [ ! -d /etc/ros/rosdep/ ]; then
echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)."
sudo rosdep init
fi
if [ ! -f /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list ]; then
echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list"
sudo sh -c "echo 'yaml file://$(pwd)/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list"
fi
rosdep update
# Remove previous workspace if present, create and enter new one.
WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws
if [ -d "$WS" ]; then
rm -rf "$WS"
fi
mkdir $WS
cd $WS
# Standard source install
rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall
wstool init src
pushd src
# Avoid downloading opencv3; we already installed it from homebrew.
wstool merge file://$(pwd)/../${WS}.rosinstall
#wstool remove opencv3
wstool update -j8
# See: https://github.com/ros/catkin/pull/784
if [ -d catkin ]; then
curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in
fi
# Pending release: https://github.com/ros-visualization/rviz/pull/1165
if [ -d rviz ]; then
curl https://raw.githubusercontent.com/mikepurvis/rviz/21eac2bcc061bb623fd17aa449f6215c493b27f2/CMakeLists.txt > rviz/CMakeLists.txt
fi
if [ -d image_pipeline ]; then
# Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/303
curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/image_proc/CMakeLists.txt > image_pipeline/image_proc/CMakeLists.txt
curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/stereo_image_proc/CMakeLists.txt > image_pipeline/stereo_image_proc/CMakeLists.txt
# Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304
curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt
fi
# Package dependencies.
rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no
popd
# Clean out or create the install directory.
if [ -d ${ROS_INSTALL_DIR} ]; then
rm -rf ${ROS_INSTALL_DIR}/*
else
echo "This sudo prompt is to create and chown ${ROS_INSTALL_DIR}."
sudo mkdir -p ${ROS_INSTALL_DIR}
sudo chown $USER ${ROS_INSTALL_DIR}
fi
# OpenSSL
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
# Parallel build.
catkin config --install \
--install-space ${ROS_INSTALL_DIR} \
--cmake-args \
-DCATKIN_ENABLE_TESTING=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DPYTHON_EXECUTABLE=$(which python2) \
-DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \
-DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 \
-DCMAKE_CXX_STANDARD=14
catkin build --limit-status-rate 1
echo "Installation successful, please source the ROS workspace:"
echo
echo " source ${ROS_INSTALL_DIR}/setup.bash"
echo
# Check for SIP if on OSX/macOS 10.11 (El Capitan) or later
if [[ `sw_vers -productVersion` > "10.10" ]]
then
if `csrutil status | grep -q enabled`
then
echo "You have System Integrity Protection enabled."
echo
echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells"
echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib"
echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue."
fi
fi
}
do_install
# Override the default key to get us Ogre 1.9 instead of 1.7.
libogre-dev:
osx:
homebrew:
packages: [ogre1.9]
# Use Gazebo 9
gazebo9:
osx:
homebrew:
packages: [gazebo9]
libgazebo9-dev:
osx:
homebrew:
packages: [gazebo9]
#
# Don't try to install opencv3
opencv3:
osx:
homebrew:
packages: []
# Installing all this Python stuff from homebrew instead of pip
# means we get pre-built bottles and don't have to build it all
# each time.
python:
osx:
homebrew:
packages: [python]
pip:
packages: [pip, setuptools, nose]
python-matplotlib:
osx:
pip:
packages: [matplotlib]
python-numpy:
osx:
homebrew:
packages: [numpy]
python-scipy:
osx:
homebrew:
packages: [scipy]
python-wxtools:
osx:
homebrew:
packages: [wxmac]
# Zero out all the QT5 keys. We'll install it ourselves upfront.
libqt5-opengl-dev:
osx:
homebrew:
packages: []
libqt5-opengl:
osx:
homebrew:
packages: []
libqt5-core:
osx:
homebrew:
packages: []
python-qt5-bindings-gl:
osx:
homebrew:
packages: []
python-qt5-bindings-webkit:
osx:
homebrew:
packages: []
libqt5-gui:
osx:
homebrew:
packages: []
libqt5-widgets:
osx:
homebrew:
packages: []
qtbase5-dev:
osx:
homebrew:
packages: []
qt5-qmake:
osx:
homebrew:
packages: []
python-qt5-bindings:
osx:
homebrew:
packages: []
python-gnupg:
osx:
pip:
packages: [gpg]
libgpgme-dev:
osx:
homebrew:
packages: [gpgme]
google-mock:
osx:
homebrew:
packages: [gtest]
@csobrinho
Copy link

Lifesafer!! Thanks!

@csvance
Copy link

csvance commented Dec 2, 2018

I had to edit three of the headers in actionlib in addition edits you made:

/opt/ros/melodic/include/actionlib/destruction_guard.h:62:41: error: no matching conversion for functional-style cast from 'float' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
      count_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
/opt/ros/melodic/include/actionlib/client/simple_action_client.h:604:38: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
    done_condition_.timed_wait(lock, boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));
/opt/ros/melodic/include/actionlib/server/simple_action_server_imp.h:397:9: error: no matching conversion for functional-style cast from 'double' to 'boost::posix_time::milliseconds' (aka 'subsecond_duration<boost::posix_time::time_duration, 1000>')
        boost::posix_time::milliseconds(loop_duration.toSec() * 1000.0f));

I casted both to integers in order to get it to compile.

@csvance
Copy link

csvance commented Dec 5, 2018

Question, where you actually able to get pcl_ros to compile?

Heres what I get (tons of these same type of errors):

Errors     << pcl_ros:make /Users/carroll/Git/ros-install-osx/melodic_ws/logs/pcl_ros/build.make.000.log                                                                      
In file included from /Users/carroll/Git/ros-install-osx/melodic_ws/src/perception_pcl/pcl_ros/tools/pointcloud_to_pcd.cpp:39:
In file included from /opt/ros/melodic/include/ros/ros.h:38:
In file included from /opt/ros/melodic/include/ros/time.h:55:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;

Heres my workspace configuration:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /usr/local/opt/qt
Workspace:                   /Users/carroll/Git/ros-install-osx/melodic_ws
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Source Space:       [exists] /Users/carroll/Git/ros-install-osx/melodic_ws/src
Log Space:         [missing] /Users/carroll/Git/ros-install-osx/melodic_ws/logs
Build Space:       [missing] /Users/carroll/Git/ros-install-osx/melodic_ws/build
Devel Space:       [missing] /Users/carroll/Git/ros-install-osx/melodic_ws/devel
Install Space:      [exists] /opt/ros/melodic
DESTDIR:            [unused] None
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        merged
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Additional CMake Args:       -DCATKIN_ENABLE_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DPYTHON_EXECUTABLE=/usr/local/bin/python2 -DPYTHON_LIBRARY=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DCMAKE_CXX_STANDARD=14
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@csvance
Copy link

csvance commented Dec 5, 2018

I was able to resolve the issue by adding this to the top of pcl_ros CMakeLists.txt before the project line at the top:

# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
  cmake_policy(SET CMP0025 NEW)
endif ()

See here for more details: https://stackoverflow.com/questions/10851247/how-to-activate-c-11-in-cmake

Then I had a linking issue with libflann, which I solved by export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib before running catkin build.

I now have melodic desktop_full completely installed on Mojave :)

@bgromov
Copy link
Author

bgromov commented Dec 5, 2018

@csvance Thanks for the tip with pcl_ros. I had no issues with it all—surprisingly, given all the headache it was giving in previous releases. What version of CMake do you have? Mine is 3.13.1 and pcl_ros is 1.6.2.

P.S. Sorry, saw your questions just now, apparently Gist does not notify on comments by default, so I guess you need to mention people explicitly.

@csvance
Copy link

csvance commented Dec 6, 2018

@bgromov I have the same versions as you, maybe its the fact I literally just did a fresh Xcode / Mojave reinstall? Regardless, I am a happy camper not having to deal with dual booting on my dev laptop anymore!

@kabbi
Copy link

kabbi commented Dec 8, 2018

Worked great for me on High Sierra with melodic. Several hiccups:

  • I've built catkin from source, to get catkin executable
  • there was several more files to fix for boost::posix_time::milliseconds
  • had to comment out wstool remove opencv3 in install.sh script, as there was no opencv3 anywhere and wstool was freaking out
  • had to remove qt@4 that was installed with brew some time ago, as it was messing up the headers somehow

@bgromov, thank you! You literally saved tons of my time.

@Tutorgaming
Copy link

Tutorgaming commented Dec 11, 2018

With the instruction in this gist + @csvance and @kabbi

i've made it run on mojave successfully :)

but the gazebo9 still have bugs on 3d view (after fixing the scaled UI in Qt 5.11-> 5.12)

Thanks for all your guys so much to making this workaround. esp @bgromov

@bgromov
Copy link
Author

bgromov commented Dec 11, 2018

@csvance Could be, I migrated the system from an old MacBook, though I had to reinstall all the brewed packages.

@kabbi You are right, thanks! I should have added my version of the install script. Here it is: install

@Tutorgaming Does Gazebo 9 work for you somehow? After upgrading to Qt 5.12 mine just freezes on the startup, though I didn't try the bottled Qt 5.12 yet, so maybe I missed some brew patches and/or compilation flags when I was building it from HEAD.

P.S. Apparently there are no notifications on Gist at all (there is a feature request that GitHub ignoring for 5.5 years already), so mentions don't do anything

@raskolnikov-reborn
Copy link

@csvance I got stuck with the signbit errors
/Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace using ::signbit; ~~^ /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace using ::fpclassify; ~~^ /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'? using ::isfinite; ~~^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/math.h:749:12: note: 'finite' declared here extern int finite(double)

I modified the pcl_ros/CMakeLists.txt but that didn't change anything. If you could help troubleshoot, it would be a big help. I think its trying to find Commandlinetools functions instead of the boost ones. Am I in the ballpark or completely off base?

@csvance
Copy link

csvance commented Dec 22, 2018

@raskolnikov-reborn

My catkin configuration:

blacklist: []
build_space: build
catkin_make_args: []
cmake_args:
- -DCATKIN_ENABLE_TESTING=1
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_FIND_FRAMEWORK=LAST
- -DPYTHON_EXECUTABLE=/usr/local/bin/python2
- -DPYTHON_LIBRARY=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
- -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/include/python2.7
- -DCMAKE_CXX_STANDARD=14
devel_layout: linked
devel_space: devel
extend_path: null
install: true
install_space: /opt/ros/melodic
isolate_install: false
jobs_args: []
log_space: logs
make_args: []
source_space: src
use_env_cache: false
use_internal_make_jobserver: true
whitelist: []

Heres my CMakeLists.txt file for pcl_ros:
https://gist.github.com/csvance/391d04a8ecb75a3145fe6d2cdb800af7

I also run set these environment variables before building:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib

@raskolnikov-reborn
Copy link

@csvance I tried using your CMakeLists.txt. Our build configuration seems to be identical. Still no luck. I even tried extracting perception_pcl into a separate space and building. Also I don't really know which lines in the CMakeLists.txt are adding the /Library/Developer/....cmath file. Lemme know if something else strikes you.

Thanks

@raskolnikov-reborn
Copy link

Ok Some progress. I blacklisted pcl_ros and built the rest of the workspace. Then changed the line
find_package(PCL REQUIRED COMPONENTS core features filters io segmentation surface)
to
find_package(PCL REQUIRED COMPONENTS common filters surface ) set(PCL_CUSTOM_LIBS pcl_io pcl_segmentation pcl_features)

This got rid of the include space errors... and got me to the linking stage

I added the variable ${PCL_CUSTOM_LIBS} to all target executables and libraries and viola the package was built. Seems to have been built fine. Now I need to figure out why the original line was messing up my include paths and inserting the /Library/Developer/,,,,cmath file earlier than it should have been.

Lemme know if you guys think of something.

@Tutorgaming
Copy link

@csvance Could be, I migrated the system from an old MacBook, though I had to reinstall all the brewed packages.

@kabbi You are right, thanks! I should have added my version of the install script. Here it is: install

@Tutorgaming Does Gazebo 9 work for you somehow? After upgrading to Qt 5.12 mine just freezes on the startup, though I didn't try the bottled Qt 5.12 yet, so maybe I missed some brew patches and/or compilation flags when I was building it from HEAD.

P.S. Apparently there are no notifications on Gist at all (there is a feature request that GitHub ignoring for 5.5 years already), so mentions don't do anything

I use Qt 5.12 from the Qt website (not the bottled one in brew), Everything is working fine out of the box since i installed the Qt 5.12
but it is not working propery , the Big scaled GUI is fixed but the 3d view in gazebo is black unusable and not display anything.

@OxMarco
Copy link

OxMarco commented Jan 13, 2019

Hi, I tried to run your code yet it fails with:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-8cxcbpab/pycurl/

@kshitijgoel007
Copy link

brew tap ros/deps is not working due to deprecation of the directive MacOS.prefer_64_bit?. So this install script won't work.

@tanzby
Copy link

tanzby commented Feb 11, 2019

Ok Some progress. I blacklisted pcl_ros and built the rest of the workspace. Then changed the line
find_package(PCL REQUIRED COMPONENTS core features filters io segmentation surface)
to
find_package(PCL REQUIRED COMPONENTS common filters surface ) set(PCL_CUSTOM_LIBS pcl_io pcl_segmentation pcl_features)

This got rid of the include space errors... and got me to the linking stage

I added the variable ${PCL_CUSTOM_LIBS} to all target executables and libraries and viola the package was built. Seems to have been built fine. Now I need to figure out why the original line was messing up my include paths and inserting the /Library/Developer/,,,,cmath file earlier than it should have been.

Lemme know if you guys think of something.

I re-installed Mojave and installed pcl1.9 with brew at the very beginning after setup the system, then got rid of "no member named 'signbit'" error... it seems wired.

@kamiradi
Copy link

kamiradi commented Jun 10, 2019

Hey, Im trying to install ROS on my Mac OS Mojave. I have run into a small hiccup. After running the install.sh script, it looks as if my pip2 installs rosdep and all the other packages on line 94, in my site-packages. But when the script hits line 118, it throws the following error:

./install: line 124: rosdep: command not found

I gather that I have not added a certain path (where all the corresponding binaries have been installed) to my $PATH. But i dont seem to find the path where the rosdep binaries have been installed by my pip2.
Any ideas as to what i can do?

@jp-pino
Copy link

jp-pino commented Aug 16, 2019

Hey, I'm trying to install this on Mojave too. I'm running into problems when building image_view, specifically on this line you added to the CMakeLists.txt file: pkg_check_modules(Pango REQUIRED pango)

This is the error I'm getting.

Errors     << image_view:check /Users/jp.pinob/ros-install-osx/melodic_desktop_full_ws/logs/image_view/build.check.006.log
CMake Error at /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPkgConfig.cmake:458 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPkgConfig.cmake:637 (_pkg_check_modules_internal)
  CMakeLists.txt:11 (pkg_check_modules)


make: *** [cmake_check_build_system] Error 1
cd /Users/jp.pinob/ros-install-osx/melodic_desktop_full_ws/build/image_view; catkin build --get-env image_view | catkin env -si  /usr/bin/make cmake_check_build_system; cd -

If anyone could help I'd reaaaally appreciate it.

@bgromov
Copy link
Author

bgromov commented Aug 16, 2019

@jp-pino The error tells you that the Pango library is missing in your system. Just install it manually with brew install pango. Though, it is possible you will hit similar issues later because normally Pango is installed as a dependency of Cairo, which I think some ROS packages need.

@jp-pino
Copy link

jp-pino commented Aug 16, 2019

@bgromov That's what I thought, but when I brew install pango this is what I get:

Warning: pango 1.44.5 is already installed and up-to-date
To reinstall 1.44.5, run `brew reinstall pango`

I don't know what I'm doing wrong. Also, thank you for your help :)

@bgromov
Copy link
Author

bgromov commented Aug 16, 2019

@jp-pino For some reason the pkg-config is not able to find the pango.pc config file on your system. For example, I have it linked here by the Homebrew: /usr/local/lib/pkgconfig/pango.pc, the actual file is somewhere in the Homebrew cellar, i.e. inside /usr/local/Cellar. What you can try:

  • Re-link the library with brew unlink pango && brew link pango (may require --force option, but be careful with that).
  • If that doesn't help, try to find the pango.pc file and make a link to it manually. E.g. find /usr/local/Cellar -name pango.pc and cd /usr/local/lib/pkgconfig/ && ln -s /usr/local/Cellar/pango/1_44_5/lib/pkgconfig/pango.pc pango.pc
  • It is also possible that the pkg-config is looking in a wrong directory, so try to reinstall it with brew. Check that the environment variable PKG_CONFIG_PATH. I am not entirely sure whether it overrides defaults paths or provides additional locations to look at. You can try to set it to something like export PKG_CONFIG_PATH=/usr/local/Cellar/pango/1_44_5/lib/pkgconfig/, though this is quite an ugly workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment