Ask Your Question

"fatal error: 'QMetaType' file not found" when building ROS Indigo on OS X 10.10.3

asked 2015-06-17 08:56:56 -0500

js4 gravatar image

updated 2015-06-17 13:47:59 -0500

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 . 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/ /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
-- The CXX compiler identification is AppleClang
-- Check for working C compiler: /Applications/
-- Check for working C compiler: /Applications/ -- 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/
-- Check for working CXX compiler: /Applications/ -- 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
-- 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 ...
edit retag flag offensive close merge delete


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.

jkp gravatar image jkp  ( 2015-06-17 13:00:26 -0500 )edit

I've never seen that before, what version of Qt and Sip are you using? (brew info qt sip)

William gravatar image William  ( 2015-06-17 13:37:13 -0500 )edit

Thanks for your comments. I added the Information in my question.

js4 gravatar image js4  ( 2015-06-17 13:49:47 -0500 )edit

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

paloul gravatar image paloul  ( 2015-06-18 17:15:54 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2015-06-25 21:28:45 -0500

ppg gravatar image

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.

edit flag offensive delete link more



@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

taogashi gravatar image taogashi  ( 2015-06-26 00:59:46 -0500 )edit

@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

ppg gravatar image ppg  ( 2015-06-26 18:39:12 -0500 )edit

it seems to be solved now: haven't tested it though, since I don't want to touch my working version now :)

Markus Achtelik gravatar image Markus Achtelik  ( 2015-07-07 06:51:44 -0500 )edit

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...

luc gravatar image luc  ( 2015-08-05 03:17:37 -0500 )edit

indigo on OSX 10.10.4, however I've never got image_view run on my Mac...

taogashi gravatar image taogashi  ( 2015-08-06 09:23:49 -0500 )edit

Worked like a charm with ROS Jade on OSX 10.10.5!

ablarry91 gravatar image ablarry91  ( 2015-09-14 16:53:00 -0500 )edit

how to replace all the '4.8.6' references with '4.8.7'?

Lome789 gravatar image Lome789  ( 2015-09-27 16:25:52 -0500 )edit

answered 2015-07-17 14:58:57 -0500

It's just ghastly, but I went the other way and created the 4.8.6 folder as a symlink to 4.8.7:

edit flag offensive delete link more

answered 2015-09-10 16:14:50 -0500

a1k0n gravatar image

A better fix is to just run

brew reinstall --build-from-source pyqt


edit flag offensive delete link more


Worked for me.

Hansg91 gravatar image Hansg91  ( 2015-09-22 08:48:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-06-17 08:35:40 -0500

Seen: 2,321 times

Last updated: Jun 26 '15