Author Topic: Qt6 Development  (Read 168678 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #330 on: January 03, 2023, 11:37:12 am »
Ok, QtWebEngineCore built - which I think is the chromium bits .

Rerunning cmake from the top level directory gives a bunch of missing symbols attempting to make a dll. Log attached.

Will investigate tomorrow.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #331 on: January 04, 2023, 08:42:10 am »
Yea, I got confused at first thinking that Qt5 could use cmake. Building Qt6Core.dll I see in Qt6Core.dll.def,
Code: [Select]
LIBRARY "lib/Qt6Core.dll" INITINSTANCE TERMINSTANCE
DESCRIPTION "@#cmake build system:0.0#@##1## 01 Jan 2023 22:40:17     ARCAOS-44454C4::::0::@@Core"
DATA MULTIPLE NONSHARED
So not fixed.

Try https://smedley.id.au/tmp/cmake-exe-3.19.8-os2-20230104.zip

I now get:
Code: [Select]
LIBRARY "Qt6Core" INITINSTANCE TERMINSTANCE
DESCRIPTION "@#cmake build system:0.0#@##1## 04 Jan 2023 16:26:19     SMEDLES::::0::@@Core"
DATA MULTIPLE NONSHARED

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #332 on: January 04, 2023, 08:46:27 am »
Ok, QtWebEngineCore built - which I think is the chromium bits .

Rerunning cmake from the top level directory gives a bunch of missing symbols attempting to make a dll. Log attached.

Will investigate tomorrow.

OK haven't made it very far with this today.

A couple of observations:
1) I get some left over .rsp files in the build/core/Release/i386 directory:
Code: [Select]
convert_dict_archives.rsp
convert_dict_libs.rsp
convert_dict_objects.rsp
QtWebEngineCore_archives.rsp
QtWebEngineCore_libs.rsp
QtWebEngineCore_objects.rsp
I would think I should also have some product 'convert_dict' and 'QtWebEngineCore' but no.

2) The missing symbols from the stdout I posted are from object files that are contained in QtWebEngineCore_objects.rsp - so I think I need to work out why ninja isn't generating a DLL/exe/ib/something....

I'm building QtWebEngine 6.2.4 on linux so as to have something to compare to - I definitely have an executable convert_dict....

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4752
  • Karma: +96/-1
    • View Profile
Re: Qt6
« Reply #333 on: January 04, 2023, 07:02:25 pm »
Yea, I got confused at first thinking that Qt5 could use cmake. Building Qt6Core.dll I see in Qt6Core.dll.def,
Code: [Select]
LIBRARY "lib/Qt6Core.dll" INITINSTANCE TERMINSTANCE
DESCRIPTION "@#cmake build system:0.0#@##1## 01 Jan 2023 22:40:17     ARCAOS-44454C4::::0::@@Core"
DATA MULTIPLE NONSHARED
So not fixed.

Try https://smedley.id.au/tmp/cmake-exe-3.19.8-os2-20230104.zip

I now get:
Code: [Select]
LIBRARY "Qt6Core" INITINSTANCE TERMINSTANCE
DESCRIPTION "@#cmake build system:0.0#@##1## 04 Jan 2023 16:26:19     SMEDLES::::0::@@Core"
DATA MULTIPLE NONSHARED

I get the same library name. Build continues

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #334 on: January 05, 2023, 12:20:44 am »
Quick update:
I'm building qtwebengine under Linux so as to compare the build command lines, and try and work out why I'm getting missing symbols. That should finish this morning.

My NUC will be delivered today, so hopefully I should be able to generate failing builds more quickly soon :)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4752
  • Karma: +96/-1
    • View Profile
