Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.2.0
-
None
Description
When building qt 6.2.0 on clang 11 with libc++, I get the following error:
[660/1315] Building CXX object qtbase/src/gui/CMakeFiles/Gui.dir/kernel/qhighdpiscaling.cpp.o FAILED: qtbase/src/gui/CMakeFiles/Gui.dir/kernel/qhighdpiscaling.cpp.o /usr/bin/clang++ -DENABLE_PIXMAN_DRAWHELPERS -DFFI_BUILDING -DGui_EXPORTS -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DLIBXML_STATIC -DMD4C_USE_UTF8 -DPCRE2_STATIC -DPCRE_STATIC=1 -DPKGCONFIG_IS_STATIC -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_GUI_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_QPA_DEFAULT_PLATFORM_NAME=\"xcb\" -DQT_USE_QSTRINGBUILDER -DU_STATIC_IMPLEMENTATION -DXML_STATIC -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/src/gui/Gui_autogen/include -I/home/conan/w/BuildSingleReference/.conan/data/pkgconf/1.7.4/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -I/home/conan/w/BuildSingleReference/.conan/data/pkgconf/1.7.4/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include/pkgconf -I/home/conan/w/BuildSingleReference/.conan/data/double-conversion/3.1.5/_/_/package/1c5bcde1e213fc712537f46d30a40b84c726ad26/include -I/home/conan/w/BuildSingleReference/.conan/data/icu/69.1/_/_/package/1f6c5f57314b1df1555951d29c0bb11b4c30c275/include -I/home/conan/w/BuildSingleReference/.conan/data/sqlite3/3.36.0/_/_/package/cfb7b1655975335160367411209b2da951fbdd81/include -I/home/conan/w/BuildSingleReference/.conan/data/libpq/13.2/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -I/home/conan/w/BuildSingleReference/.conan/data/odbc/2.3.9/_/_/package/fec24d44da6e306a035494143b2b052b7244ce96/include -I/usr/include/libdrm -I/home/conan/w/BuildSingleReference/.conan/data/openssl/1.1.1l/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/home/conan/w/BuildSingleReference/.conan/data/wayland/1.19.0/_/_/package/32edd86d95d77bfcf3b636b7531d210e2d6fb3d7/include -I/home/conan/w/BuildSingleReference/.conan/data/libxml2/2.9.12/_/_/package/4d1fbc66b168365622e07236dc8a1255f2bad203/include -I/home/conan/w/BuildSingleReference/.conan/data/libxml2/2.9.12/_/_/package/4d1fbc66b168365622e07236dc8a1255f2bad203/include/libxml2 -I/home/conan/w/BuildSingleReference/.conan/data/libiconv/1.16/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtGui -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/src/gui -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/../3rdparty/VulkanMemoryAllocator -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtGui/6.2.0 -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtGui/6.2.0/QtGui -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/../3rdparty/md4c -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtCore -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/mkspecs/linux-clang-libc++ -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/src/corelib -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtCore/6.2.0 -I/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/include/QtCore/6.2.0/QtCore -isystem /home/conan/w/BuildSingleReference/.conan/data/fontconfig/2.13.93/_/_/package/281bae9ed8c729f567e49c0c9f4271dadf675093/include -isystem /home/conan/w/BuildSingleReference/.conan/data/harfbuzz/2.8.0/_/_/package/f50869915eac74fa3caa59bf87cff161ff4b4aa8/include -isystem /home/conan/w/BuildSingleReference/.conan/data/harfbuzz/2.8.0/_/_/package/f50869915eac74fa3caa59bf87cff161ff4b4aa8/include/harfbuzz -isystem /home/conan/w/BuildSingleReference/.conan/data/xkbcommon/1.3.0/_/_/package/a856a952b4622b54e027eecdc6eae19cd9ecccb4/include -isystem /home/conan/w/BuildSingleReference/.conan/data/freetype/2.10.4/_/_/package/d12350f0e3749a71c964b501a14ce46110a6cb34/include -isystem /home/conan/w/BuildSingleReference/.conan/data/freetype/2.10.4/_/_/package/d12350f0e3749a71c964b501a14ce46110a6cb34/include/freetype2 -isystem /home/conan/w/BuildSingleReference/.conan/data/libuuid/1.0.3/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libuuid/1.0.3/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include/uuid -isystem /home/conan/w/BuildSingleReference/.conan/data/glib/2.70.0/_/_/package/643020d2f95bbab54093cf3e879b231224f39163/include -isystem /home/conan/w/BuildSingleReference/.conan/data/glib/2.70.0/_/_/package/643020d2f95bbab54093cf3e879b231224f39163/include/gio-unix-2.0 -isystem /home/conan/w/BuildSingleReference/.conan/data/glib/2.70.0/_/_/package/643020d2f95bbab54093cf3e879b231224f39163/include/glib-2.0 -isystem /home/conan/w/BuildSingleReference/.conan/data/glib/2.70.0/_/_/package/643020d2f95bbab54093cf3e879b231224f39163/lib/glib-2.0/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libpng/1.6.37/_/_/package/708e3821c4fe741f510d3ddea95407b8124651b9/include -isystem /home/conan/w/BuildSingleReference/.conan/data/brotli/1.0.9/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/brotli/1.0.9/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include/brotli -isystem /home/conan/w/BuildSingleReference/.conan/data/expat/2.4.1/_/_/package/78da94c7eb03bc395d5eff3d04ac925d222bc182/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libffi/3.4.2/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/pcre/8.45/_/_/package/6a72553316f39d7b4c672e3260feaa1976ad24ca/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libelf/0.8.13/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libmount/2.36.2/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/libmount/2.36.2/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include/libmount -isystem /home/conan/w/BuildSingleReference/.conan/data/libselinux/3.2/_/_/package/1624e4f9fa64b5eda97526edaa485ad32a894557/include -isystem /home/conan/w/BuildSingleReference/.conan/data/pcre2/10.37/_/_/package/18c2874de49a3534a35a2d4c1b15547a462dc6a3/include -isystem /home/conan/w/BuildSingleReference/.conan/data/zlib/1.2.11/_/_/package/05441c20e7e7a68951563eb6a1ae544f71dd7263/include -isystem /home/conan/w/BuildSingleReference/.conan/data/bzip2/1.0.8/_/_/package/7c724e376772c2af7fcf54897249a8e186ca8ccd/include -m64 -stdlib=libc++ -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -DPCRE2_STATIC -DLIBXML_STATIC -DPCRE_STATIC=1 -DFFI_BUILDING -DXML_STATIC -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DU_STATIC_IMPLEMENTATION -DPKGCONFIG_IS_STATIC -Wall -Wextra -fno-exceptions -fPIC -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/src/gui/CMakeFiles/Gui.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/build/c8d84de17981661e5368b2aa872e1ac87b4fb3c3/qtbase/src/gui/CMakeFiles/Gui.dir/cmake_pch.hxx -MD -MT qtbase/src/gui/CMakeFiles/Gui.dir/kernel/qhighdpiscaling.cpp.o -MF qtbase/src/gui/CMakeFiles/Gui.dir/kernel/qhighdpiscaling.cpp.o.d -o qtbase/src/gui/CMakeFiles/Gui.dir/kernel/qhighdpiscaling.cpp.o -c /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/kernel/qhighdpiscaling.cpp /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/kernel/qhighdpiscaling.cpp:72:12: error: no viable constructor or deduction guide for deduction of template arguments of 'optional' return std::optional(qEnvironmentVariable(name)); ^ /usr/include/c++/v1/optional:683:41: note: candidate template ignored: couldn't infer template argument '_Tp' _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} ^ /usr/include/c++/v1/optional:689:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(in_place_t, _Args&&... __args) ^ /usr/include/c++/v1/optional:703:15: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr optional(_Up&& __v) ^ /usr/include/c++/v1/optional:710:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(_Up&& __v) ^ /usr/include/c++/v1/optional:579:7: note: candidate template ignored: could not match 'optional<_Tp>' against 'QString' class optional ^ /usr/include/c++/v1/optional:681:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'QString' _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default; ^ /usr/include/c++/v1/optional:682:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'QString' _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; ^ /usr/include/c++/v1/optional:718:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QString' optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:726:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QString' explicit optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:736:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QString' optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:744:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QString' explicit optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:680:41: note: candidate function template not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} ^ /usr/include/c++/v1/optional:696:24: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ^ /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/kernel/qhighdpiscaling.cpp:80:12: error: no viable constructor or deduction guide for deduction of template arguments of 'optional' return std::optional(qgetenv(name)); ^ /usr/include/c++/v1/optional:683:41: note: candidate template ignored: couldn't infer template argument '_Tp' _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} ^ /usr/include/c++/v1/optional:689:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(in_place_t, _Args&&... __args) ^ /usr/include/c++/v1/optional:703:15: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr optional(_Up&& __v) ^ /usr/include/c++/v1/optional:710:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(_Up&& __v) ^ /usr/include/c++/v1/optional:579:7: note: candidate template ignored: could not match 'optional<_Tp>' against 'QByteArray' class optional ^ /usr/include/c++/v1/optional:681:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'QByteArray' _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default; ^ /usr/include/c++/v1/optional:682:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'QByteArray' _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; ^ /usr/include/c++/v1/optional:718:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QByteArray' optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:726:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QByteArray' explicit optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:736:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QByteArray' optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:744:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'QByteArray' explicit optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:680:41: note: candidate function template not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} ^ /usr/include/c++/v1/optional:696:24: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ^ /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/kernel/qhighdpiscaling.cpp:87:21: error: no viable constructor or deduction guide for deduction of template arguments of 'optional' auto opt = ok ? std::optional(value) : std::nullopt; ^ /usr/include/c++/v1/optional:683:41: note: candidate template ignored: couldn't infer template argument '_Tp' _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} ^ /usr/include/c++/v1/optional:689:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(in_place_t, _Args&&... __args) ^ /usr/include/c++/v1/optional:703:15: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr optional(_Up&& __v) ^ /usr/include/c++/v1/optional:710:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(_Up&& __v) ^ /usr/include/c++/v1/optional:579:7: note: candidate template ignored: could not match 'optional<_Tp>' against 'int' class optional ^ /usr/include/c++/v1/optional:681:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'const int' _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default; ^ /usr/include/c++/v1/optional:682:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'const int' _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; ^ /usr/include/c++/v1/optional:718:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const int' optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:726:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const int' explicit optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:736:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const int' optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:744:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const int' explicit optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:680:41: note: candidate function template not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} ^ /usr/include/c++/v1/optional:696:24: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ^ /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.0/_/_/source/qt6/qtbase/src/gui/kernel/qhighdpiscaling.cpp:98:17: error: no viable constructor or deduction guide for deduction of template arguments of 'optional' return ok ? std::optional(value) : std::nullopt; ^ /usr/include/c++/v1/optional:683:41: note: candidate template ignored: couldn't infer template argument '_Tp' _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} ^ /usr/include/c++/v1/optional:689:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(in_place_t, _Args&&... __args) ^ /usr/include/c++/v1/optional:703:15: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr optional(_Up&& __v) ^ /usr/include/c++/v1/optional:710:24: note: candidate template ignored: couldn't infer template argument '_Tp' constexpr explicit optional(_Up&& __v) ^ /usr/include/c++/v1/optional:579:7: note: candidate template ignored: could not match 'optional<_Tp>' against 'double' class optional ^ /usr/include/c++/v1/optional:681:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'const double' _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default; ^ /usr/include/c++/v1/optional:682:41: note: candidate template ignored: could not match 'optional<_Tp>' against 'const double' _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; ^ /usr/include/c++/v1/optional:718:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const double' optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:726:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const double' explicit optional(const optional<_Up>& __v) ^ /usr/include/c++/v1/optional:736:5: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const double' optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:744:14: note: candidate template ignored: could not match 'optional<type-parameter-0-1>' against 'const double' explicit optional(optional<_Up>&& __v) ^ /usr/include/c++/v1/optional:680:41: note: candidate function template not viable: requires 0 arguments, but 1 was provided _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} ^ /usr/include/c++/v1/optional:696:24: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args) ^ 4 errors generated.
This does not happen with clang 10, or with libstdc++, or with qt 6.1.3