Author Topic: Qt6 Development  (Read 248446 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #60 on: November 16, 2022, 09:26:15 am »
Sure enough, I made a typo that I didn't notice in my 'git commit' command.

Fixed now, and I fixed several build errors in platforms/os2

Still have errors building:
qos2clipboard.o
qos2keymapper.o
qos2mime.o

Will work through them as time permits, PR's welcome :)

Logs attached for those that are better at c++ at me and might have ideas :)
« Last Edit: November 16, 2022, 10:06:42 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #61 on: November 16, 2022, 09:39:43 am »
hmmm this code is wrapped around QT_NO_IPV6 which should be defined... I'll investigate...

You could try adding:
Code: [Select]
qt_internal_extend_target(Network CONDITION os2
    DEFINES
        QT_NO_IPV6
)

to src/network/CMakeLists.txt

Hi Paul,

I did a clean build with the latest changes, but now configure stops....

I committed a fix for this.

TeLLie

  • Full Member
  • ***
  • Posts: 237
  • Karma: +12/-0
    • View Profile
Re: Qt6
« Reply #62 on: November 16, 2022, 06:05:01 pm »
Hi PAul

I did a fresh pull
And now its running ahead again :P

But failed here:

117/368] Automatic MOC and UIC for target Widgets
FAILED: src/widgets/CMakeFiles/Widgets_autogen src/widgets/Widgets_autogen/mocs_compilation.cpp
cd G:/Qt6-dev/src/widgets && H:/usr/local1220/bin/cmake.exe -E cmake_autogen G:/Qt6-dev/src/widgets/CMakeFiles/Widgets_autogen.dir/AutogenInfo.json Release

AutoUic subprocess error
------------------------
The uic process failed to compile
  "SRC:/src/widgets/dialogs/qfiledialog.ui"
into
  "BIN:/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:/Qt6-dev/bin/uic.exe -o G:/Qt6-dev/src/widgets/Widgets_autogen/include/ui_qfiledialog.h G:/qt6-os2/src/widgets/dialogs/qfiledialog.ui

Output
------


[118/368] Linking CXX shared module plugins/platforms/qminimal.dll
FAILED: plugins/platforms/qminimal.dll
: && h:/usr/local1220/bin/g++.exe -O2 -g -march=i686 -DNDEBUG -O2   -Zomf -Zdll -Zmap  -Zlinker DISABLE -Zlinker 1121 -lpthread -lcx -Zhigh-mem -Zmap -Zomf -llibstdc++ -Zdll -o plugins/platforms/qminimal.dll  src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/QMinimalIntegrationPlugin_autogen/mocs_compilation.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/main.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/qminimalbackingstore.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/qminimalintegration.cpp.o  lib/Qt6Gui_dll.a  lib/Qt6Core_dll.a  H:/USR/LOCAL1220/lib/freetype_dll.a && :
weakld: error: Unresolved symbol (UNDEF) '__ZTV19QFontconfigDatabase'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_qminimalintegration_cpp_o_1e4663751228165130.obj
weakld: error: Unresolved symbol (UNDEF) '__ZN23QtGenericUnixDispatcher25createUnixEventDispatcherEv'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_qminimalintegration_cpp_o_1e4663751228165130.obj



When i run uic i get popup with:
    File not found
     LIB/QT6CORE6
  [ OK ]  [ Cancel ]

Should it not looking for just Qt6Core6.dll and not for lib/Qt6Core6.dll

G:\Qt6-dev\bin>chkdll32 uic.exe
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'lib/Qt6Core6' --> NOT loaded!
Unable to load DLL 'lib/Qt6Core6'.  DosLoadModule returned: 3
OS/2 reports 'G:\QT6-DEV\BIN\LIB\QT6CORE6' contributed to the failure.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4831
  • Karma: +101/-1
    • View Profile
Re: Qt6
« Reply #63 on: November 17, 2022, 12:04:35 am »
I'm still dying in src/plugins/paltforms/os2/qos2clipboard.cpp. Looks like the define QT_NO_FOREACH in CMakeLists.txt isn't getting picked up. It definitely needed adding if it is compiling for you.
Last error,
Code: [Select]
K:/work/qt6-os2/src/plugins/platforms/os2/qos2clipboard.cpp:384:17: error: 'foreach' was not declared in this scope; did you mean 'fread'?
  384 |                 foreach(QOS2Mime::Match match, matches)
      |                 ^~~~~~~
      |                 fread
