Author Topic: Qt6 Development  (Read 210808 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #90 on: November 19, 2022, 06:01:51 am »
Yes, I got to 100% and make install succeeded, wonder how to compile the examples?
Of course the hard part might be compiling qtwebengine now.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #91 on: November 19, 2022, 06:07:21 am »
Hey Dave,

Yes, I got to 100% and make install succeeded, wonder how to compile the examples?
Of course the hard part might be compiling qtwebengine now.

Woohoo! That's encouraging! Once I've installed, my next step is to try build qtdeclarative - once I figure out how to point it at the installed qt6. I've already setup https://github.com/psmedley/qt6-declarative-os2 and tried to apply patches from the bww github

re: examples, not sure how to build them, but I compiled a console and gui helloworld at https://smedley.id.au/tmp/qt6helloworld.zip

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #92 on: November 19, 2022, 06:33:43 am »
I see this at the end of configure,
Code: [Select]
To configure and build other Qt modules, you can use the following convenience script:
        h:/tmp/qt6/bin/qt-configure-module
Of course the *bat files need to be *cmd but look correct and I installed in h:\tmp

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #93 on: November 19, 2022, 06:39:35 am »
Cool, I guess that script should work for building qtdeclarative

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #94 on: November 19, 2022, 07:10:45 am »
Tried enabling tests, build broke at 96%,
Code: [Select]
[ 96%] Automatic MOC and UIC for target PrintSupport
terminate called without an active exception

Killed by SIGABRT
pid=0x8eaf ppid=0x8eae tid=0x0002 slot=0x00f3 pri=0x0200 mc=0x0001 ps=0x0010
W:\USR\LOCAL\BIN\CMAKE.EXE
Creating 8EAF_02.TRP
Moved 8eaf_02.TRP to W:\var\log\app\637801b8-8eaf_02-CMAKE-exceptq.txt
make[2]: *** [src/printsupport/CMakeFiles/PrintSupport_autogen] Abort trap
make[2]: Target `src/printsupport/CMakeFiles/PrintSupport_autogen.dir/build' not
 remade because of errors.
make[1]: *** [src/printsupport/CMakeFiles/PrintSupport_autogen.dir/all] Error 2

Possibly OOM (out of memory) situation.
It does remind me that there are libc (or was it libcx) fixes for Qt5 that haven't been rpmed yet, should look into that.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #95 on: November 19, 2022, 07:19:06 am »
Were you able to try my helloworld's with your installed qt6? I had to do a full rebuild and am at 80%, but heading out in an our for my work's Christmas party.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #96 on: November 19, 2022, 07:31:38 am »
Console ran fine, not GUI, possibly because of environment, I just ran it from lib,
Code: [Select]
H:\tmp\qt6\lib>helloworldconsole.exe
Hello, world!

H:\tmp\qt6\lib>helloworldgui.exe
qt.qpa.plugin: Could not find the Qt platform plugin "os2" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.


Killed by SIGABRT
pid=0x8ebd ppid=0x005a tid=0x0001 slot=0x00b5 pri=0x0200 mc=0x0001 ps=0x0010
H:\TMP\QT6\LIB\HELLOWORLDGUI.EXE
Creating 8EBD_01.TRP
Moved 8ebd_01.TRP to W:\var\log\app\63780735-8ebd_01-HELLOWORLDGUI-exceptq.txt
Edit: setting PATH and BEGINLIBPATH resulted in the same, something is broken when it comes to finding the plugins, or perhaps loading them, which I assume use DosLoadModule()
« Last Edit: November 19, 2022, 07:42:05 am by Dave Yeo »

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #97 on: November 19, 2022, 11:11:51 am »
Hi all,
After a recompile the build succeed :)

INstall went fine, but also complains that it cannot find the OS2 platform plugin

So far so good :P

qTorrent\qt6>G:\qt6\bin\qmake6.exe -r ../
Cannot find feature spec_pre.prf
Error processing project file: ..\qTorrent.pro

So it seems the structure for qt6 is not good, or unfindable ?
« Last Edit: November 19, 2022, 12:01:42 pm by TeLLie »

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #98 on: November 19, 2022, 01:03:37 pm »
Hi all,
After a recompile the build succeed :)

INstall went fine, but also complains that it cannot find the OS2 platform plugin

So far so good :P

qTorrent\qt6>G:\qt6\bin\qmake6.exe -r ../
Cannot find feature spec_pre.prf
Error processing project file: ..\qTorrent.pro

So it seems the structure for qt6 is not good, or unfindable ?

Also notice that qt6 have .a instead of .lib
I have build now iqpuzzle-1.2.7
Had to change some things in the qt6 build structure
Like add a qt6/libexec and copy there the uic moc and rcc file

g:/qt6/mkspecs/features/toolchain.prf:76: Variable QMAKE_CXX.COMPILER_MACROS is not defined.
Project ERROR: failed to parse default search paths from compiler output

This get fixed if i copy a  .qmake.stash in root of the dir
Then it complains @ make: *** No rule to make target `g:/qt6/lib/Qt6Widgets.lib', needed by `iQPuzzle.exe'.  Stop
change in makefile the lib to qt6widgets_dll.a that solved this error
But after compiling it still ask for the os2 platform plugin...

TeLLie

  • Full Member
  • ***
  • Posts: 226
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #99 on: November 19, 2022, 01:05:51 pm »
Hi all,
After a recompile the build succeed :)

