ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros2 source install macos 10.15.1: qt_gui_cpp fails

asked 2019-11-28 19:51:21 -0600

plusk01 gravatar image

I am building ROS2 from source on macOS 10.15.1 Catalina. I've followed the instructions here about dependencies, disabled SIP, ignored the ROS1<->2 bridge, and ignoring additional DDS vendors.

I run the following:

mkdir -p ~/ros2_foxy/src
cd ~/ros2_foxy
wget https://raw.githubusercontent.com/ros2/ros2/531a84a621771a6f4b947d1acad65eb9132f38de/ros2.repos
vcs import src < ros2.repos

and then colcon build --symlink-install. The package qt_gui_cpp fails (see log below).

I am confused by the introduced in macOS 10.15 error, which led me to update from 10.14 Mojave to 10.15 Catalina in the first place. It seems like it may have something to do with how xcodebuild is handling deps?

$ xcodebuild -version
Xcode 11.2.1
Build version 11B500
$ colcon build --symlink-install --packages-select qt_gui_cpp
Starting >>> qt_gui_cpp
--- stderr: qt_gui_cpp                             
In file included from ros_pluginlib_plugin_provider_for_plugin_providers.sip:9:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider_for_plugin_providers.h:37:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader.hpp:370:
/Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader_imp.hpp:545:30: error: 'exists' is unavailable: introduced in macOS 10.15
    if (pluginlib::impl::fs::exists(*it)) {
                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1617:39: note: 'exists' has been explicitly marked unavailable here
inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p) {
                                      ^
In file included from ros_pluginlib_plugin_provider_for_plugin_providers.sip:9:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider_for_plugin_providers.h:37:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader.hpp:370:
/Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader_imp.hpp:545:37: error: 'path' is unavailable: introduced in macOS 10.15
    if (pluginlib::impl::fs::exists(*it)) {
                                    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path' has been explicitly marked unavailable here
  path(const _Source& __src, format = format::auto_format) {
  ^

/////// more of the same //////

In file included from recursive_plugin_provider.sip:8:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/recursive_plugin_provider.h:37:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider_for_plugin_providers.h:37:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp_sip/../../include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:
In file included from /Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader.hpp:370:
/Users/candice/Documents/parkerdev/ros2_ws/install/pluginlib/include/pluginlib/./class_loader_imp.hpp:628:49: error: 'path<char [12],="" void="">' is unavailable: introduced in macOS 10.15
      std::string package_file_path = (parent / "package.xml").string();
                                                ^
/Applications/Xcode.app/Contents/Developer ...
(more)
edit retag flag offensive close merge delete

Comments

I have a similar problem when I was building ros2 from the source. It's a different package called "pluginlib". Did you happen to solve the issue?

KKKKKyle gravatar image KKKKKyle  ( 2020-01-07 22:03:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-01-27 23:10:49 -0600

updated 2020-01-28 00:03:25 -0600

Hey, I think I may have figured it out. The issue seems to be that XCode has turned on the C++17 features but not the C++17 standard library in versions less than macOS 10.15. Therefore to be able to compile in Mojave and older, you will need to add the -mmacosx-version-min=10.15 flag in your CMakeLists.txt file as such:

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic -mmacosx-version-min=10.15)
endif()

EDIT:

I do have to say that the issue with this method is that you are now targeting 10.15 instead of the version of macOS you are using. What that means is that anything you compile with this method can only be run on macOS 10.15.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-11-28 19:51:21 -0600

Seen: 701 times

Last updated: Jan 28 '20