make[2]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o] Error 1
make[1]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/all] Error 2
« Last Edit: November 17, 2022, 12:07:01 am by Dave Yeo »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #64 on: November 17, 2022, 12:29:29 am »
Hi PAul

I did a fresh pull
And now its running ahead again :P

But failed here:

117/368] Automatic MOC and UIC for target Widgets
FAILED: src/widgets/CMakeFiles/Widgets_autogen src/widgets/Widgets_autogen/mocs_compilation.cpp
cd G:/Qt6-dev/src/widgets && H:/usr/local1220/bin/cmake.exe -E cmake_autogen G:/Qt6-dev/src/widgets/CMakeFiles/Widgets_autogen.dir/AutogenInfo.json Release

AutoUic subprocess error
------------------------
The uic process failed to compile
  "SRC:/src/widgets/dialogs/qfiledialog.ui"
into
  "BIN:/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:/Qt6-dev/bin/uic.exe -o G:/Qt6-dev/src/widgets/Widgets_autogen/include/ui_qfiledialog.h G:/qt6-os2/src/widgets/dialogs/qfiledialog.ui

Output
------


[118/368] Linking CXX shared module plugins/platforms/qminimal.dll
FAILED: plugins/platforms/qminimal.dll
: && h:/usr/local1220/bin/g++.exe -O2 -g -march=i686 -DNDEBUG -O2   -Zomf -Zdll -Zmap  -Zlinker DISABLE -Zlinker 1121 -lpthread -lcx -Zhigh-mem -Zmap -Zomf -llibstdc++ -Zdll -o plugins/platforms/qminimal.dll  src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/QMinimalIntegrationPlugin_autogen/mocs_compilation.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/main.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/qminimalbackingstore.cpp.o src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/qminimalintegration.cpp.o  lib/Qt6Gui_dll.a  lib/Qt6Core_dll.a  H:/USR/LOCAL1220/lib/freetype_dll.a && :
weakld: error: Unresolved symbol (UNDEF) '__ZTV19QFontconfigDatabase'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_qminimalintegration_cpp_o_1e4663751228165130.obj
weakld: error: Unresolved symbol (UNDEF) '__ZN23QtGenericUnixDispatcher25createUnixEventDispatcherEv'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_qminimalintegration_cpp_o_1e4663751228165130.obj



When i run uic i get popup with:
    File not found
     LIB/QT6CORE6
  [ OK ]  [ Cancel ]

Should it not looking for just Qt6Core6.dll and not for lib/Qt6Core6.dll

G:\Qt6-dev\bin>chkdll32 uic.exe
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'lib/Qt6Core6' --> NOT loaded!
Unable to load DLL 'lib/Qt6Core6'.  DosLoadModule returned: 3
OS/2 reports 'G:\QT6-DEV\BIN\LIB\QT6CORE6' contributed to the failure.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.

the qminimal issue should be fixed in git....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #65 on: November 17, 2022, 12:30:08 am »
Hey Dave,

I'm still dying in src/plugins/paltforms/os2/qos2clipboard.cpp. Looks like the define QT_NO_FOREACH in CMakeLists.txt isn't getting picked up. It definitely needed adding if it is compiling for you.
Last error,
Code: [Select]
K:/work/qt6-os2/src/plugins/platforms/os2/qos2clipboard.cpp:384:17: error: 'foreach' was not declared in this scope; did you mean 'fread'?
  384 |                 foreach(QOS2Mime::Match match, matches)
      |                 ^~~~~~~
      |                 fread
make[2]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o] Error 1
make[1]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/all] Error 2

These two aren't building for me...
qos2clipboard.o
qos2mime.o

Cheers,

Paul.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4831
  • Karma: +101/-1
    • View Profile
Re: Qt6
« Reply #66 on: November 17, 2022, 05:49:20 am »
Hey Dave,

I'm still dying in src/plugins/paltforms/os2/qos2clipboard.cpp. Looks like the define QT_NO_FOREACH in CMakeLists.txt isn't getting picked up. It definitely needed adding if it is compiling for you.
Last error,
Code: [Select]
K:/work/qt6-os2/src/plugins/platforms/os2/qos2clipboard.cpp:384:17: error: 'foreach' was not declared in this scope; did you mean 'fread'?
  384 |                 foreach(QOS2Mime::Match match, matches)
      |                 ^~~~~~~
      |                 fread