Re: Qt6
« Reply #335 on: January 05, 2023, 01:49:19 am »
Once I remembered to set BEGINLIBPATH, the build of qt6core finished here.
Now to see how far I can get with the latest Qt5 from Bitwise with your nodejs.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #336 on: January 05, 2023, 03:32:09 am »
Cool, I'll also have to do some benchmarks or building qt6core with ninja vs makefiles...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #337 on: January 05, 2023, 08:15:51 am »
For interest... differences in command lines OS/2 to linux to create QtWebEngineCore.dll/.so
OS/2 Command line:
Code: [Select]
cd U:/DEV/qt6-webengine-os2/build/src/core/api && echo LIBRARY \"Qt6WebEe\" INITINSTANCE TERMINSTANCE > ../../../lib/Qt6WebEe.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 09 Dec 2022 15:44:45\ \ \ \ \ ARCAOS-F0FD356::::0::@@WebEngineCore\" >> ../../../lib/Qt6WebEe.def && echo DATA MULTIPLE NONSHARED >> ../../../lib/Qt6WebEe.def && C:/USR/BIN/c++.exe -DNDEBUG -O2   -Zomf -Zmap -Zdll -Zlinker DISABLE -Zlinker 1121 -lcx -shared -o ../../../lib/Qt6WebEe.dll  @CMakeFiles/WebEngineCore.dir/objects1.rsp  U:/qt6/lib/Qt6Quick_dll.a U:/qt6/lib/Qt6Gui_dll.a U:/qt6/lib/Qt6QmlModels_dll.a U:/qt6/lib/Qt6Qml_dll.a U:/qt6/lib/Qt6Network_dll.a U:/qt6/lib/Qt6WebChannel_dll.a U:/qt6/lib/Qt6Core_dll.a -lpthread  ../../../lib/Qt6WebEe.def && emximp -o ../../../lib/Qt6WebEngineCore_dll.a ../../../lib/Qt6WebEe.dll

Linux:
Code: [Select]
/home/psmedley/qtwebengine-everywhere-src-6.2.4/build/linker_ulimit.sh /usr/bin/c++ -fPIC -DNDEBUG -O2 -Wl,-Bsymbolic-functions -Wl,--no-undefined @/home/psmedley/qtwebengine-everywhere-src-6.2.4/build/src/core/Release/x86_64/QtWebEngineCore_objects.rsp -Wl,--enable-new-dtags -shared -Wl,-soname,libQt6WebEngineCore.so.6 -o ../../../lib/libQt6WebEngineCore.so.6.2.4 CMakeFiles/WebEngineCore.dir/WebEngineCore_autogen/mocs_compilation.cpp.o CMakeFiles/WebEngineCore.dir/qtwebenginecoreglobal.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginecertificateerror.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineclientcertificateselection.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineclientcertificatestore.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginecontextmenurequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginecookiestore.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginedownloadrequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginefindtextresult.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginefullscreenrequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginehistory.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginehttprequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineloadinginfo.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginemessagepumpscheduler.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginenavigationrequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginenewwindowrequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginenotification.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginepage.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineprofile.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginequotarequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineregisterprotocolhandlerrequest.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginescript.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginescriptcollection.cpp.o CMakeFiles/WebEngineCore.dir/qwebenginesettings.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineurlrequestinfo.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineurlrequestjob.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineurlscheme.cpp.o CMakeFiles/WebEngineCore.dir/qwebengineurlschemehandler.cpp.o  -Wl,-rpath,/usr/local/Qt-6.2.4/lib:::::::: -Wl,--start-group @/home/psmedley/qtwebengine-everywhere-src-6.2.4/build/src/core/Release/x86_64/QtWebEngineCore_archives.rsp -Wl,--end-group -Wl,--no-fatal-warnings @/home/psmedley/qtwebengine-everywhere-src-6.2.4/build/src/core/Release/x86_64/QtWebEngineCore_libs.rsp -Wl,--no-fatal-warnings /usr/lib/x86_64-linux-gnu/libxkbcommon.so /usr/local/Qt-6.2.4/lib/libQt6Quick.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6OpenGL.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6Gui.so.6.2.4 /usr/lib/x86_64-linux-gnu/libGLX.so /usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/local/Qt-6.2.4/lib/libQt6QmlModels.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6Qml.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6Network.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6WebChannel.so.6.2.4 /usr/local/Qt-6.2.4/lib/libQt6Core.so.6.2.4 -Wl,-rpath-link,/usr/local/Qt-6.2.4/lib

The key, is the references to:
QtWebEngineCore_objects.rsp
QtWebEngineCore_libs.rsp
QtWebEngineCore_archives.rsp

I'm not sure yet why this stuff isn't making it to the link command on OS/2 for now, I think I'm going to create a shell script to link it manually :)

