Author Topic: Qt6 Development  (Read 436814 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #870 on: January 28, 2025, 09:37:28 am »
What's the compiler version ?
I'm building with GCC 14.2.0 currently, but it should compile with gcc 9 from rpm as well.

KO Myung-Hun

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +11/-0
    • View Profile
Re: Qt6 Development
« Reply #871 on: January 28, 2025, 12:53:49 pm »
I encountered the following error while configure.

Quote
CMake Error: Unknown argument -release

-release should not be used ?

KO Myung-Hun

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +11/-0
    • View Profile
Re: Qt6 Development
« Reply #872 on: January 28, 2025, 05:15:25 pm »
I failed to build.

First, building QtGui failed due to missing -lexpat.

Second, AutoUic failed. Here are the logs:

Quote
ninja.log
[1/1550] Automatic MOC and UIC for target Widgets
FAILED: src/widgets/Widgets_autogen/timestamp src/widgets/Widgets_autogen/mocs_compilation.cpp G:/lang/work/qt6/qt6-base-os2/build/src/widgets/Widgets_autogen/timestamp G:/lang/work/qt6/qt6-base-os2/build/src/widgets/Widgets_autogen/mocs_compilation.cpp
cd G:/lang/work/qt6/qt6-base-os2/build/src/widgets && G:/usr/bin/cmake.exe -E cmake_autogen G:/lang/work/qt6/qt6-base-os2/build/src/widgets/CMakeFiles/Widgets_autogen.dir/AutogenInfo.json Release && G:/usr/bin/cmake.exe -E touch G:/lang/work/qt6/qt6-base-os2/build/src/widgets/Widgets_autogen/timestamp && G:/usr/bin/cmake.exe -E cmake_transform_depfile Ninja gccdepfile G:/lang/work/qt6/qt6-base-os2 G:/lang/work/qt6/qt6-base-os2/src/widgets G:/lang/work/qt6/qt6-base-os2/build G:/lang/work/qt6/qt6-base-os2/build/src/widgets G:/lang/work/qt6/qt6-base-os2/build/src/widgets/Widgets_autogen/deps G:/lang/work/qt6/qt6-base-os2/build/CMakeFiles/d/68873ff9d4a34f96e6fe7c1b463e2d689445426afcacf9f41c63bb398df41066.d
AutoMoc: G:/lang/work/qt6/qt6-base-os2/src/widgets/kernel/qwidgetrepaintmanager.cpp:0:1: note: No relevant classes found. No output generated.

AutoUic subprocess error
------------------------
The uic process failed to compile
  "SRC:/src/widgets/dialogs/qfiledialog.ui"
into
  "SRC:/build/src/widgets/Widgets_autogen/include/ui_qfiledialog.h"
included by
  "SRC:/src/widgets/dialogs/qfiledialog.cpp"
libuv process spawn failed: no such file or directory

Command
-------
G:/lang/work/qt6/qt6-base-os2/build/bin/uic.exe -o G:/lang/work/qt6/qt6-base-os2/build/src/widgets/Widgets_autogen/include/ui_qfiledialog.h G:/lang/work/qt6/qt6-base-os2/src/widgets/dialogs/qfiledialog.ui

Output
------


ninja: build stopped: subcommand failed.

Quote
config.opt
-prefix
/qt6-6.2.x
-no-opengl
-system-sqlite
-openssl-linked
-no-pch
--
-DQT_BUILD_EXAMPLES=ON
-DQT_BUILD_TESTS=OFF

Quote
config.summary

Building for: os2-g++ (i386, CPU features: )
Compiler: gcc 14.2.0
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Fully optimize release builds (-O3) .... no
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Relocatable ............................ yes
  Using precompiled headers .............. no
  Using LTCG ............................. no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
    Other x86 ............................ AES F16C RDRAND SHA
    Intrinsics without compiler architecture option  yes
  Sanitizers:
    Addresses ............................ no
    Threads .............................. no
    Memory ............................... no
    Fuzzer (instrumentation only) ........ no
    Undefined ............................ no
  Build parts ............................ libs examples tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt PrintSupport ........................ yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  udev ................................... no
  Using system zlib ...................... yes
  Zstandard support ...................... no
  Thread support ......................... yes
Common build options:
  Linker can resolve circular dependencies  yes
Qt Core:
  backtrace .............................. no
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... yes
  ICU .................................... yes
  Using system libb2 ..................... no
  Built-in copy of the MIME database ..... yes
  cpp/winrt base ......................... no
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... no
Qt Sql:
  SQL item models ........................ yes
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ no
  libproxy ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
  Brotli Decompression Support ........... no
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
    xcb-sm ............................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
  LinuxFB ................................ no
  VNC .................................... no
  VK_KHR_display ......................... no
  QNX:
    lgmon ................................ no
    IMF .................................. no
  XCB:
    Using system-provided xcb-xinput ..... no
    GL integrations:
      GLX Plugin ......................... no
        XCB GLX .......................... no
      EGL-X11 Plugin ..................... no
  Windows:
    Direct 2D ............................ no
    Direct 2D 1.1 ........................ no
    DirectWrite .......................... no
    DirectWrite 3 ........................ no
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows
Qt Testlib:
  Tester for item models ................. yes
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite ................................. yes
    Using system provided SQLite ......... yes
Core tools:
  qmake tool ............................. yes
Note: When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +28/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 Development
« Reply #873 on: January 28, 2025, 07:45:30 pm »
Quote
CMake Error: Unknown argument -release

-release should not be used ?

Here are my 'configure' and 'cmake'  commandlines for 'qtbase'. I get no complaints from 'configure' about '-release'.

Code: [Select]
sh ../../qt62/qtbase/configure -prefix /prj/qt/qout/qtbase -release -opensource -confirm-license -no-opengl -system-sqlite -openssl-linked -no-pch -- -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF 2>&1 | tee ../config-base.log

cmake --build . --parallel 6 2>&1 | tee ../bld.log

BTW... you probably already have this but... '<builddir>\qtbase\lib' must be added to your build environment's BEGINLIBPATH because tools like 'uic' link to its dlls.

KO Myung-Hun

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +11/-0
    • View Profile
Re: Qt6 Development
« Reply #874 on: January 30, 2025, 02:52:45 pm »
I've built Qt6 from the main branch successfully.

The reason why I failed:

1. '-release' should be before '--'.
2. The buld failure of Qt6Gui is due to my own build environment preferring static libs.
3. The failure of AutoUic is due to wrong BEGINLIBPATH setting. Thanks Rich Walsh!

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #875 on: January 30, 2025, 10:30:27 pm »
Happy to incorporate any changes into the wiki entry, however I believe 1 & 3 are already captured in the examples provided.

KO Myung-Hun

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +11/-0
    • View Profile
Re: Qt6 Development
« Reply #876 on: January 31, 2025, 03:04:49 am »
What I meant is your build instruction has no problems at all.  :)

