Author Topic: Qt6 Development  (Read 27100 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #240 on: December 10, 2022, 04:53:51 am »
In https://github.com/psmedley/qt6-webengine-os2/commit/3e1652310ddb3fb06e937e7786093babd8c7893e I hacked around the requirement for nodejs in the cmake configure script, and also enabled the GNU Compiler for OS2.

This at least allows me to get to the point where configure thinks we meet all the requirements and allows us to start compiling things.

Of course it broke almost immediately, but that's OK, I already know I have a bunch of partially applied diffs to fix :)

Edit: I got a gn.exe :) it fails on generating build files though:
Code: [Select]
  -- GN FAILED

  ERROR Can't create the build dir.

  I could not create the build dir
  "U:/dev/qt6-webengine-os2/build/U:/DEV/qt6-webengine-os2/build/src/core/Release/i386/".

The gn code got restructed quite a bit, so there are diffs missing... going hunting now...

OK all gn patches applied now. https://github.com/psmedley/qt6-webengine-os2/commits/main shows the commits.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #241 on: December 10, 2022, 07:22:52 am »
A bunch more commits later, and there's enough hacks in place to make gn and ninja happy that we're ready to start compiling.... We didn't get very far :)
Code: [Select]
[1/25370] STAMP obj/base/allocator/allocator.stamp
[2/25370] STAMP obj/base/numerics/base_numerics.stamp
[3/25370] CXX obj/base/third_party/double_conversion/double_conversion/bignum-dtoa.o
[4/25370] ACTION //base:build_date(//build/toolchain/os2:x86)
[5/25370] STAMP obj/base/build_date.stamp
[6/25370] ACTION //base:base__jumbo_merge(//build/toolchain/os2:x86)
[7/25370] STAMP obj/base/base__jumbo_merge.stamp
[8/25370] CXX obj/base/third_party/double_conversion/double_conversion/cached-powers.o
[9/25370] CXX obj/base/third_party/double_conversion/double_conversion/double-to-string.o
[10/25370] CXX obj/base/third_party/double_conversion/double_conversion/fast-dtoa.o
[11/25370] CXX obj/base/third_party/double_conversion/double_conversion/bignum.o
[12/25370] CXX obj/base/third_party/double_conversion/double_conversion/strtod.o
[13/25370] CXX obj/base/third_party/double_conversion/double_conversion/fixed-dtoa.o
[14/25370] CC obj/base/third_party/libevent/bundled_libevent/buffer.o
FAILED: obj/base/third_party/libevent/bundled_libevent/buffer.o
gcc -MMD -MF obj/base/third_party/libevent/bundled_libevent/buffer.o.d -DHAVE_CONFIG_H -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../../../../src/3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-unknown-pragmas -Wno-parentheses -Wno-sign-compare -Wno-stringop-overflow -Wno-stringop-overread -Wno-psabi -Wno-multichar -Wno-format-zero-length -fno-unwind-tables -fno-asynchronous-unwind-tables -Zomf -m32 -mfpmath=sse -msse3 -fomit-frame-pointer -g0 -O2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu11 -c ../../../../../src/3rdparty/chromium/base/third_party/libevent/buffer.c -o obj/base/third_party/libevent/bundled_libevent/buffer.o
../../../../../src/3rdparty/chromium/base/third_party/libevent/buffer.c:29:10: fatal error: config.h: No such file or directory
   29 | #include "config.h"
      |          ^~~~~~~~~~
compilation terminated.
[15/25370] CC obj/base/third_party/dynamic_annotations/dynamic_annotations/dynamic_annotations.o
[16/25370] CXX obj/base/third_party/double_conversion/double_conversion/string-to-double.o
ninja: build stopped: subcommand failed.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4043
  • Karma: +81/-0
    • View Profile
Re: Qt6
« Reply #242 on: December 10, 2022, 07:41:20 am »
Use the system libevent?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #243 on: December 10, 2022, 07:55:49 am »
I think that's what was happening with qt 5.15, but maybe I screwed up the patch to https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/base/third_party/libevent/BUILD.gn

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4043
  • Karma: +81/-0
    • View Profile
