wxQt fails to build on Arch Linux with Qt 6.10 and Clang 21.1.5 (Issue #25969)

14 views
Skip to first unread message

Avery King

unread,
Nov 11, 2025, 9:37:36 PM (10 days ago) Nov 11
to wx-...@googlegroups.com, Subscribed
generic-pers0n created an issue (wxWidgets/wxWidgets#25969)

Build System Used

I build wxWidgets and/or my application using:

  • CMake
  • configure
  • mingw32-make with makefile.gcc
  • MSBuild (Microsoft Visual Studio solution file)
  • nmake with makefile.vc
  • Xcode

The full configure command I used is cmake -G Ninja -DwxBUILD_TOOLKIT=qt ../wxwidgets.

Description

On Arch Linux with Qt 6.10 and Clang 21.1.5, building the wxQt port fails due to no known conversion for Qt::Key in QChar's constructor. Here's the full output below:

[1/25] Building CXX object libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.o
FAILED: [code=1] libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.o 
/usr/bin/clang++ -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_OPENGLWIDGETS_LIB -DQT_OPENGL_LIB -DQT_TESTCASE_BUILDDIR=\"/home/avery/Projects/wxwidgets-build/libs/core\" -DQT_TESTCASE_SOURCEDIR=\"/home/avery/Projects/wxwidgets/build/cmake/lib/core\" -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -DWXBUILDING -DWXDLLNAME=wx_qtu_core-3.3 -DWXMAKINGDLL_CORE -DWXUSINGDLL -DWX_PRECOMP -D_FILE_OFFSET_BITS=64 -D_UNICODE -D__WXQT__ -DwxUSE_BASE=0 -DwxUSE_GUI=1 -Dwxcore_EXPORTS -I/home/avery/Projects/wxwidgets-build/lib/wx/include/qt-unicode-3.3 -I/home/avery/Projects/wxwidgets/include -I/usr/include/qt6/QtDBus -I/usr/include/SDL2 -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtOpenGLWidgets -isystem /usr/include/qt6/QtTest -isystem /usr/lib/qt6/mkspecs/linux-g++ -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wundef -Wunused-parameter -Wno-ignored-attributes -Wno-ctor-dtor-privacy -Woverloaded-virtual -fno-direct-access-external-data -Winvalid-pch -Xclang -include-pch -Xclang /home/avery/Projects/wxwidgets-build/libs/core/CMakeFiles/wxcore.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/avery/Projects/wxwidgets-build/libs/core/CMakeFiles/wxcore.dir/cmake_pch.hxx -MD -MT libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.o -MF libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.o.d -o libs/core/CMakeFiles/wxcore.dir/__/__/__/__/src/qt/uiaction.cpp.o -c /home/avery/Projects/wxwidgets/src/qt/uiaction.cpp
/home/avery/Projects/wxwidgets/src/qt/uiaction.cpp:180:21: error: no matching constructor for initialization of 'const QChar'
  180 |         const QChar qChar(key);
      |                     ^     ~~~
/usr/include/qt6/QtCore/qchar.h:48:31: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Key' to 'const QChar' for 1st argument
   48 | class QT6_ONLY(Q_CORE_EXPORT) QChar {
      |                               ^~~~~
/usr/include/qt6/QtCore/qchar.h:48:31: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Key' to 'QChar' for 1st argument
   48 | class QT6_ONLY(Q_CORE_EXPORT) QChar {
      |                               ^~~~~
/usr/include/qt6/QtCore/qchar.h:132:26: note: candidate template ignored: requirement 'disjunction<std::is_same<Qt::Key, unsigned short>, std::is_same<Qt::Key, short>, std::is_same<Qt::Key, QChar::SpecialCharacter>, std::is_same<Qt::Key, QLatin1Char>, std::conjunction<std::is_same<Qt::Key, wchar_t>, std::negation<std::integral_constant<bool, true>>>, std::is_same<Qt::Key, char16_t>>::value' was not satisfied [with Char = Key]
  132 |     constexpr Q_IMPLICIT QChar(const Char ch) noexcept : ucs(char16_t(ch)) {}
      |                          ^
/usr/include/qt6/QtCore/qchar.h:134:24: note: candidate template ignored: requirement 'disjunction<std::is_same<Qt::Key, char32_t>, std::conjunction<std::is_same<Qt::Key, wchar_t>, std::integral_constant<bool, true>>, std::is_same<Qt::Key, int>, std::is_same<Qt::Key, unsigned int>>::value' was not satisfied [with Char = Key]
  134 |     constexpr explicit QChar(const Char ch) noexcept
      |                        ^
/usr/include/qt6/QtCore/qchar.h:143:45: note: candidate template ignored: requirement 'is_same<Qt::Key, char>::value' was not satisfied [with Char = Key]
  143 |     QT_ASCII_CAST_WARN constexpr Q_IMPLICIT QChar(const Char ch) noexcept : ucs(uchar(ch)) {}
      |                                             ^
/usr/include/qt6/QtCore/qchar.h:149:43: note: candidate template ignored: requirement 'is_same<Qt::Key, unsigned char>::value' was not satisfied [with Char = Key]
  149 |     QT_ASCII_CAST_WARN constexpr explicit QChar(const Char c) noexcept : ucs(c) { }
      |                                           ^
/usr/include/qt6/QtCore/qchar.h:115:26: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
  115 |     constexpr Q_IMPLICIT QChar() noexcept : ucs(0) {}
      |                          ^
/usr/include/qt6/QtCore/qchar.h:119:24: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
  119 |     constexpr explicit QChar(uchar c, uchar r) noexcept : ucs(char16_t((r << 8) | c)) {}
      |                        ^     ~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.

The fix, however, is pretty simple: fix line 180 in src/qt/uiaction.cpp to the following:

const QChar qChar((int) key);

I plan to open a PR shortly to fix this issue.

P.S. It may be better to use the Qt namespace for all classes because I was a bit confused as to where the Key class was defined only to find out it was Qt::Key, which, needless to say, was an enum. That's just a nitpick, however.

Platform and version information

  • wxWidgets version you are building: commit 08b10e3.
  • wxWidgets port you are building: wxQt
  • OS and its version: Arch Linux with Qt 6.10
  • Compiler being used: Clang 21.1.5
  • Non-default compiler options, if any : N/A


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25969@github.com>

AliKet

unread,
Nov 12, 2025, 2:48:08 PM (9 days ago) Nov 12
to wx-...@googlegroups.com, Subscribed
AliKet left a comment (wxWidgets/wxWidgets#25969)

Duplicate of #25484


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/25969/3523626569@github.com>

Avery King

unread,
Nov 12, 2025, 3:02:11 PM (9 days ago) Nov 12
to wx-...@googlegroups.com, Subscribed

Closed #25969 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/25969/issue_event/20897544200@github.com>

Reply all
Reply to author
Forward
0 new messages