Thanks!

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #877 on: January 31, 2025, 03:25:14 am »
What I meant is your build instruction has no problems at all.  :)

Cool, but you're not the 1st to miss the beginlibpath part - so perhaps I'll try explain that better...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #878 on: February 01, 2025, 07:50:33 am »
hi all,

So I did some googling on:
Code: [Select]
Assertion failed: _UM_LUMP_STATUS (olump) == _UMS_FREE without the source code reference given that can change with different libc versions.

Found a few references:
I think I'm even more confused now....

I found a simpler cause for the crash. With help from Stven, I used the debugger and identified that QLocal8Bit::convertToUnicode_sys was on the stack just before the failed assertion.

Rich added this function for OS/2 in https://github.com/psmedley/qt6-base-os2/commit/f2fb4fe0a00af76e6ab22a6829387aa100e331fa with the OS2 code being based on the Windows implementation.

For now, I've removed the use of this code, qmake works and I'll confirm qtdeclarative works before I declare victory. Then I'll work through the changes to the win32 implementation between Qt 6.2 and 6.8.

Update: this corrects the qmake.exe bug, still have issues with UMS_FREE and qmlcachegen.exe
« Last Edit: February 01, 2025, 09:39:16 am by Paul Smedley »

Flashback

  • Newbie
  • *
  • Posts: 15
  • Karma: +5/-1
    • View Profile
Re: Qt6 Development
« Reply #879 on: February 01, 2025, 12:48:42 pm »
Rich added this function for OS/2 in https://github.com/psmedley/qt6-base-os2/commit/f2fb4fe0a00af76e6ab22a6829387aa100e331fa with the OS2 code being based on the Windows implementation.

The handling of U_BUFFER_OVERFLOW_ERROR looks suspicious. Neither the end of the target nor the end of the source buffers appear to get calculated correctly for the second call to ucnv_toUnicode and ucnv_fromUnicode.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +28/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 Development
« Reply #880 on: February 02, 2025, 12:24:30 am »
The handling of U_BUFFER_OVERFLOW_ERROR looks suspicious. Neither the end of the target nor the end of the source buffers appear to get calculated correctly for the second call to ucnv_toUnicode and ucnv_fromUnicode.

Ooops, you're right..  I'll put out a fix.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #881 on: February 02, 2025, 12:45:51 am »
I also have tst_stringconverter built now, so we can see if this improves on some of the failed tests (which were not significantly different than before this commit).

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +28/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 Development
« Reply #882 on: February 02, 2025, 10:53:48 pm »
Here's a patch for 'qstringconverter'. (Apparently you can't attach *.diff so I had to rename it *.txt.)

Paul, if this fails the 'tst_stringconverter' tests, could you send me the binary (assuming there is one) so I can better figure out what's wrong? Tnx.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2435
  • Karma: +185/-0
    • View Profile
Re: Qt6 Development
« Reply #883 on: February 02, 2025, 11:30:56 pm »
Will rebuild later today, but meanwhile, https://smedley.id.au/tmp/tst_qstringconverter.zip

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +28/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Qt6 Development
« Reply #884 on: February 03, 2025, 10:31:14 am »
https://smedley.id.au/tmp/tst_qstringconverter.zip

This needs a fix. Starting around line 43 of 'tst_qstringconverter.cpp' there are two versions of "localeIsUtf8()". The non-Windows flavor returns TRUE. We need one like that which returns FALSE.