Re: Qt6
« Reply #244 on: December 10, 2022, 08:19:18 am »
The only things built in Qt5's qtwebengine/src/3rdparty is gn and ninja. Configure in the root defines use_system_libevent=true. Of course different build system.
I haven't been able to clone your qtwebengine, keeps hanging, probably too big memory wise.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #245 on: December 10, 2022, 08:31:27 am »
The only things built in Qt5's qtwebengine/src/3rdparty is gn and ninja. Configure in the root defines use_system_libevent=true. Of course different build system.
I haven't been able to clone your qtwebengine, keeps hanging, probably too big memory wise.

I couldn't clone qtwebengine either on the bare metal machine I've been using to build things so far, until I increased virtualaddresslimit from 15xx to 3072

Edit: I added enough stuff to get qtwebengine building libevent - it might need some patching, but at least it compiles...

Current state as at 18:30 Saturday evening is:
[202/24687] CXX obj/third_party/harfbuzz-ng/harfbuzz_source/hb-subset-plan.o

That's almost 1% done :)
« Last Edit: December 10, 2022, 08:59:08 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #246 on: December 10, 2022, 09:58:49 am »
Last update for today, current build output is:
[81/22644] CC obj/third_party/pdfium/third_party/fx_libopenjpeg/t1.o

That makes 22,564 files remaining from the original 25,370 - so roughly 11% of files in:
[  4%] Running ninja for QtWebEngineCore in U:/DEV/qt6-webengine-os2/build/src/core/Release/i386
ninja: Entering directory `U:/DEV/qt6-webengine-os2/build/src/core/Release/i386'

are built :)

Going out tomorrow,, so not sure how much progress will be made.

Cheers,

Paul

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #247 on: December 11, 2022, 01:06:36 am »
About to head out for a few hours, some more commits this morning. At this time of writing, 19,917 'things to do' remaining in the current task, so approx 21.5% of this task is done...

Current break is at:
Code: [Select]
C:/USR/BIN/python2.7.exe ../../../../../src/3rdparty/chromium/build/util/python2_action.py ../../../../../src/3rdparty/chromium/tools/grit/grit.py -i ../../../../../src/3rdparty/chromium/chrome/app/generated_resources.grd build -o gen/chrome --depdir . --depfile gen/chrome/app/generated_resources_grit.d --write-only-new=1 --depend-on-stamp -E root_gen_dir=gen -E root_src_dir=../../../../../src/3rdparty/chromium/ -D SHARED_INTERMEDIATE_DIR=gen -D _chromium -E CHROMIUM_BUILD=chromium -D use_aura -D use_nss_certs -D enable_arcore=false -D enable_background_mode=true -D enable_background_contents=true -D enable_extensions=true -D enable_hangout_services_extension=true -D enable_plugins=true -D enable_print_preview=true -D enable_printing=true -D enable_service_discovery=false -D enable_supervised_users=false -D enable_vr=false -D enable_webrtc=true -D enable_webui_tab_strip=false -D safe_browsing_mode=0 -D optimize_webui=false -D enable_feed_v2=false -f gen/tools/gritsettings/default_resource_ids --assert-file-list obj/chrome/app/generated_resources_expected_outputs.txt
Exception during parsing of resources/generated_resources_ml.xtb
Error processing node <?xml version="1.0" encoding="UTF-8"?>
<file lang="ml" path="resources/generated_resources_ml.xtb" />:
Traceback (most recent call last):
  File "../../../../../src/3rdparty/chromium/tools/grit/grit.py", line 29, in <module>
    sys.exit(grit.grit_runner.Main(sys.argv[1:]))
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/grit_runner.py", line 314, in Main
    return toolobject.Run(options, args[1:])
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/tool/build.py", line 266, in Run
    self.res.RunGatherers()
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/node/misc.py", line 682, in RunGatherers
    node.RunPostSubstitutionGatherer(debug=debug)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/node/node_io.py", line 50, in RunPostSubstitutionGatherer
    target_platform=target_platform)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/xtb_reader.py", line 138, in Parse
    xml.sax.parse(xtb_file, handler)
  File "C:/USR/lib/python2.7/xml/sax/__init__.py", line 33, in parse
    parser.parse(source)
  File "C:/USR/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:/USR/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:/USR/lib/python2.7/xml/sax/expatreader.py", line 210, in feed
    self._parser.Parse(data, isFinal)
  File "C:/USR/lib/python2.7/xml/sax/expatreader.py", line 307, in end_element
    self._cont_handler.endElement(name)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/xtb_reader.py", line 78, in endElement
    self.callback(self.current_id, self.current_structure)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/clique.py", line 241, in Callback
    self.FindCliqueAndAddTranslation(translation, lang)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/clique.py", line 131, in FindCliqueAndAddTranslation
    clique.AddTranslation(translation, language)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/clique.py", line 487, in AddTranslation
    placeholders=original.GetPlaceholders())
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/tclib.py", line 198, in __init__
    super(Translation, self).__init__(text, placeholders, description, meaning)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/tclib.py", line 42, in __init__
    self.SetDescription(description)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/tools/grit/grit/tclib.py", line 137, in SetDescription
    self.description = _FOLD_WHITESPACE.sub(' ', description)

I also see some of these:
Code: [Select]
Traceback (most recent call last):
  File "../../../../../src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py", line 110, in <module>
    main()
  File "../../../../../src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_bindings.py", line 87, in main
    task_queue = bind_gen.TaskQueue(single_process=options.single_process)
  File "U:/dev/qt6-webengine-os2/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py", line 33, in __init__
    package_initializer().init)
  File "C:/USR/lib/python2.7/multiprocessing/__init__.py", line 239, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "C:/USR/lib/python2.7/multiprocessing/pool.py", line 138, in __init__
    self._setup_queues()
  File "C:/USR/lib/python2.7/multiprocessing/pool.py", line 232, in _setup_queues
    from .queues import SimpleQueue
  File "C:/USR/lib/python2.7/multiprocessing/queues.py", line 48, in <module>
    from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition
  File "C:/USR/lib/python2.7/multiprocessing/synchronize.py", line 59, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.
« Last Edit: December 11, 2022, 01:13:36 am by Paul Smedley »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #248 on: December 11, 2022, 08:38:30 am »
OK I hacked around some of this stuff but now get to the point where I need a node.exe from nodejs....

TeLLie

  • Full Member
  • ***
  • Posts: 175
  • Karma: +7/-0
    • View Profile
Re: Qt6
« Reply #249 on: December 14, 2022, 07:44:29 pm »
Hi all

I rebuild focuswriter with sound disabled.
Now you cannot set typewriter sound to on.

Please test...
https://boomfinefood.stack.storage/s/VBsoOO3fITVwO2mD

Also Iqpuzzle
https://boomfinefood.stack.storage/s/utE1scv8Qgc2PJsg
« Last Edit: December 14, 2022, 10:18:00 pm by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #250 on: December 14, 2022, 09:36:04 pm »
Thanks Tellie, one of my TODO items for hopefully over the Christmas break, is to take the OS/2 audio code from qtwebengine, and use it to create an os2 audio backend for qtmultimedia... not sure how hard this will be, but its an interesting challenge.

Meanwhile, I continue to apply patches to qtwebengine and try and get nodejs building...

David McKenna

  • Hero Member
  • *****
  • Posts: 503
  • Karma: +18/-0
    • View Profile
Re: Qt6
« Reply #251 on: December 15, 2022, 12:11:54 pm »
 Thanks Tellie!

 Focuswriter seems to work well, except for the menu item offsets also seen with Paul's version. Also tried Iqpuzzle and it also works well - even the menu items are correct (not offset or overlapping the menu). I wonder why Iqpuzzle menus are good, but not Focuswriter...

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #252 on: December 18, 2022, 02:50:00 am »
Quick update on qtwebengine progress.

With thanks to Steven Levine, we found that the nodejs build system is passing command lines > 35,000 characters to the shell - which was exhausting the environment.

With some hackery (I really hope I don't have to rebuilt nodejs anytime soon), I've had to hand build a couple of libraries, and am making more progress. No idea how far through the build I am, but at least I'm making progress...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4043
  • Karma: +81/-0
    • View Profile
Re: Qt6
« Reply #253 on: December 18, 2022, 03:31:26 am »
Can't you use a response file? It's how xul is compiled, about 1200 file names passed to GCC as a response file.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 1501
  • Karma: +130/-0
    • View Profile
Re: Qt6
« Reply #254 on: December 18, 2022, 03:45:03 am »
I'm sure I could... but it won't be trivial to adapt gyp to use response files, so for now I'll just hack things.