Edit: the following might do it...
Code: [Select]
cd U:/DEV/qt6-webengine-os2/build/src/core/api && echo LIBRARY \"Qt6WebEe\" INITINSTANCE TERMINSTANCE > ../../../lib/Qt6WebEe.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 09 Dec 2022 15:44:45\ \ \ \ \ ARCAOS-F0FD356::::0::@@WebEngineCore\" >> ../../../lib/Qt6WebEe.def && echo DATA MULTIPLE NONSHARED >> ../../../lib/Qt6WebEe.def && C:/USR/BIN/c++.exe -DNDEBUG -O2   -Zomf -Zmap -Zdll -Zlinker DISABLE -Zlinker 1121 -lcx -shared -o ../../../lib/Qt6WebEe.dll  @u:/dev/qt6-webengine-os2/build/src/core/Release/i386/QtWebEngineCore_objects.rsp @CMakeFiles/WebEngineCore.dir/objects1.rsp  U:/qt6/lib/Qt6Quick_dll.a U:/qt6/lib/Qt6Gui_dll.a U:/qt6/lib/Qt6QmlModels_dll.a U:/qt6/lib/Qt6Qml_dll.a U:/qt6/lib/Qt6Network_dll.a U:/qt6/lib/Qt6WebChannel_dll.a U:/qt6/lib/Qt6Core_dll.a @u:/dev/qt6-webengine-os2/build/src/core/Release/i386/QtWebEngineCore_archives.rsp @u:/dev/qt6-webengine-os2/build/src/core/Release/i386/QtWebEngineCore_libs.rsp -lpthread  ../../../lib/Qt6WebEe.def && emximp -o ../../../lib/Qt6WebEngineCore_dll.a ../../../lib/Qt6WebEe.dll
« Last Edit: January 05, 2023, 08:24:41 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #338 on: January 05, 2023, 08:47:23 am »
OK the above got me 147 missing symbols, plus the following that I've never seen before:
Error! E2021: size of segment text exceeds 64k by 393007 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

Working on missing symbols now...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #339 on: January 05, 2023, 08:56:56 am »
After a couple of lucky guesses as to libraries to add to the link command, I'm down to:
Code: [Select]
creating an OS/2 EMX dynamic link library
Error! E2028: __ZN2ui28GenerateDomKeyboardLayoutMapB5cxx11Ev is an undefined reference
Error! E2028: __ZN6device15TimeZoneMonitor6CreateE13scoped_refptrIN4base19SequencedTaskRunnerEE is an undefined reference
Error! E2028: __ZN4base7SysInfo12CPUModelNameB5cxx11Ev is an undefined reference
Error! E2028: __ZN10extensions15CpuInfoProvider24QueryCpuTimePerProcessorEPSt6vectorINS_3api10system_cpu13ProcessorInfoESaIS4_EE is an undefined reference
Error! E2028: _setproctitle is an undefined reference
Error! E2028: __ZNK4base7Process21IsProcessBackgroundedEv is an undefined reference
Error! E2028: __ZN7tracing20SystemTracingServiceC1Ev is an undefined reference
Error! E2028: __ZN7tracing20SystemTracingService24BindAndPassPendingRemoteEv is an undefined reference
Error! E2028: __ZN8printing24GetIppColorModelForModelB5cxx11ENS_5mojom10ColorModelE is an undefined reference
Error! E2028: __ZN4base11ModuleCache22CreateModuleForAddressEj is an undefined reference
Error! E2028: __ZN5media28VideoCaptureDeviceFactoryOS214GetDevicesInfoEN4base12OnceCallbackIFvSt6vectorINS_22VideoCaptureDeviceInfoESaIS4_EEEEE is an undefined reference
Error! E2028: __ZN15storage_monitor14StorageMonitor14CreateInternalEv is an undefined reference
Error! E2028: __ZN2ui23AddNativeCoreColorMixerEPNS_13ColorProviderEb is an undefined reference
Error! E2028: __ZN2ui21AddNativeUiColorMixerEPNS_13ColorProviderEb is an undefined reference
Error! E2028: __ZN7content15TtsPlatformImpl11GetInstanceEv is an undefined reference
Error! E2028: __ZN4base7Process22CanBackgroundProcessesEv is an undefined reference
Error! E2028: __ZN4base7Process22SetProcessBackgroundedEb is an undefined reference
Error! E2028: _fseeko64 is an undefined reference
Error! E2028: _ftello64 is an undefined reference
Error! E2028: _fopen64 is an undefined reference
Error! E2021: size of segment text exceeds 64k by 393007 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4752
  • Karma: +96/-1
    • View Profile