make[2]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o] Error 1
make[1]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/all] Error 2

These two aren't building for me...
qos2clipboard.o
qos2mime.o

Cheers,

Paul.

Well, at least I'm not alone.
I note that at the end of configure, it says something about since we're using makefiles, which aren't really tested well, we're on our own as really we should be using Ninja. Perhaps that is the problem with defines not getting picked up.
Chromium itself is built with the intree Ninja with Qt5. Need to look into that.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #67 on: November 17, 2022, 09:22:39 am »
Hey Dave,

Hey Dave,

I'm still dying in src/plugins/paltforms/os2/qos2clipboard.cpp. Looks like the define QT_NO_FOREACH in CMakeLists.txt isn't getting picked up. It definitely needed adding if it is compiling for you.
Last error,
Code: [Select]
K:/work/qt6-os2/src/plugins/platforms/os2/qos2clipboard.cpp:384:17: error: 'foreach' was not declared in this scope; did you mean 'fread'?
  384 |                 foreach(QOS2Mime::Match match, matches)
      |                 ^~~~~~~
      |                 fread
make[2]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o] Error 1
make[1]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/all] Error 2

These two aren't building for me...
qos2clipboard.o
qos2mime.o

Well, at least I'm not alone.
I note that at the end of configure, it says something about since we're using makefiles, which aren't really tested well, we're on our own as really we should be using Ninja. Perhaps that is the problem with defines not getting picked up.
Chromium itself is built with the intree Ninja with Qt5. Need to look into that.

re: foreach, it's actually the OPPOSITE problem.

QT_NO_FOREACH is defined in build\src\plugins\platforms\os2\CMakeFiles\qos2.dir\build.make - removing that definition from src\plugins\platforms\os2\cmakelists.txt eliminates most of the errors from qos2clipboard.cpp

I'm down to one error that I need to work out how to fix:
Code: [Select]
[ 39%] Building CXX object src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o
U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/qos2clipboard.cpp:178:36: error: cannot declare field 'QOS2ClipboardData::retrievalData' to be of abstract type 'QOS2ClipboardRetrievalMimeData'
  178 |     QOS2ClipboardRetrievalMimeData retrievalData;
      |                                    ^~~~~~~~~~~~~
U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/qos2clipboard.cpp:54:7: note:   because the following virtual functions are pure within 'QOS2ClipboardRetrievalMimeData':
   54 | class QOS2ClipboardRetrievalMimeData : public QInternalMimeData
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/include/QtGui/6.2.4/QtGui/private/qinternalmimedata_p.h:1,
                 from U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/qos2clipboard.h:47,
                 from U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/qos2clipboard.cpp:42:
U:/dev/qtbase-everywhere-src-6.2.4/src/gui/kernel/qinternalmimedata_p.h:88:22: note:     'virtual QVariant QInternalMimeData::retrieveData_sys(const QString&, QMetaType) const'
   88 |     virtual QVariant retrieveData_sys(const QString &mimeType, QMetaType type) const = 0;
      |                      ^~~~~~~~~~~~~~~~
make[1]: *** [src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin.dir/qos2clipboard.cpp.o] Error 1
make: *** [qos2clipboard.cpp.o] Error 2
Cheers,

Paul
« Last Edit: November 17, 2022, 09:55:35 am by Paul Smedley »

TeLLie

  • Full Member
  • ***
  • Posts: 237
  • Karma: +12/-0
    • View Profile
Re: Qt6
« Reply #68 on: November 17, 2022, 09:27:53 am »
Hi,
I use cmake --build and then ninja got involved i think it's using the ninja from the qt5 build...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #69 on: November 17, 2022, 09:50:32 am »
Hi,
I use cmake --build and then ninja got involved i think it's using the ninja from the qt5 build...

I'd imagine if it can find ninja in the path, it will use it...

TeLLie

  • Full Member
  • ***
  • Posts: 237
  • Karma: +12/-0
    • View Profile
Re: Qt6
« Reply #70 on: November 17, 2022, 07:11:53 pm »
Hi Paul,

Still struggeling with the dll's
I have now a qmake.exe but it cannot start because it needs lib/qt6core6.dll

So far i have:

