Qt 5.14.1 issues on Mac while building ROS Kinetic.
-
I'm trying to build ROS Kinetic but am having some issues with Qt's libraries when building the
qt_gui_cpp
package, which is part ofqt_gui_core
. I'm getting multiple errors, of which the first is:[ 61%] Building CXX object src/qt_gui_cpp/CMakeFiles/qt_gui_cpp.dir/settings.cpp.o In file included from /Users/user/ros/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp/recursive_plugin_provider.cpp:33: In file included from /Users/user/ros/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/recursive_plugin_provider.h:36: In file included from /Users/user/ros/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/composite_plugin_provider.h:36: In file included from /Users/user/ros/ros_catkin_ws/src/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/plugin_descriptor.h:36: In file included from /usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers/QMap:1: In file included from /usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers/qmap.h:45: /usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers/qrefcount.h:55:28: error: no member named 'loadRelaxed' in 'QBasicAtomicInt' int count = atomic.loadRelaxed();
I've posted a question about it in their repo at github.com.
In the mean time, I decided to try building my own Qt 5.14.1 (rather than using Homebrew's keg version) hoping that if I can build Qt itself, then my problem in ROS will go away.
However, after downloading the
qt-everywhere-src-5.14.1.tar.xz
tarball and configuring it with./configure -qtlibinfix 5.14 -qtlibinfix-plugins -opensource -debug-and-release -developer-build -c++std c++11 -framework -pkg-config
, I got an error during the build:qappletestlogger.cpp error: no matching constructor for initialization of 'MessageData'
where the the compiler complains that it received 2 parameters while expecting only one (1).
So I've added to my 'configure' command-nomake tests -skip qtandroidextras
, and am about to try again.First question: Has anyone built Qt to be used with ROS? What configure options would you recommend? There are so many options, that look handy to have but don't seem to be needed in a ROS environment, yet I'm worried about turning things off that may have interdependencies. (The build time is sooo long, and deleting the folder and re-extracting is quicker than running
make clean
.)Second question: Is there a way to see what
configure
options were used in the homebrew build? Then I could replicate their setting.Third question: Is there a way of fixing these compiler errors without editing source files? Surely the source code is correct and I'm just having a settings issue.
-
Hi,
What version of macOS are you running ?
What version of Xcode are you using ? -
I'm running MacOS Mojave 10.14.5 and have Xcode 10.2 installed.
The reason for the above error is due to the configure option-c++std c++11
. Removing that constraint allowed the build to progress. I got two further build errors:- In
qtcanvas3d
, which I was able to circumvent by skipping the module. - In
qtvirtualkeyboard
, the hunspell include path incorrectly includes thehunspell
subfolder since the header file refers to `hunspell/hunspell.h'. I hacked this by creating a subfolder and a symlink back to the header file in its original location.
(See error details below.)
With these workarounds, I was able to get a successful
make
using the following configuration:../configure -qtlibinfix 5.14.1G -qtlibinfix-plugins -opensource -debug-and-release -developer-build -framework -pkg-config -nomake tests -skip qtandroidextras -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtcanvas3d
Expecting
make install
to install into the default-prefix
location, I was disappointed to find that/usr/local
did not contain any new Qt folders; neitherQt-5.14.1
norQt-5.14.1G
were there, nor were there any other new folders there that might have come from the build. I'll need to debug this issue, but since I haven't usedqmake
before, I'll need to get familair with its way of doing things first, including understanding.pro
files.I am pleased to see that the significant outputs from my build are all marked with the suffix I asked for in the
-qtlibinfix 5.14.1G -qtlibinfix-plugins
configuration options. Hopefully this will make it easier to debug theqt_gui_cpp
package in ROS Kinetic. What is nice is that the header I am having difficulties with in the ROS build compiled correctly in my Qt build. Thus I can be sure that until ROS builds, the error is in ROS not Qt.Error (1) qtcanvas3d:
/Users/user/Programming/Qt/qt5/build/qtbase/bin/moc -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQTCANVAS3D_LIBRARY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_OPENGLEXTENSIONS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB --include /Users/user/Programming/Qt/qt5/build/qtcanvas3d/src/imports/qtcanvas3d/.moc/debug/moc_predefs.h -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -I/Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtOpenGLExtensions -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I. -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -Muri=QtCanvas3D /Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d/glstatestore_p.h -o .moc/debug/moc_glstatestore_p.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=c++1y -fapplication-extension -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Winconsistent-missing-override -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -Werror=unguarded-availability -Werror=unguarded-availability-new -Werror=unsupported-availability-guard -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQTCANVAS3D_LIBRARY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_OPENGLEXTENSIONS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/Users/user/Programming/Qt/qt5/qtcanvas3d/src/imports/qtcanvas3d -I. -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtOpenGLExtensions -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml/5.14.1/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I.moc/debug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -o .obj/debug/moc_glstatestore_p.o .moc/debug/moc_glstatestore_p.cpp rm -f libqtcanvas3d_debug.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -fapplication-extension -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/user/Programming/Qt/qt5/build/qtbase/lib -single_module -dynamiclib -o libqtcanvas3d_debug.dylib .obj/debug/arrayutils.o .obj/debug/qcanvas3d_plugin.o .obj/debug/enumtostringmap.o .obj/debug/abstractobject3d.o .obj/debug/canvas3d.o .obj/debug/buffer3d.o .obj/debug/canvasrendernode.o .obj/debug/context3d.o .obj/debug/contextattributes.o .obj/debug/framebuffer3d.o .obj/debug/program3d.o .obj/debug/renderbuffer3d.o .obj/debug/shader3d.o .obj/debug/shaderprecisionformat.o .obj/debug/teximage3d.o .obj/debug/texture3d.o .obj/debug/uniformlocation.o .obj/debug/activeinfo3d.o .obj/debug/canvasglstatedump.o .obj/debug/compressedtextures3tc.o .obj/debug/compressedtexturepvrtc.o .obj/debug/glcommandqueue.o .obj/debug/renderjob.o .obj/debug/canvasrenderer.o .obj/debug/canvastextureprovider.o .obj/debug/glstatestore.o .obj/debug/openglversionchecker.o .obj/debug/moc_qcanvas3d_plugin.o .obj/debug/moc_abstractobject3d_p.o .obj/debug/moc_canvas3d_p.o .obj/debug/moc_buffer3d_p.o .obj/debug/moc_canvasrendernode_p.o .obj/debug/moc_context3d_p.o .obj/debug/moc_contextattributes_p.o .obj/debug/moc_framebuffer3d_p.o .obj/debug/moc_program3d_p.o .obj/debug/moc_renderbuffer3d_p.o .obj/debug/moc_shader3d_p.o .obj/debug/moc_shaderprecisionformat_p.o .obj/debug/moc_teximage3d_p.o .obj/debug/moc_texture3d_p.o .obj/debug/moc_uniformlocation_p.o .obj/debug/moc_activeinfo3d_p.o .obj/debug/moc_canvasglstatedump_p.o .obj/debug/moc_compressedtextures3tc_p.o .obj/debug/moc_compressedtexturepvrtc_p.o .obj/debug/moc_glcommandqueue_p.o .obj/debug/moc_canvasrenderer_p.o .obj/debug/moc_canvastextureprovider_p.o .obj/debug/moc_glstatestore_p.o -F/Users/user/Programming/Qt/qt5/build/qtbase/lib /Users/user/Programming/Qt/qt5/build/qtbase/lib/libQt5OpenGLExtensions5.14.1G_debug.a -framework QtQuick5.14.1G -framework QtGui5.14.1G -framework AppKit -framework Metal -framework QtQmlModels5.14.1G -framework QtQml5.14.1G -framework QtNetwork5.14.1G -framework QtCore5.14.1G -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL Undefined symbols for architecture x86_64: "QtCanvas3D::CanvasUniformLocation::staticMetaObject", referenced from: int qmlRegisterUncreatableType<QtCanvas3D::CanvasUniformLocation>(char const*, int, int, char const*, QString const&) in qcanvas3d_plugin.o QtPrivate::MetaObjectForType<QtCanvas3D::CanvasUniformLocation*, void>::value() in qcanvas3d_plugin.o "vtable for QtCanvas3D::CanvasUniformLocation", referenced from: QtCanvas3D::CanvasUniformLocation::CanvasUniformLocation(QtCanvas3D::CanvasGlCommandQueue*, QObject*) in uniformlocation.o QtCanvas3D::CanvasUniformLocation::~CanvasUniformLocation() in uniformlocation.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[5]: *** [/Users/user/Programming/Qt/qt5/build/qtbase/qml/QtCanvas3D/libqtcanvas3d_debug.dylib] Error 1 make[4]: *** [debug-all] Error 2 make[3]: *** [sub-qtcanvas3d-make_first] Error 2 make[2]: *** [sub-imports-make_first-ordered] Error 2 make[1]: *** [sub-src-make_first] Error 2 make: *** [module-qtcanvas3d-make_first] Error 2
Error (2) qtvirtualkeyboard:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -include.pch/debug/QtHunspellInputMethod5.14.1G_debug_x86_64.pch/c++_x86_64 -pipe -stdlib=libc++ -g -std=c++1y -fapplication-extension -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Winconsistent-missing-override -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -Werror=unguarded-availability -Werror=unguarded-availability-new -Werror=unsupported-availability-guard -fPIC -DQT_NO_LINKED_LIST -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_LINKED_LIST -DQHUNSPELLINPUTMETHOD_LIBRARY -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HUNSPELLINPUTMETHOD_LIB -DQT_BUILDING_QT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_VIRTUALKEYBOARD_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod -I. -I/Users/user/Programming/Qt/qt5/build/qtbase/include -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod -I/usr/local/Cellar/hunspell/1.6.2/include/hunspell -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard/5.14.1/QtVirtualKeyboard -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui/5.14.1/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtVirtualKeyboard -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQuick -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtGui -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1 -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore/5.14.1/QtCore -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQmlModels -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtQml -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtNetwork -I/Users/user/Programming/Qt/qt5/build/qtbase/include/QtCore -I.moc/debug -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Users/user/Programming/Qt/qt5/qtbase/mkspecs/macx-clang -F/Users/user/Programming/Qt/qt5/build/qtbase/lib -o .obj/debug/hunspellinputmethod.o /Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.cpp In file included from /Users/user/Programming/Qt/qt5/qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod.cpp:30: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/hunspellinputmethod_p_p.h:1: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/../../../../../../../qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellinputmethod_p_p.h:45: In file included from /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/hunspellworker_p.h:1: /Users/user/Programming/Qt/qt5/build/qtbase/include/QtHunspellInputMethod/5.14.1/QtHunspellInputMethod/private/../../../../../../../qtvirtualkeyboard/src/plugins/hunspell/hunspellinputmethod/hunspellworker_p.h:51:10: fatal error: 'hunspell/hunspell.h' file not found #include <hunspell/hunspell.h> ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[6]: *** [.obj/debug/hunspellinputmethod.o] Error 1 make[5]: *** [debug-all] Error 2 make[4]: *** [sub-hunspellinputmethod-make_first] Error 2 make[3]: *** [sub-hunspell-make_first] Error 2 make[2]: *** [sub-plugins-make_first] Error 2 make[1]: *** [sub-src-make_first] Error 2 make: *** [module-qtvirtualkeyboard-make_first] Error 2
- In