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

Update to build Lunar + QT5 + Ogre 1.9 + Gazebo 8 #84

Merged
merged 13 commits into from
Oct 20, 2017
Merged

Conversation

mikepurvis
Copy link
Owner

@mikepurvis mikepurvis commented Oct 20, 2017

A bunch of issues have accumulated here around how to build ROS with Homebrew now that they've made the following changes:

  • QT4 is no longer a thing.
  • QT5 is a "keg only" formula.
  • The brewed python formula now supplies bin/python2 but not bin/python (and likewise with pip2/pip).

I'm putting up the PR as a work in progress for interested parties to hack on. The current state of affairs is that the build dies at qt_qui_cpp due to sip/shiboken shenanigans, and it dies at opencv3 if and only if QT5 is force-linked (should we just install the homebrew opencv3 bottle?), and if you make it past all that, nodelet_tutorial_math has C++11 ABI issues:

Errors     << nodelet_tutorial_math:make /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/logs/nodelet_tutorial_math/build.make.000.log
In file included from /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/src/common_tutorials/nodelet_tutorial_math/src/plus.cpp:30:
In file included from /opt/ros/lunar/include/pluginlib/class_list_macros.h:40:
In file included from /opt/ros/lunar/include/class_loader/class_loader.h:33:
In file included from /usr/local/include/boost/shared_ptr.hpp:17:
In file included from /usr/local/include/boost/smart_ptr/shared_ptr.hpp:23:
In file included from /usr/local/include/boost/config/no_tr1/memory.hpp:21:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:610:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/cstring:79:9: error: no member named 'strcoll' in the global namespace
using ::strcoll;
      ~~^

This failure looks like it has a solution via the discussion in #73.

@mikepurvis
Copy link
Owner Author

Current issue has to do with QT5's cmake find module:

Errors     << turtlesim:cmake /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/logs/turtlesim/build.cmake.000.log                
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
  The imported target "Qt5::Core" references the file

     "/usr/local/.//mkspecs/macx-clang"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:167 (include)
  /usr/local/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:83 (find_package)
  /usr/local/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:83 (find_package)
  CMakeLists.txt:6 (find_package)

@mikepurvis
Copy link
Owner Author

Issue there was with doing brew link on QT5, since it expects to find those mkspecs files in a path relative to its cmake scripts. Setting CMAKE_PREFIX_PATH to point to the cellar location instead resolves it. Unfortunately, jumping back to qt_gui_cpp, there's still a sip error:

Errors     << qt_gui_cpp:make /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/logs/qt_gui_cpp/build.make.000.log                                                                   
dyld: warning, LC_RPATH @executable_path/Frameworks in /usr/local/lib/python2.7/site-packages/PyQt5/QtCore.so being ignored in restricted program because of @executable_path
dyld: warning, LC_RPATH @executable_path/Frameworks in /usr/local/opt/qt/lib/QtCore.framework/Versions/5/QtCore being ignored in restricted program because of @executable_path
sip: Deprecation warning: qt_gui_cpp.sip:1: %Module version number should be specified using the 'version' argument
sip: Unable to find file "QtCore/QtCoremod.sip"
Traceback (most recent call last):
  File "/opt/ros/lunar/share/python_qt_binding/cmake/sip_configure.py", line 78, in <module>
    subprocess.check_call(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/Cellar/sip/4.19.3_4/bin/sip', '-c', '/Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/build/qt_gui_cpp/sip/qt_gui_cpp_sip', '-b', '/Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/build/qt_gui_cpp/sip/qt_gui_cpp_sip/pyqtscripting.sbf', '-I', '/usr/local/share/sip/PyQt5', '-w', '-x', 'VendorID', '-t', 'WS_MACX', '-t', 'Qt_5_9_1', '-x', 'Py_v3', 'qt_gui_cpp.sip']' returned non-zero exit status 1
make[2]: *** [sip/qt_gui_cpp_sip/Makefile] Error 1
make[1]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [all] Error 2

At least on my system, the file it's looking for is in /usr/local/opt/pyqt/share/sip/Qt5. When I make this change:

mkdir -p /usr/local/share/sip
ln -s /usr/local/opt/pyqt/share/sip/Qt5 /usr/local/share/sip/PyQt5

Then qt_gui_cpp is able to build, but obviously I'd like to figure out how to solve this not by creating random symlinks.

@mikepurvis
Copy link
Owner Author

Okay, everything up to rviz is building now. It's having this issue:

In file included from /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/src/rviz/src/image_view/main.cpp:42:
In file included from /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/src/rviz/src/image_view/image_view.h:33:
In file included from /Users/mikepurvis/ros-install-osx/lunar_desktop_full_ws/src/rviz/src/rviz/image/ros_image_texture.h:35:
In file included from /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_4/include/OGRE/OgreTexture.h:33:
In file included from /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_4/include/OGRE/OgreResource.h:34:
In file included from /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_4/include/OGRE/OgreStringInterface.h:35:
In file included from /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_4/include/OGRE/Threading/OgreThreadHeaders.h:34:
In file included from /usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_4/include/OGRE/Threading/OgreThreadHeadersBoost.h:48:
In file included from /usr/local/include/boost/thread/recursive_mutex.hpp:16:
In file included from /usr/local/include/boost/thread/pthread/recursive_mutex.hpp:23:
/usr/local/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp:33:26: error: expected member name or ';' after declaration specifiers
            void check() BOOST_NOEXCEPT
            ~~~~         ^
/usr/local/include/boost/config/detail/suffix.hpp:959:26: note: expanded from macro 'BOOST_NOEXCEPT'
#  define BOOST_NOEXCEPT noexcept
                         ^

Looks to be specific to the check function name: https://stackoverflow.com/questions/31665095/xcode-error-compiling-c-expected-member-name-or-after-declaration-specifie

rosdeps.yaml Outdated
libwebp-dev:
osx:
homebrew:
packages: [webp]
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'll push these changes upstream into rosdistro's rosdep.

Copy link
Owner Author

Choose a reason for hiding this comment

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

rosdeps.yaml Outdated
homebrew:
packages: [homebrew/python/pillow]
pip:
packages: [pillow]
Copy link
Owner Author

Choose a reason for hiding this comment

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

@mikepurvis
Copy link
Owner Author

Okay, all of desktop_full builds. Now the main issue is that the python script shebang lines are ending up pointing at /usr/bin/python for reasons that are not totally clear to me. But it looks like it should be possible to just set PYTHON_EXECUTABLE, if I'm reading this correctly.

@mikepurvis
Copy link
Owner Author

Seems to be working across some basic smoke tests. Woo!

@mikepurvis mikepurvis merged commit 3b690a3 into master Oct 20, 2017
@mikepurvis mikepurvis deleted the lunar-qt5 branch October 20, 2017 18:57
@mikepurvis mikepurvis mentioned this pull request Oct 20, 2017
@mikepurvis mikepurvis changed the title WIP: Update to build Lunar + QT5 + Ogre 1.9 + Gazebo 8 Update to build Lunar + QT5 + Ogre 1.9 + Gazebo 8 Oct 20, 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

Successfully merging this pull request may close these issues.

1 participant