androiddeployqt.exe
cmake_automoc_parser.exe
moc.exe
qdbuscpp2xml.exe
qdbusxml2cpp.exe
qlalr.exe
qmake.exe
qtpaths.exe
qvkgen.exe
rcc.exe
tracegen.exe
uic.exe

and
Qt6Conc6.dll
Qt6Core6.dll
Qt6DBus6.dll
Qt6Gui6.dll
Qt6Netw6.dll
Qt6Sql6.dll
Qt6Test6.dll
Qt6Xml6.dll

Could you check if that also the case if that happens for you ??
Otherwise there is something wrong on my side??

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #71 on: November 17, 2022, 08:56:17 pm »
Hey Tellie,

As I mentioned a few pages ago, there is some kind of error with the generated DLLs that will need to be debugged.

For example, running ..\bin\uic.exe from build\lib, I get a silent command line, but in c:\popuplog.os2, I get:
Code: [Select]
11-18-2022  06:24:23  SYS3175  PID b583  TID 0001  Slot 0083
U:\DEV\QTBASE-EVERYWHERE-SRC-6.2.4\BUILD\BIN\UIC.EXE
c0000005
0d0e4aab
P1=00000010  P2=ffffffff  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000002  EBX=000038ac  ECX=00000001  EDX=b5830001
ESI=001af9c0  EDI=0d7aa0a8 
DS=0053  DSACC=d0f3  DSLIM=7fffffff 
ES=0053  ESACC=d0f3  ESLIM=7fffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:0d0e4aab  CSACC=d0df  CSLIM=7fffffff
SS:ESP=0053:001af970  SSACC=d0f3  SSLIM=7fffffff
EBP=001af9e8  FLG=00012202

QT6CORE6.DLL 0001:00214aab


My current focus is to get the rest of qtbase building, then I'll worry about attempting to get it actually working.

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4831
  • Karma: +101/-1
    • View Profile
Re: Qt6
« Reply #72 on: November 18, 2022, 12:52:42 am »
So tried putting ninja.exe on the PATH and it was picked up, build eventually failed due to needing lib/Qt6Core.DLL, an illegal DLL name. So that's Tellie's problem, using Ninja.
Back to trying with GCC 9.2.0, networking broke again due to trying to use IPv6. UIC.exe seems to work,
Code: [Select]
K:\work\qt6-os2\build\bin>uic.exe --help
Usage: K:\work\qt6-os2\build\bin\uic.exe [options] [uifile]
Qt User Interface Compiler version 6.2.4

Options:
  -h, --help                      Displays help on commandline options.
  --help-all                      Displays help including Qt specific options.
  -v, --version                   Displays version information.
  -d, --dependencies              Display the dependencies.
  -o, --output <file>             Place the output into <file>
  -a, --no-autoconnection         Do not generate a call to
                                  QObject::connectSlotsByName().
  -p, --no-protection             Disable header protection.
  -n, --no-implicit-includes      Disable generation of #include-directives.
  --postfix <postfix>             Postfix to add to all generated classnames.
  --tr, --translate <function>    Use <function> for i18n.
  --include <include-file>        Add #include <include-file> to <file>.
  -g, --generator <python|cpp>    Select generator.
  -c, --connections <pmf|string>  Connection syntax.
  --idbased                       Use id based function for i18n
  --from-imports                  Python: generate imports relative to '.'
  --star-imports                  Python: Use * imports

Arguments:
  [uifile]                        Input file (*.ui), otherwise stdin.

Nothing in popuplog.os2 related to the build.
It now dies trying to compile ipv6 code in src/plugins/tls/openssl. I'll add the define if I can figure out where.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2106
  • Karma: +163/-0
    • View Profile
Re: Qt6
« Reply #73 on: November 18, 2022, 04:24:59 am »
I don't think I've got as far as building the TLS plugin yet....

It could also be due to a patch I haven't applied yet....

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4831
  • Karma: +101/-1
    • View Profile
Re: Qt6
« Reply #74 on: November 18, 2022, 05:35:07 am »
I don't think I've got as far as building the TLS plugin yet....

It could also be due to a patch I haven't applied yet....

The problem is actually in the same network headers as the previous problems. Can't see where to add the define so for now added it to C(XX)FLAGS. We'll see.
I'm also using -j5 now so there are actually more build breaks such as the clipboard one, just the TLS one was at the bottom of the build log.