INstall went fine, but also complains that it cannot find the OS2 platform plugin

So far so good :P

qTorrent\qt6>G:\qt6\bin\qmake6.exe -r ../
Cannot find feature spec_pre.prf
Error processing project file: ..\qTorrent.pro

So it seems the structure for qt6 is not good, or unfindable ?

Also notice that qt6 have .a instead of .lib
I have build now iqpuzzle-1.2.7
Had to change some things in the qt6 build structure
Like add a qt6/libexec and copy there the uic moc and rcc file

g:/qt6/mkspecs/features/toolchain.prf:76: Variable QMAKE_CXX.COMPILER_MACROS is not defined.
Project ERROR: failed to parse default search paths from compiler output

This get fixed if i copy a  .qmake.stash in root of the dir
Then it complains @ make: *** No rule to make target `g:/qt6/lib/Qt6Widgets.lib', needed by `iQPuzzle.exe'.  Stop
change in makefile the lib to qt6widgets_dll.a that solved this error
But after compiling it still ask for the os2 platform plugin...

F:\iqpuzzle-1.2.7\qmake1220-os2>chkdll32 iQPuzzle.exe
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'Qt6Core6' --> G:\QT6\LIB\QT6CORE6.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Loading DLL 'Qt6Widg6' --> G:\QT6\LIB\QT6WIDG6.DLL.
Loading DLL 'Qt6Gui6' --> G:\QT6\LIB\QT6GUI6.DLL.
Loading DLL 'stdcpp6' --> C:\USR\LIB\STDCPP6.DLL.
All DLL's used by 'iQPuzzle.exe' could be loaded.


Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #100 on: November 19, 2022, 03:54:20 pm »
Interesting.... I'll aim to investigate later today (1:23am now, just got home from work Christmas party) as to why we're having issues loading qos2.dll - hopefully it's a misapplied patch.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #101 on: November 20, 2022, 12:23:34 am »
OK... I think I know the problem....
qtcore-config.h has:

#define QT_FEATURE_library -1

So the code that's wrapped around:
#if QT_CONFIG(library)

doesn't get executed. Off to work out why configure things we don't support libraries now :)

Likely fix checked in, rebuilding now...
« Last Edit: November 20, 2022, 01:01:13 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #102 on: November 20, 2022, 03:20:52 am »
Unfortunately this didn't change anything :( Back to looking for solutions...

Edit: noticed dlopen wasn't being detected/used  :o rebuilding now after https://github.com/psmedley/qt6-os2/commit/282683051960ddf5c870c23d466a707490c4c0e3
« Last Edit: November 20, 2022, 04:52:36 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #103 on: November 20, 2022, 04:51:57 am »
It changed the crash here,
Code: [Select]
[H:\tmp]helloworldgui

Killed by SIGSEGV
pid=0xc05e ppid=0x8ec0 tid=0x0001 slot=0x00df pri=0x0200 mc=0x0001 ps=0x0010
H:\TMP\HELLOWORLDGUI.EXE
cs:eip=0054:00000000      ss:esp=0000:00000010      ebp=00000053
 ds=0080      es=0000      fs=00a0      gs=0000     efl=0012f618
eax=0012f748 ebx=1ffc9d7c ecx=0012f75c edx=0012f780 edi=002a0000 esi=0012ff9c
Creating C05E_01.TRP
Moved c05e_01.TRP to W:\var\log\app\637932fd-c05e_01-HELLOWORLDGUI-exceptq.txt
QMutex: destroying locked mutex

Note now a SIGSEGV instead of a SIGABRT and the trp looks more informative, attached.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #104 on: November 20, 2022, 05:39:16 am »
I updated the testcase to link against cx, I'm now getting a more informative file too :)

https://smedley.id.au/tmp/qt6helloworld.zip

Exceptq attached with the latest fixes - bit different to yours as mine is now using dlopen :P

Looks to be a fontconfig issue - on this machine, I'm using an old self built version - I'll try with rpm libs once the build on the other machine finishes.