Author Topic: Qt6 Development  (Read 211033 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #360 on: January 07, 2023, 07:14:48 am »
Playing around more with libjpeg and groups led to this
Code: [Select]
  CCLD     libjpeg.la
Error! E2021: size of segment SEG_CONST exceeds 64k by 2000 bytes
Error! E2021: size of segment SEG_TEXT exceeds 64k by 3456 bytes

While reverting the original patch and doing this does get rid of one segment, data or _data is always undeclared causing a build failure.
Code: [Select]
%define SEG_TEXT    _text  align=16 public use32 class=CODE
%define SEG_CONST   _data  align=16 public use32 class=DATA
group CGROUP _text
;group DGROUP _data

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #361 on: January 07, 2023, 07:37:09 am »
Thanks for trying :( I'm trying to build the vpx asm stuff with an older nasm to see if it changes anything....

Edit: older nasm didn't work - wouldn't build some of the included asm...

Edit2:  trying OS4User's definition from https://www.os2world.com/forum/index.php?topic=1735.120

Edit2 reduced text...
Error! E2021: size of segment text exceeds 64k by 338479 byte
Error! E2021: size of segment data exceeds 64k by 8320 bytes

Checking map file, shows no more vpx symbols are in text :) off to look at libjpeg_turbo now :)
« Last Edit: January 07, 2023, 07:44:57 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #362 on: January 07, 2023, 08:23:05 am »
The code above seems to work here. The error,
Code: [Select]
jsimdcpu.asm: error: group `DGROUP' contains undefined segment `_data'seems to be caused due to the file not having a data segment.
Are there any other files that use assembler? Libjpeg, at least older that uses configure, defaults to -fobj on OS/2, cmake wanted to use -felf and I don't know cmake good enough to know how to change it.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #363 on: January 07, 2023, 08:31:27 am »
OK I have a clue with libjpeg_turbo

the code at https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libjpeg_turbo/simd/nasm/jsimdext.inc#L62 wasn't even being run as OBJ32 wasn't defined, so it was reverting to the code at https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libjpeg_turbo/simd/nasm/jsimdext.inc#L105

For now, I've added a separate block:
Code: [Select]
%ifidn __OUTPUT_FORMAT__,obj
%define .text TEXT32
%define .data DATA32
%define SEG_TEXT    .text align=4 public use32 FLAT class=CODE
%define SEG_CONST   .data align=4 public use32 FLAT class=DATA
%endif

sorta based on what worked for libvpx...

Proper  fix will be to update libjpeg_turbo\build.gn to define OBJ32 for os2.....
« Last Edit: January 07, 2023, 08:33:29 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #364 on: January 07, 2023, 08:41:11 am »
Progress...
Error! E2021: size of segment text exceeds 64k by 231071 bytes

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #365 on: January 07, 2023, 09:19:32 am »
Fix for the libvpx symbols is in: https://github.com/psmedley/qt6-webengine-os2/commit/aaee21b9879cead674a26e44f7a6e06424324b6c

FYI - I also created a ninja-os2 repo - https://github.com/psmedley/ninja-os2

I fixed libjpeg_turbo to define OBJ32 for os2, now I have to wait for it to rebuild a bunch of stuff :(

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #366 on: January 07, 2023, 08:48:18 pm »
Map file updated at https://smedley.id.au/tmp/qt6webee.zip

This is with:
creating an OS/2 EMX dynamic link library
Error! E2021: size of segment text exceeds 64k by 231071 bytes

Looking at the map files, there are still some vpx symbols causing issues, as well as some from dav1d

Committing fixes for libjpeg_turbo now...

also aligned the various versions of x86inc.asm and x86_abi_support.asm
« Last Edit: January 07, 2023, 09:42:17 pm by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #367 on: January 07, 2023, 11:23:52 pm »
Something strange happening.. same x86inc.asm changes in libaom and libvpx but libvpx is still using .data :( will investigate after beach walk

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #368 on: January 08, 2023, 01:29:59 am »
OK found some inspiration on the beach walk.

Comparing the libaom and libvpx .asm files - libaom used SECTION_TEXT and libvpx had 'SECTION .text' - so the macro in x86inc.asm wasn't working for obj

After modifying 53 libvpx asm files, I reckon this might work now :) (well link anyway)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #369 on: January 08, 2023, 01:43:27 am »
{0}[u:\dev\qt6-webengine-os2\build] dir lib\*.dll

 Volume in drive U is Dev            Serial number is 62DB:45BE
 Directory of  U:\DEV\qt6-webengine-os2\build\lib\*.dll

 8/01/23  10:08     257,347,330      0  Qt6WebEe.dll
     257,347,330 bytes (245MB) in 1 file and 0 dirs
     257,347,584 bytes (245MB) allocated

Next to make it build via cmake rather than me running a script...

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #370 on: January 08, 2023, 06:44:31 am »
Status of QtWebEngine build:
[100%] Built target spellchecker

Sigurd Fastenrath

  • Hero Member
  • *****
  • Posts: 576
  • Karma: +27/-0
  • OS/2 Versus Hardware - Maximum Warp!
    • View Profile
Re: Qt6
« Reply #371 on: January 08, 2023, 07:11:45 am »
Hi Paul, I do not really have a clue what you are exactly doing hile you compile things, as I do have zero  programming skills, I would like to Tell you that I am really fascinated about what and how you are dringend it.

It is very interesting to follow your progress and I only can say Thank you so much for this and your tremendous work and your willing to share your thoughts, Problems and progress!

I can read and feel your emotions between the lines!

I guess "100%" is a good sign and so I will send you some bucks for your Hard and interesting work, that you share!

All the best and keep going!!

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #372 on: January 08, 2023, 07:21:00 am »
So I have some good news, and some bad (for now) news.

The good news is that QtWebEngine built 100%. Some elements are a PITA and still require some manual intervention. Earlier today, I could even 'lxlite' the resulting QtWebEe.dll and reduce it from ~250mb to ~150mb.

I was also able to build dooble 2022.12.25 using Qt6 :)

BUT... (this is the bad (for now) news).

Running Dooble, I get:
Code: [Select]
{0}[u:\dev\dooble-2022.12.25] dooble
SYS0008: There is not enough memory available to process this command.
All available memory is in use. "QT6WEBEE"

And running lxlite on the DLL, I get:
Code: [Select]
Ú[ lxLite ]ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂ[ Version 1.3.9 ]¿
à Copyright 1996,97 by FRIENDS software       Ã    All rights   ´
à Copyright 2001,03 by Max Alekseyev          à    reserved    ´
à Copyright 2008-10 by OS/4 team              à                ´
à Copyright 2011    by Steven H. Levine       Ã                 ´
à Copyright 2017    by bww bitwise works GmbH ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
À Processing file Qt6WebEe.dll
à FATAL: Internal error 203 at 0001AF0C in lxLite version 1.3.9
À Please report to author

I've set a full rebuilt going of Qt6WebEngineCore - so when that finishes (might not be until after I go to bed), I'll rebuild Qt6WebEe.dll and hopefully I might have something worth sharing :)

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Qt6
« Reply #373 on: January 08, 2023, 07:40:48 am »
Good to hear you got to the end. Hopefully the memory problems can be overcome. Wonder if there are any compile flags to limit memory use, as well as disabling things such as AVX* and who knows what else.
Perhaps also externalizing dependencies.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2092
  • Karma: +159/-0
    • View Profile
Re: Qt6
« Reply #374 on: January 08, 2023, 07:45:48 am »
I'm tending to think the memory issue is more related to the issue lxlite is reporting, just annoying as earlier today I could successfully lxlite the dll :(