[Qt-creator] clangrefactoring tool does not build with Xcode 8.2 and Qt5.6
Eike Ziller
Eike.Ziller at qt.io
Tue Feb 7 15:28:55 CET 2017
Looks like std::future is not available with 10.7 compatibility.
I don’t have Qt 5.6 here, can probably try tomorrow.
You can try passing the flags explicitly to qmake:
QMAKE_CXXFLAGS*=-mmacosx-version-min=10.8 QMAKE_LFLAGS*=-mmacosx-version-min=10.8 qmake
Br, Eike
> On Feb 7, 2017, at 15:05, Andreas Pakulat <apaku at gmx.de> wrote:
>
> Hi,
>
> since I couldn't find a related review and thought that filing a
> bureport for a problem in building an experimental feature of the
> master branch isn't exactly 'proper' I thought I'd check here wether
> this is a 'known problem' already.
>
> I'm building QtC with libclang 3.9 (the zip provided via
> download.qt.io) with Xcode 8.2.1 and Qt5.6 binary install on macOS
> 10.12.
>
> Since the clang code model is enabled, so is the (seemingly
> experimental) clangrefactoringbackend tool. Unfortunately building the
> refactoringserver.cpp file bails out with compile errors (see below).
> It appears the reason for that is specifying
> -mmacosx-version-min=10.7. I couldn't figure out where that is coming
> from so can't suggest a proper patch, but running the compilation
> command manually replacing 10.7 with 10.8 fixes the issue here. I
> haven't tried actually using the resulting tool though.
>
> Compile output:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
> -c -pipe -stdlib=libc++ -I/Users/andreas/libclang/include
> -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter
> -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
> -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor
> -Wdelete-non-virtual-dtor -std=c++11 -DNDEBUG
> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -O2 -std=gnu++1y -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
> -mmacosx-version-min=10.7 -Wall -W -fPIC
> -D'RELATIVE_PLUGIN_PATH="../PlugIns"'
> -D'RELATIVE_LIBEXEC_PATH="../Resources"'
> -D'RELATIVE_DATA_PATH="../Resources"'
> -D'RELATIVE_DOC_PATH="../Resources/doc"'
> -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII
> -DQT_RESTRICTED_CAST_FROM_ASCII
> -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_NO_DEBUG
> -DQT_CONCURRENT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB
> -DQT_CORE_LIB -I../../../src -I/Users/andreas/src/qt-creator/src
> -I/Users/andreas/src/qt-creator/src/libs
> -I/Users/andreas/src/qt-creator/tools
> -I/Users/andreas/src/qt-creator/src/plugins
> -I/Users/andreas/src/qt-creator/src/libs/clangbackendipc
> -I/Users/andreas/src/qt-creator/src/libs/sqlite
> -I/Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source
> -I/Users/andreas/libclang/include
> -I/Users/andreas/Qt/5.6/clang_64/lib/QtConcurrent.framework/Headers
> -I/Users/andreas/Qt/5.6/clang_64/lib/QtWidgets.framework/Headers
> -I/Users/andreas/Qt/5.6/clang_64/lib/QtGui.framework/Headers
> -I/Users/andreas/Qt/5.6/clang_64/lib/QtNetwork.framework/Headers
> -I/Users/andreas/Qt/5.6/clang_64/lib/QtCore.framework/Headers
> -I.moc/release-shared
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers
> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers
> -I/Users/andreas/Qt/5.6/clang_64/mkspecs/macx-clang
> -F/Users/andreas/Qt/5.6/clang_64/lib -o
> .obj/release-shared/refactoringserver.o
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:154:96:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> std::size_t RefactoringServer::waitForNewSourceRangesAndDiagnosticsForQueryMessage(std::vector<Future>
> &futures)
>
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:159:21:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> std::vector<Future> readyFutures;
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:164:52:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> [] (const Future &future) {
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:171:14:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> for (Future &readyFuture : readyFutures)
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:2367:16:
> error:
> no matching function for call to '__make_async_assoc_state'
> return _VSTD::__make_async_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15:
> note:
> expanded from macro '_VSTD'
> #define _VSTD std::_LIBCPP_NAMESPACE
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:138:36:
> note: in
> instantiation of function template specialization
> 'std::__1::async<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage
> (&)(ClangBackEnd::V2::FileContainer &&,
> std::__1::vector<ClangBackEnd::V2::FileContainer,
> std::__1::allocator<ClangBackEnd::V2::FileContainer> > &&,
> Utils::BasicSmallString<31> &&, const std::__1::atomic<bool> &),
> ClangBackEnd::V2::FileContainer,
> std::__1::vector<ClangBackEnd::V2::FileContainer,
> std::__1::allocator<ClangBackEnd::V2::FileContainer> >,
> Utils::BasicSmallString<31>,
> std::__1::reference_wrapper<std::__1::atomic<bool> > >' requested here
> Future &&future = std::async(std::launch::async,
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:2312:1:
> note:
> candidate template ignored: substitution failure [with _Rp =
> ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage]:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> __make_async_assoc_state(_Fp&& __f)
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:2375:16:
> error:
> no matching function for call to '__make_deferred_assoc_state'
> return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(__decay_copy(_VSTD::forward<_Fp>(__f)),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:397:15:
> note:
> expanded from macro '_VSTD'
> #define _VSTD std::_LIBCPP_NAMESPACE
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:2299:1:
> note:
> candidate template ignored: substitution failure [with _Rp =
> ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage]:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> __make_deferred_assoc_state(_Fp&& __f)
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:2377:12:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> return future<_Rp>{};
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1162:1:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> future<_Rp>::~future()
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:138:31:
> note: in
> instantiation of member function
> 'std::__1::future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>::~future'
> requested here
> Future &&future = std::async(std::launch::async,
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1170:1:
> error:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> future<_Rp>::get()
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:172:77:
> note: in
> instantiation of member function
> 'std::__1::future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>::get'
> requested here
> client()->sourceRangesAndDiagnosticsForQueryMessage(readyFuture.get());
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1074:57:
> note:
> 'future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable here
> class _LIBCPP_TYPE_VIS_ONLY _LIBCPP_AVAILABILITY_FUTURE future
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:680:1:
> error:
> '__assoc_state<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> is unavailable: introduced in macOS 10.8
> __assoc_state<_Rp>::move()
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:1175:17:
> note:
> in instantiation of member function
> 'std::__1::__assoc_state<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>::move'
> requested here
> return __s->move();
> ^
> /Users/andreas/src/qt-creator/src/tools/clangrefactoringbackend/source/refactoringserver.cpp:172:77:
> note: in
> instantiation of member function
> 'std::__1::future<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>::get'
> requested here
> client()->sourceRangesAndDiagnosticsForQueryMessage(readyFuture.get());
> ^
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/future:601:35:
> note:
> '__assoc_state<ClangBackEnd::SourceRangesAndDiagnosticsForQueryMessage>'
> has been explicitly marked unavailable
> here
> class _LIBCPP_AVAILABILITY_FUTURE __assoc_state
> ^
> 10 errors generated.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
--
Eike Ziller
Principal Software Engineer
The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator
mailing list