Re: Qt6
« Reply #340 on: January 05, 2023, 07:24:35 pm »
Looks to me like a lot of stuff needs implemented or stubbed as well as there is some 16bit assembly somewhere.
Randomly choosing a symbol, CpuInfoProvider, I see,
Code: [Select]
The volume label in drive K is Unixroot.
The Volume Serial Number is 2CFE:A5C0.
Directory of K:\work\qt5\qt5-os2\qtwebengine\src\3rdparty\chromium\extensions\br
owser\api\system_cpu

 1-03-23  9:36p         <DIR>    124 ----  .
 1-03-23  9:36p         <DIR>    124 ----  ..
 1-03-23  9:36p         1,185    124 a---  BUILD.gn
 1-03-23  9:36p         2,771    124 a---  cpu_info_provider.cc
 1-03-23  9:36p         1,959    124 a---  cpu_info_provider.h
 1-03-23  9:36p         2,225    124 a---  cpu_info_provider_linux.cc
 1-03-23  9:36p         2,455    124 a---  cpu_info_provider_mac.cc
 1-03-23  9:36p         2,723    124 a---  cpu_info_provider_win.cc
 1-03-23  9:36p            19    124 a---  OWNERS
 1-03-23  9:36p         1,034    124 a---  system_cpu_api.cc
 1-03-23  9:36p           882    124 a---  system_cpu_api.h
 1-03-23  9:36p         1,712    124 a---  system_cpu_apitest.cc
       12 file(s)      16,965 bytes used
                  146,329,600 K bytes free

Hopefully a lot of this stuff can just be stubbed for now.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #341 on: January 05, 2023, 08:51:22 pm »
..and then there were 9...
Code: [Select]
creating an OS/2 EMX dynamic link library
Error! E2028: __ZN2ui28GenerateDomKeyboardLayoutMapB5cxx11Ev is an undefined reference
Error! E2028: __ZN6device15TimeZoneMonitor6CreateE13scoped_refptrIN4base19SequencedTaskRunnerEE is an undefined reference
Error! E2028: __ZN4base7SysInfo12CPUModelNameB5cxx11Ev is an undefined reference
Error! E2028: __ZN10extensions15CpuInfoProvider24QueryCpuTimePerProcessorEPSt6vectorINS_3api10system_cpu13ProcessorInfoESaIS4_EE is an undefined reference
Error! E2028: __ZNK4base7Process21IsProcessBackgroundedEv is an undefined reference
Error! E2028: __ZN4base11ModuleCache22CreateModuleForAddressEj is an undefined reference
Error! E2028: __ZN15storage_monitor14StorageMonitor14CreateInternalEv is an undefined reference
Error! E2028: __ZN4base7Process22CanBackgroundProcessesEv is an undefined reference
Error! E2028: __ZN4base7Process22SetProcessBackgroundedEb is an undefined reference
Error! E2021: size of segment text exceeds 64k by 393007 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

What do you mean about 16bit ASM? is that in reference to the E2021?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4752
  • Karma: +96/-1
    • View Profile
Re: Qt6
« Reply #342 on: January 05, 2023, 10:05:59 pm »
What do you mean about 16bit ASM? is that in reference to the E2021?

I think so. Segment text shouldn't be limited to 64K if 32 bit flat

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2086
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #343 on: January 06, 2023, 01:14:50 am »
Thanks - found some local hacks to https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/x86_abi_support.asm that may be the cause - probably from when I was messing around with libvpx.

Had to tweak some .gn files which triggered ninja to think it needed to rebuild 10000+ files, currently at:
[1253/1528] then will see the status of the DLL - should be down to < a handful of missing symbols. Heading out to lunch soon though, so won't see progress til we get home.

Code: [Select]
Error! E2028: __ZN2ui27KeyboardLayoutEngineManager23keyboard_layout_engine_E is an undefined reference
Error! E2028: __ZN4base11ModuleCache22CreateModuleForAddressEj is an undefined reference
Error! E2028: __ZN15storage_monitor14StorageMonitor14CreateInternalEv is an undefined reference
Error! E2021: size of segment text exceeds 64k by 470127 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

OK so the libaom wasn't it... more later
« Last Edit: January 06, 2023, 02:05:58 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4752
  • Karma: +96/-1
    • View Profile
Re: Qt6
« Reply #344 on: January 06, 2023, 04:33:10 am »
Thanks - found some local hacks to https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libaom/source/libaom/aom_ports/x86_abi_support.asm that may be the cause - probably from when I was messing around with libvpx.

OK so the libaom wasn't it... more later

Do you have map files? They should show you the segments
Edit: removed a mistake
« Last Edit: January 06, 2023, 08:10:04 am by Dave Yeo »