0
$\begingroup$

Rosanswers logo

Hi, i did first tests of ROS under Ubuntu and now i want to install ROS Indigo on a MacBook Pro with OS X 10.10.3 according to http://wiki.ros.org/indigo/Installation/OSX/Homebrew/Source. Unfortunately i get an error in the last step ($ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release):

fatal error: 'QMetaType' file not found

I think i only have to set a variable like $PATH or something, but i don´t know which one (or in which file i have to state the path) (i found a qmetatype.h in /usr/local/Cellar/qt/4.8.7/lib/QtCore.framework/Versions/4/Headers/qmetatype.h)

Sorry for my obvious lack of knowledge so any help would be appreciated. Thanks a lot.

Here the terminal log of the error:

[qt_gui_cpp] ==> '/Users/jS/ros_catkin_ws/build/qt_gui_cpp/build_env.sh /usr/local/bin/cmake /Users/jS/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp -DCATKIN_DEVEL_PREFIX=/Users/jS/ros_catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/include/python2.7' in '/Users/jS/ros_catkin_ws/build/qt_gui_cpp'
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /Users/jS/ros_catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Found PythonInterp: /usr/local/bin/python (found version "2.7.10") 
-- Using PYTHON_EXECUTABLE: /usr/local/bin/python
-- Using default Python package layout
-- Found PY_em: /usr/local/lib/python2.7/site-packages/em.pyc  
-- Using empy: /usr/local/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /Users/jS/ros_catkin_ws/build/qt_gui_cpp/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/local/bin/nosetests-2.7
-- catkin 0.6.14
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PythonLibs: /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib (found suitable version "2.7.10", minimum required is "2.7") 
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - found
-- Looking for QT_MAC_USE_COCOA
-- Looking for QT_MAC_USE_COCOA - found
-- Found Qt4: /usr/local/bin/qmake (found version "4.8.7") 
-- libshiboken built for Release
Using SHIBOKEN_LIBRARY: /usr/local/Cellar/shiboken/1.2.2/lib/libshiboken-python2.7.dylib
-- Using default python: -python2.7
Using PYSIDE_LIBRARY: /usr/local/Cellar/pyside/1.2.2/lib/libpyside-python2.7.dylib
-- Shiboken binding generator available.
CMake Warning at src/qt_gui_cpp_shiboken/CMakeLists.txt:46 (message):
  Shiboken version 1.2.2 would segfault when trying to process qt_gui_cpp
  (see https://bugreports.qt-project.org/browse/PYSIDE-218).  Therefore
  shiboken bindings are being skipped.


-- Found PythonInterp: /usr/local/bin/python (found suitable version "2.7.10", minimum required is "2.7") 
-- SIP binding generator available.
-- Python binding generators: sip
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   qt_gui_cpp

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/jS/ros_catkin_ws/build/qt_gui_cpp
[qt_gui_cpp] <== '/Users/jS/ros_catkin_ws/build/qt_gui_cpp/build_env.sh /usr/local/bin/cmake /Users/jS/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp -DCATKIN_DEVEL_PREFIX=/Users/jS/ros_catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/include/python2.7' finished with return code '0'
[qt_gui_cpp] ==> '/Users/jS/ros_catkin_ws/build/qt_gui_cpp/build_env.sh /usr/bin/make --jobserver-fds=3,4 -j' in '/Users/jS/ros_catkin_ws/build/qt_gui_cpp'
[  7%] Generating __/__/include/qt_gui_cpp/moc_plugin_bridge.cxx
Scanning dependencies of target qt_gui_cpp
[ 15%] [ 23%] [ 30%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/composite_plugin_provider.cpp.o
Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/generic_proxy.cpp.o
Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_bridge.cpp.o
[ 38%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_context.cpp.o
[ 46%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_descriptor.cpp.o
[ 53%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/plugin_provider.cpp.o
[ 61%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/recursive_plugin_provider.cpp.o
[ 69%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/settings.cpp.o
[ 76%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/__/__/include/qt_gui_cpp/moc_plugin_bridge.cxx.o
Linking CXX shared library /Users/jS/ros_catkin_ws/devel/lib/libqt_gui_cpp.dylib
[ 76%] Built target qt_gui_cpp
Scanning dependencies of target libqt_gui_cpp_sip
[ 84%] Running SIP generator for qt_gui_cpp_sip Python bindings...
sip: Deprecation warning: qt_gui_cpp.sip:1: %Module version number should be specified using the 'version' argument
[ 92%] Compiling generated code for qt_gui_cpp_sip Python bindings...
In file included from siplibqt_gui_cpp_sipcmodule.cpp:7:
./sipAPIlibqt_gui_cpp_sip.h:13:10: fatal error: 'QMetaType' file not found
#include <QMetaType>
         ^
In file included from siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginDescriptor.cpp:7:
./sipAPIlibqt_gui_cpp_sip.h:13:10: fatal error: 'QMetaType' file not found
#include <QMetaType>
         ^
In file included from siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginProvider.cpp:7:
./sipAPIlibqt_gui_cpp_sip.h:13:10: fatal error: 'QMetaType' file not found
#include <QMetaType>
         ^
1 error generated.
make[3]: *** [siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginDescriptor.o] Error 1
make[3]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make[3]: *** [siplibqt_gui_cpp_sipQList0101qt_gui_cppPluginProvider.o] Error 1
make[3]: *** [siplibqt_gui_cpp_sipcmodule.o] Error 1
make[2]: *** [/Users/jS/ros_catkin_ws/devel/lib/python2.7/site-packages/qt_gui_cpp/libqt_gui_cpp_sip.dylib] Error 2
make[1]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make: *** [all] Error 2
[qt_gui_cpp] <== '/Users/jS/ros_catkin_ws/build/qt_gui_cpp/build_env.sh /usr/bin/make --jobserver-fds=3,4 -j' failed with return code '2'

edit: here what i get with $ brew info qt sip

qt: stable 4.8.7 (bottled), HEAD
Cross-platform application and UI framework
https://www.qt.io/
/usr/local/Cellar/qt/4.8.7 (2794 files, 122M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/qt.rb
==> Dependencies
Optional: d-bus ✘, mysql ✘, postgresql ✘
==> Options
--universal
    Build a universal binary
--with-d-bus
    Build with d-bus support
--with-developer
    Build and link with developer options
--with-docs
    Build documentation
--with-mysql
    Build with mysql support
--with-postgresql
    Build with postgresql support
--with-qt3support
    Build with deprecated Qt3Support module support
--HEAD
    Install HEAD version
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.


.app bundles were installed.
Run `brew linkapps qt` to symlink these to /Applications.

sip: stable 4.16.5 (bottled), HEAD
Tool to create Python bindings for C and C++ libraries
http://www.riverbankcomputing.co.uk/software/sip
/usr/local/Cellar/sip/4.16.5 (10 files, 864K) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/sip.rb
==> Options
--with-python3
    Build with python3 support
--without-python
    Build without python support
--HEAD
    Install HEAD version
==> Caveats
The sip-dir for Python is /usr/local/share/sip.

Originally posted by js4 on ROS Answers with karma: 35 on 2015-06-17

Post score: 3


Original comments

Comment by jkp on 2015-06-17:
I have the same problem building ROS Jade on OS X 10.10.3. I tried removing Homebrew and reinstalling, but no luck. The file exists in /usr/local/Cellar/qt/4.8.7/lib/QtCore.framework/Versions/4/Headers/QMetaType, so maybe it's a path somewhere that needs to be updated.

Comment by William on 2015-06-17:
I've never seen that before, what version of Qt and Sip are you using? (brew info qt sip)

Comment by js4 on 2015-06-17:
Thanks for your comments. I added the Information in my question.

Comment by paloul on 2015-06-18:
I am having the same problem building both Jade and Indigo on OSX 10.10.3. The above error log is exactly the same on my screen. Both Jade and Indigo are producing the same exact error log.

qt is at version 4.8.7 sip is at version 4.16.5

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

So I hit this and it appears the issue is that the qt version ROS jade (and I'm guessing ROS indigo) is expecting here is 4.8.6, while we have 4.8.7 installed. I think one could fix this by installing the 4.8.6 homebrew version of qt, but that recipe wasn't readily available and I was too lazy and uninformed to create it, although it'd be nice if myself or someone else followed up and made a recipe for that version. At any rate, what I ended up doing was editing build_isolated/qt_gui_cpp/sip/qt_gui_cpp_sip/Makefile (under the ros_catkin_ws, make a backup first) and replacing all the '4.8.6' references with '4.8.7' so it could find the files in my homebrew install. This seems to allow it to install, although that was around package 69 (out of 189 for the desktop install) so there might be more issues to come.

EDITED: Just found out that this file has the same issue much later in the build process: devel_isolated/rviz/bin/sip/rviz_sip/Makefile You'd be best off to edit both before running the compile stage.


Originally posted by ppg with karma: 56 on 2015-06-25

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by taogashi on 2015-06-26:
@ppg you know how I appreciate your answer ! a shell script may help for file in grep -rl "4\.8\.6" .|grep Makefile do sed -i '' "s/4.8.6/4.8.7/g" $file done

Comment by ppg on 2015-06-26:
@taogashi yeah, that snippet should help people, although the change is only in about 6-8 locations so I just did manually. One note for people is that the build_isolated and devel_isolated files are created during the build, so you can do ahead of time. Might be worth direct installing those first

Comment by Markus Achtelik on 2015-07-07:
it seems to be solved now: https://github.com/Homebrew/homebrew-science/pull/2482 haven't tested it though, since I don't want to touch my working version now :)

Comment by luc on 2015-08-05:
Just had the same issue. Changed all 4.8.6 strings inside the makefile to 4.8.7 and it seems to be working so far...

Comment by taogashi on 2015-08-06:
indigo on OSX 10.10.4, however I've never got image_view run on my Mac...

Comment by ablarry91 on 2015-09-14:
Worked like a charm with ROS Jade on OSX 10.10.5!

Comment by Lome789 on 2015-09-27:
how to replace all the '4.8.6' references with '4.8.7'?

$\endgroup$
0
$\begingroup$

Rosanswers logo

It's just ghastly, but I went the other way and created the 4.8.6 folder as a symlink to 4.8.7: https://github.com/mikepurvis/ros-install-osx/blob/c6e5656557a47e0049bc3bd51db3e3503384092f/install#L106


Originally posted by mikepurvis with karma: 1153 on 2015-07-17

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

A better fix is to just run

brew reinstall --build-from-source pyqt

see https://github.com/Homebrew/homebrew/issues/43805


Originally posted by a1k0n with karma: 11 on 2015-09-10

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Hansg91 on 2015-09-22:
Worked for me.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.