OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Paul Smedley on November 10, 2022, 09:28:30 pm

Title: Qt6 Development
Post by: Paul Smedley on November 10, 2022, 09:28:30 pm
Hey guys,

A couple of points to make first:
1) I wouldn't even be attempting this without the work of bww in creating the Qt5 port to OS/2
2) This may be beyond my capabilities depending on the scope of changes between Qt5 and Qt6

But.... I've created https://github.com/psmedley/qt6-os2

One of the most significant changes between Qt5 and Qt6 is that the build system has COMPLETELY changed to now use cmake. Fortunately, we have a port of cmake - which needed to be updated to >= 3.16 - which I've done at https://github.com/psmedley/cmake-os2 (noting that this repo still needs some cleansing of generated build files).

I have hacked (cough, ported) things enough to the point I get a reasonable looking config.summary - noting that this is only Qtbase - not any of the other modules.

Last night I added in all the os2 specific files from the bww Qt5 repo, and also generated a diff between the virgin qt 5.15.2 code and the bww repo, which I'll attempt to apply today to my Qt6 repo.

Next steps will be to work through the ~11 cmakelists.txt files which determine which source files to build, and add code in to build the *os2* source files.

I'll try and keep this thread updated, but also suggest monitoring commits on github.

Finally, NOTHING may come of this - and also refer back to my points at the start of this post!

Cheers,

Paul
Title: Re: Qt6
Post by: Tom on November 10, 2022, 11:15:49 pm
Paul.

Are you aware of the financial differences between the licensing models for Qt5 and Qt6? Be careful!
Title: Re: Qt6
Post by: David McKenna on November 10, 2022, 11:19:50 pm
 Hi Paul,

 Wow - The journey of a thousand miles starts with one step! Would be absolutely awesome if you can make QT6 work. I'll be following and testing when/if you have some binaries...

Regards,
Title: Re: Qt6
Post by: Martin Iturbide on November 10, 2022, 11:29:03 pm
Hi Paul

First of all, I wish you the best of lucks and I will support you with whatever is on my hands. Remember (Everybody should remember) that this is big task, and for sure the firsts build attempts will not be perfect and will contain flaws. It is a thing that will have to improve with time, it does not has to be perfect on the first shot, so there is no preassure.

About the licencing.
https://doc.qt.io/qt-6/licensing.html

Qt 6.4 (according to that web page) is still under the LGPL V3 license and some components under the GNU GPL. There is an option to buy Qt for commercial use if the plan is to create a close source Qt 6 port for commercial use. (which it is not the plan here). That is what I was able to find for the moment.

For what I see Qt is selling some development tools and the rights to close source the framework. On our case I guess we will be using the "Community version of Qt".
Check the obligations here: https://www.qt.io/download-open-source#obligations
It is basically to comply to the GPL and LGPL license.

Regards
Title: Re: Qt6
Post by: Tom on November 11, 2022, 03:13:11 am
Paul.

Are you aware of the financial differences between the licensing models for Qt5 and Qt6? Be careful!

My question was based on previous information (around 2020) that Qt would change it's licensing model to 'commercial' for Qt6. If I heard it well, Dmitriy also mentioned this in his interview for Warpstock 2022.
Title: Re: Qt6
Post by: Dave Yeo on November 11, 2022, 04:28:49 am
Seems one of the problems was LTS versions of QT5 (excepting the web engine) were only available commercially, KDE kept its own repository of patches for that and also some modules such as the charting one are only available under a commercial license.
Wouldn't be surprised that they floated the idea of only commercial licensing and got so much push back that they caved. It happened before.
Title: Re: Qt6
Post by: Mentore on November 11, 2022, 08:41:21 am
Seems one of the problems was LTS versions of QT5 (excepting the web engine) were only available commercially, KDE kept its own repository of patches for that and also some modules such as the charting one are only available under a commercial license.
Wouldn't be surprised that they floated the idea of only commercial licensing and got so much push back that they caved. It happened before.

I recently installed Qt6 on the Windows machine I work with and yes, there is an open source solution which I think Paul will find useful.
Paul, I cannot praise you enough for your incredible work on porting software for OS/2. And even if this should not bring anywhere, it will however have some impact on OS/2 software development.

Mentore
Title: Re: Qt6
Post by: Paul Smedley on November 11, 2022, 10:02:50 am
Working through failed patches whilst trying to build in parallel :)

This is where we got to today:
[  7%] Building CXX object src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/text/qstring.cpp.o
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/text/qstring.cpp:6322:7: error: #error "This case shouldn't happen"

Noting we also have (from the log of applying the patch):
patching file src/corelib/text/qstring.cpp
Hunk #1 FAILED at 6566.
1 out of 1 hunk FAILED -- saving rejects to file src/corelib/text/qstring.cpp.rej

This one should be easy enough to get past.

First goal is to get qmake.exe built :)
Title: Re: Qt6
Post by: Paul Smedley on November 12, 2022, 12:17:11 am
This morning's progress:
 Directory of  U:\DEV\qtbase-everywhere-src-6.2.4\build\bin\*.exe

12/11/22   9:37       3,059,854      0   ___A_  cmake_automoc_parser.exe
12/11/22   9:36       3,417,995      0   ___A_  moc.exe
12/11/22   9:37       2,646,057      0   ___A_  rcc.exe
12/11/22   9:37       2,388,997      0   ___A_  tracegen.exe
      11,512,903 bytes (10MB) in 4 files and 0 dirs
Title: Re: Qt6
Post by: Paul Smedley on November 12, 2022, 08:36:16 am
Hey guys,

Update - I got to the stage where an attempt to link qtcore6.dll was made :) It had a bunch of missing symbols due to the *os2.cpp files not being added to the build process.

I've updated git with all the code changes so far.

Build is now breaking with:
Code: [Select]
[ 23%] Building CXX object src/corelib/CMakeFiles/Core.dir/io/qprocess_os2.cpp.o
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:154:10: warning: 'virtual void QProcessManager::run()' can be marked override [-Wsuggest-override]
  154 |     void run();
      |          ^~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp: In static member function 'static USHORT QProcessManager::addProcess(QProcess*)':
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:276:32: error: cannot call member function 'QThreadPrivate* QThread::d_func()' without object
  276 |     QProcessPrivate *d = d_func();
      |                          ~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp: In static member function 'static void QProcessManager::removeProcess(USHORT)':
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:346:32: error: cannot call member function 'QThreadPrivate* QThread::d_func()' without object
  346 |     QProcessPrivate *d = d_func();
      |                          ~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:336:15: warning: unused variable 'process' [-Wunused-variable]
  336 |     QProcess *process = instance->processes[procKey];
      |               ^~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp: In member function 'virtual void QProcessManager::run()':
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:439:33: error: 'QProcessPrivate* QProcess::d_func()' is private within this context
  439 |                 if (proc->d_func()->waitMode) {
      |                     ~~~~~~~~~~~~^~
In file included from U:/dev/qtbase-everywhere-src-6.2.4/build/include/QtCore/qglobal.h:1,
                 from U:/dev/qtbase-everywhere-src-6.2.4/mkspecs/os2-g++/qplatformdefs.h:52,
                 from U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:44:
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/global/qglobal.h:1286:28: note: declared private here
 1286 |     inline Class##Private* d_func() noexcept \
      |                            ^~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess.h:275:5: note: in expansion of macro 'Q_DECLARE_PRIVATE'
  275 |     Q_DECLARE_PRIVATE(QProcess)
      |     ^~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:440:49: error: 'QProcessPrivate* QProcess::d_func()' is private within this context
  440 |                     DosPostEventSem(proc->d_func()->waitSem);
      |                                     ~~~~~~~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/global/qglobal.h:1286:28: note: declared private here
 1286 |     inline Class##Private* d_func() noexcept \
      |                            ^~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess.h:275:5: note: in expansion of macro 'Q_DECLARE_PRIVATE'
  275 |     Q_DECLARE_PRIVATE(QProcess)
      |     ^~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:518:29: error: 'QProcessPrivate* QProcess::d_func()' is private within this context
  518 |                 proc->d_func()->pipes[type]->bytes = pipeStates[i].usAvail;
      |                 ~~~~~~~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/global/qglobal.h:1286:28: note: declared private here
 1286 |     inline Class##Private* d_func() noexcept \
      |                            ^~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess.h:275:5: note: in expansion of macro 'Q_DECLARE_PRIVATE'
  275 |     Q_DECLARE_PRIVATE(QProcess)
      |     ^~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:530:29: error: 'QProcessPrivate* QProcess::d_func()' is private within this context
  530 |             if (proc->d_func()->waitMode) {
      |                 ~~~~~~~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/global/qglobal.h:1286:28: note: declared private here
 1286 |     inline Class##Private* d_func() noexcept \
      |                            ^~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess.h:275:5: note: in expansion of macro 'Q_DECLARE_PRIVATE'
  275 |     Q_DECLARE_PRIVATE(QProcess)
      |     ^~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:531:45: error: 'QProcessPrivate* QProcess::d_func()' is private within this context
  531 |                 DosPostEventSem(proc->d_func()->waitSem);
      |                                 ~~~~~~~~~~~~^~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/global/qglobal.h:1286:28: note: declared private here
 1286 |     inline Class##Private* d_func() noexcept \
      |                            ^~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess.h:275:5: note: in expansion of macro 'Q_DECLARE_PRIVATE'
  275 |     Q_DECLARE_PRIVATE(QProcess)
      |     ^~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp: At global scope:
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:1292:6: error: no declaration matches 'bool QProcessPrivate::waitForStarted(int)'
 1292 | bool QProcessPrivate::waitForStarted(int /*msecs*/)
      |      ^~~~~~~~~~~~~~~
In file included from U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:81:
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:407:10: note: candidate is: 'bool QProcessPrivate::waitForStarted(const QDeadlineTimer&)'
  407 |     bool waitForStarted(const QDeadlineTimer &deadline);
      |          ^~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:231:7: note: 'class QProcessPrivate' defined here
  231 | class QProcessPrivate : public QIODevicePrivate
      |       ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:1405:6: error: no declaration matches 'bool QProcessPrivate::waitForReadyRead(int)'
 1405 | bool QProcessPrivate::waitForReadyRead(int msecs)
      |      ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:408:10: note: candidate is: 'bool QProcessPrivate::waitForReadyRead(const QDeadlineTimer&)'
  408 |     bool waitForReadyRead(const QDeadlineTimer &deadline);
      |          ^~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:231:7: note: 'class QProcessPrivate' defined here
  231 | class QProcessPrivate : public QIODevicePrivate
      |       ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:1410:6: error: no declaration matches 'bool QProcessPrivate::waitForBytesWritten(int)'
 1410 | bool QProcessPrivate::waitForBytesWritten(int msecs)
      |      ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:409:10: note: candidate is: 'bool QProcessPrivate::waitForBytesWritten(const QDeadlineTimer&)'
  409 |     bool waitForBytesWritten(const QDeadlineTimer &deadline);
      |          ^~~~~~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:231:7: note: 'class QProcessPrivate' defined here
  231 | class QProcessPrivate : public QIODevicePrivate
      |       ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:1415:6: error: no declaration matches 'bool QProcessPrivate::waitForFinished(int)'
 1415 | bool QProcessPrivate::waitForFinished(int msecs)
      |      ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:410:10: note: candidate is: 'bool QProcessPrivate::waitForFinished(const QDeadlineTimer&)'
  410 |     bool waitForFinished(const QDeadlineTimer &deadline);
      |          ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_p.h:231:7: note: 'class QProcessPrivate' defined here
  231 | class QProcessPrivate : public QIODevicePrivate
      |       ^~~~~~~~~~~~~~~
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp: In member function 'int QProcessPrivate::_q_notified(int)':
U:/dev/qtbase-everywhere-src-6.2.4/src/corelib/io/qprocess_os2.cpp:1535:31: error: could not convert '((QProcessPrivate*)this)->QProcessPrivate::_q_processDied()' from 'void' to 'bool'
 1535 |             if (_q_processDied())
      |                 ~~~~~~~~~~~~~~^~
      |                               |
      |                               void
make[2]: *** [src/corelib/CMakeFiles/Core.dir/io/qprocess_os2.cpp.o] Error 1
make[1]: *** [src/corelib/CMakeFiles/Core.dir/all] Error 2
make: *** [all] Error 2

My c++ is not great - but I'll attempt to continue work on this tomorrow.

For anyone who wants to try building, I'm using:
Code: [Select]
dash ../configure -prefix /qt6 -no-opengl -release -system-sqlite -openssl-linked -no-pch 2>&1 | tee configure.log
This needs cmake 3.16 - I have built it locally, but Dave is having issues with the code in github... I'll package up a build...
Title: Re: Qt6
Post by: Paul Smedley on November 12, 2022, 09:36:47 pm
I've having broadband issues, so smedley.id.au is down - but cmake-3.16.9 should be available from https://drive.google.com/file/d/11hR1juvCTEHM0Oy-YlUq6NLYHv_hHTKf/view?usp=share_link
Title: Re: Qt6
Post by: Paul Smedley on November 13, 2022, 12:17:18 am
Progress...
Code: [Select]
Error! E2028: __ZN19QStorageInfoPrivate14mountedVolumesEv is an undefined reference
Error! E2028: __ZN19QStorageInfoPrivate4rootEv is an undefined reference
Error! E2028: __ZN19QStorageInfoPrivate6doStatEv is an undefined reference
Error! E2028: __ZN15QProcessPrivate11_q_canWriteEv is an undefined reference
Error! E2028: __ZN15QProcessPrivate7cleanupEv is an undefined reference
Error! E2028: __ZN19QIcuTimeZonePrivateC1ERK10QByteArray is an undefined reference
Error! E2028: __ZN19QIcuTimeZonePrivateC1Ev is an undefined reference
Error! E2028: __ZN8QProcess9writeDataEPKcx is an undefined reference
Error! E2028: _SLJIT_UPDATE_WX_FLAGS is an undefined reference
file U:/tmp\ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj(ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj): undefined symbol __ZN19QStorageInfoPrivate14mountedVolumesEv
file U:/tmp\ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj(ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj): undefined symbol __ZN19QStorageInfoPrivate4rootEv
file U:/tmp\ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj(ldconv_qstorageinfo_cpp_o_eb986370289019e340.obj): undefined symbol __ZN19QStorageInfoPrivate6doStatEv
file U:/tmp\ldconv_qprocess_os2_cpp_o_eb98637028921bc7a0.obj(ldconv_qprocess_os2_cpp_o_eb98637028921bc7a0.obj): undefined symbol __ZN15QProcessPrivate11_q_canWriteEv
file U:/tmp\ldconv_qprocess_os2_cpp_o_eb98637028921bc7a0.obj(ldconv_qprocess_os2_cpp_o_eb98637028921bc7a0.obj): undefined symbol __ZN15QProcessPrivate7cleanupEv
file U:/tmp\ldconv_qtimezone_cpp_o_eb986370289319cbd0.obj(ldconv_qtimezone_cpp_o_eb986370289319cbd0.obj): undefined symbol __ZN19QIcuTimeZonePrivateC1ERK10QByteArray
file U:/tmp\ldconv_qtimezone_cpp_o_eb986370289319cbd0.obj(ldconv_qtimezone_cpp_o_eb986370289319cbd0.obj): undefined symbol __ZN19QIcuTimeZonePrivateC1Ev
file U:/tmp\ldconv_qprocess_cpp_o_eb98637028931b3330.obj(ldconv_qprocess_cpp_o_eb98637028931b3330.obj): undefined symbol __ZN15QProcessPrivate7cleanupEv
file U:/tmp\ldconv_qprocess_cpp_o_eb98637028931b3330.obj(ldconv_qprocess_cpp_o_eb98637028931b3330.obj): undefined symbol __ZN15QProcessPrivate11_q_canWriteEv
file U:/tmp\ldconv_qprocess_cpp_o_eb98637028931b3330.obj(ldconv_qprocess_cpp_o_eb98637028931b3330.obj): undefined symbol __ZN8QProcess9writeDataEPKcx
file U:\tmp\ldconv_Qt6BundledPcre2_a_eb9863702894143238.lib(pcre2_jit_compile.c.obj): undefined symbol _SLJIT_UPDATE_WX_FLAGS
make[3]: *** [lib/Qt6Core6.dll] Error 1
make[2]: *** [src/corelib/CMakeFiles/Core.dir/all] Error 2
make[1]: *** [src/corelib/CMakeFiles/Core.dir/rule] Error 2
make: *** [src/corelib/CMakeFiles/Core.dir/rule] Error 2
Title: Re: Qt6
Post by: Paul Smedley on November 13, 2022, 04:27:42 am
A few more fixes and I now have:
13/11/22  11:21         189,134      0   ___A_  Qt6Conc6.dll
13/11/22  11:21      14,433,100      0   ___A_  Qt6Core6.dll
13/11/22  11:24         533,956      0   ___A_  Qt6Sql6.dll

Now broken on QtNetwork :)
Title: Re: Qt6
Post by: Paul Smedley on November 13, 2022, 07:39:05 am
I now have:
13/11/22  16:33         189,140      0   ___A_  Qt6Conc6.dll
13/11/22  16:33      14,433,308      0   ___A_  Qt6Core6.dll
13/11/22  17:00       1,328,606      0   ___A_  Qt6DBus6.dll
13/11/22  16:36       3,006,722      0   ___A_  Qt6Netw6.dll
13/11/22  16:33         533,971      0   ___A_  Qt6Sql6.dll
13/11/22  16:38         788,144      0   ___A_  Qt6Xml6.dll

..and just started on the Qt6Gui6.dll...
13/11/22  17:32      12,604,680      0   ___A_  Qt6Gui6.dll

Then broke at some point after that in the widgets directory...
Title: Re: Qt6
Post by: Paul Smedley on November 13, 2022, 08:55:59 am
...and something is broken... trying to run uic.exe (or any exe that links against Qt6Core6.dll gives a:
SYS1808:
The process has stopped.  The software diagnostic
code (exception code) is  0005.

& from popuplog.os2:
11-13-2022  18:07:13  SYS3175  PID 510c  TID 0001  Slot 0088
U:\DEV\QTBASE-EVERYWHERE-SRC-6.2.4\BUILD\BIN\UIC.EXE
c0000005
1d574aab
P1=00000010  P2=ffffffff  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00000002  EBX=00003640  ECX=00000001  EDX=510c0001
ESI=001af9c0  EDI=10d3a0a8 
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:1d574aab  CSACC=d0df  CSLIM=7fffffff
SS:ESP=0053:001af970  SSACC=d0f3  SSLIM=7fffffff
EBP=001af9e8  FLG=00012202

QT6CORE6.DLL 0001:00214aab
Title: Re: Qt6
Post by: roberto on November 13, 2022, 03:09:08 pm
Hello Paul,
I attach a file. Try to execute it in a QBASIC session when starting the system, and you leave it in execution in the background, with QBASIC, in a Window DOSsession. Then you run everything you want.
This is a shot in the air.
 But why not try?.
What is based on error that you show us.
Saludos
Title: Re: Qt6
Post by: TeLLie on November 13, 2022, 03:39:00 pm
Hi Paul,
i run after the configure cmake --build . --parallel 2>stdout 1>stderr

i give it a shot but it failed linking the exe files...

[1/1018] Linking CXX executable bin/rcc.exe
FAILED: bin/rcc.exe
: && echo NAME rcc  > bin/rcc.exe.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 13 Nov 2022 13:50:16\ \ \ \ \ TeLLieLaPPie::::0::@@rcc\" >> bin/rcc.exe.def && echo  >> bin/rcc.exe.def && h:/usr/local1220/bin/g++.exe -DNDEBUG -O2 -Zomf -Zomf -Zlinker DISABLE -Zlinker 1121 -lcx src/tools/rcc/CMakeFiles/rcc.dir/main.cpp.o src/tools/rcc/CMakeFiles/rcc.dir/rcc.cpp.o -o bin/rcc.exe   src/tools/bootstrap/Bootstrap.a  H:/USR/LOCAL1220/lib/pcre2-16_dll.a  H:/USR/LOCAL1220/lib/z.dll  -lpthread bin/rcc.exe.def && :
weakld: error: Unresolved symbol (UNDEF) '__ZNSt3pmr25monotonic_buffer_resourceD1Ev'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qdiriterator.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qfilesystemengine.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qstringlist.cpp.obj)
weakld: error: Unresolved symbol (UNDEF) '__ZSt28__throw_bad_array_new_lengthv'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qdiriterator.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qfilesystemengine.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qstringlist.cpp.obj)
weakld: error: Unresolved symbol (UNDEF) '__ZTVNSt3pmr25monotonic_buffer_resourceE'.
weakld: info: The symbol is referenced by:
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qdiriterator.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qfilesystemengine.cpp.obj)
    D:\temp\ldconv_Bootstrap_a_1c626370eec814ab50.lib(qstringlist.cpp.obj)
Ignoring unresolved externals reported from weak prelinker.
[2/1018] Linking CXX executable bin/moc.exe
FAILED: bin/moc.exe


Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 12:47:44 am
Hey Tellie,

I'd suggest running 'c++filt __ZNSt3pmr25monotonic_buffer_resourceD1Ev' (and the other two symbols) and trying to understand where this symbol comes from.

My initial 'guess' is that it comes from pcre2 - I note that you're using the system pcre2 (ie H:/USR/LOCAL1220/lib/pcre2-16_dll.a) not the once from Qt. There's possibly a configure parameter to disable the use of the system pcre2.

Edit: they look like stdc++ symbols - are you sure you don't have a stray stdc++.lib around somewhere?

Also note that I'm running 'make' not 'cmake --build . --parallel 2>stdout 1>stderr' - I guess I should try it with the suggested command - it might even prevent it re-building every object file every time I run make!

Cheers,

Paul.
Title: Re: Qt6
Post by: Dave Yeo on November 14, 2022, 01:36:00 am
I tried it, dies pretty quick linking moc.exe with,
Code: [Select]
[ 12%] Linking CXX executable ../../../bin/moc.exe
weakld: error: Unresolved symbol (UNDEF) '_mmap'.
weakld: info: The symbol is referenced by:
    H:\tmp\ldconv_Bootstrap_a_191963718c871d88d8.lib(qfsfileengine_unix.cpp.obj)

weakld: error: Unresolved symbol (UNDEF) '_munmap'.
weakld: info: The symbol is referenced by:
    H:\tmp\ldconv_Bootstrap_a_191963718c871d88d8.lib(qfsfileengine_unix.cpp.obj)

Like libcx isn't getting linked. Hate this silent linking.
Title: Re: Qt6
Post by: Dave Yeo on November 14, 2022, 01:41:37 am
How are you calling configure? I'm using,
Code: [Select]
sh ../configure -prefix h:/tmp/qt6 -release -opensource -confirm-license -nomake tests -no-opengl -system-sqlite -openssl-linked -no-dbus 2>&1 | tee configure.log
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 02:14:41 am
Hey Dave,

I tried it, dies pretty quick linking moc.exe with,
Code: [Select]
[ 12%] Linking CXX executable ../../../bin/moc.exe
weakld: error: Unresolved symbol (UNDEF) '_mmap'.
weakld: info: The symbol is referenced by:
    H:\tmp\ldconv_Bootstrap_a_191963718c871d88d8.lib(qfsfileengine_unix.cpp.obj)

weakld: error: Unresolved symbol (UNDEF) '_munmap'.
weakld: info: The symbol is referenced by:
    H:\tmp\ldconv_Bootstrap_a_191963718c871d88d8.lib(qfsfileengine_unix.cpp.obj)

Like libcx isn't getting linked. Hate this silent linking.

I've modified my local copy of os2.cmake to include -lcx in the *EXE_LINKER_FLAGS* (or whatever it's called) to get around this...

At some point I'll look into doing this more elegantly in the CMakeLists.txt but for me this is very much in the Continuous Improvement category.

Also on the CI list is why CXXFLAGS keeps dragging in the various -fvisibility* flags which don't do any harm, but cause extraneous console output which slows things down.

I think my problem with Qt6Core6.dll is due to missing exports - looking at os2.cmake they is a flag to use emxexp to generate exports - which may be better than relying on dllimport/dllexport.

Cheers,

Paul.
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 02:19:58 am
How are you calling configure? I'm using,
Code: [Select]
sh ../configure -prefix h:/tmp/qt6 -release -opensource -confirm-license -nomake tests -no-opengl -system-sqlite -openssl-linked -no-dbus 2>&1 | tee configure.log

I'm using:
Code: [Select]
dash ../configure -prefix /qt6 -no-opengl -release -system-sqlite -openssl-linked -no-pch 2>&1 | tee configure.log

It would be interesting to see what Tellie using.

I also need to update os2.cmake to add -Zmap by default... it would help understand what libs Tellie is using to link with.

Cheers,

Paul
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 08:02:52 am
Hi Paul

In using same configure line as you use.
Only i use sh instead of dash
I will check later the things you ask for..
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 08:28:04 am
@Tellie - those missing symbols are all in libstdc++.a from gcc 12.2.0 - I suspect an older version is being picked up...
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 08:41:14 am
Hi Paul,

Hmmm i notice that i have to add the libstdc++ allways in the cmd i use, its not picked up automatically for some reasons.

How to get that auto so i have not to set that allways manually??

I will try again with the libstdc++.a adding
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 09:25:08 am
Hey Tellie - I have NFI - I'll attach my gcc1220.cmd - maybe there's a clue in there....
Title: Re: Qt6
Post by: Dave Yeo on November 14, 2022, 04:58:41 pm
Well, got a little further, now CC1PLUS is crashing,
Code: [Select]
[ 15%] Building CXX object src/corelib/CMakeFiles/Core.dir/Core_autogen/mocs_com
pilation.cpp.o

Killed by SIGSEGV
pid=0x14e4 ppid=0x14e3 tid=0x0001 slot=0x00db pri=0x0200 mc=0x0001 ps=0x0010
W:\USR\LIBEXEC\GCC\I686-PC-OS2-EMX\9\CC1PLUS.EXE
LIBCN0 ffffffff:ffffffff
cs:eip=0203f30c:024e7ea0      ss:esp=0203f10c:0203f0e8      ebp=02030053
 ds=62696c65      es=0000      fs=6372732f      gs=0000     efl=0203ffff
eax=0203f110 ebx=1ffc9d7c ecx=0203f124 edx=0203f148 edi=614d432f esi=0203f7bc
Creating 14E4_01.TRP
Moved 14e4_01.TRP to W:\var\log\app\6371f24a-14e4_01-CC1PLUS-exceptq.txt
c++.exe: internal compiler error: Segmentation fault signal terminated program c
c1plus

GCC 9.2.0. Guess have to try 12.2.0, Paul can you remind me of the URL to download it?
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 05:48:29 pm
Hi Paul....

Now it failed here:

[194/1197] Automatic MOC for target QOS2IntegrationPlugin
FAILED: src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin_autogen src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/mocs_compilation.cpp
cd G:/Qt6-dev/src/plugins/platforms/os2 && H:/usr/local1220/bin/cmake.exe -E cmake_autogen G:/Qt6-dev/src/plugins/platforms/os2/CMakeFiles/QOS2IntegrationPlugin_autogen.dir/AutogenInfo.json Release

AutoMoc subprocess error
------------------------
The moc process failed to compile
  "SRC:/src/plugins/platforms/os2/main.cpp"
into
  "BIN:/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc"
included by
  "SRC:/src/plugins/platforms/os2/main.cpp"

Command
-------
G:/Qt6-dev/bin/moc.exe -DQOS2IntegrationPlugin_EXPORTS -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -IG:/qt6-os2/src/plugins/platforms/os2 -IG:/Qt6-dev/src/plugins/platforms/os2 -IG:/Qt6-dev/include -IG:/qt6-os2/mkspecs/os2-g++ -IH:/USR/LOCAL1220/include/c++/12.2.0 -IH:/USR/LOCAL1220/include/c++/12.2.0/i686-pc-os2-emx -IH:/USR/LOCAL1220/lib/gcc/i686-pc-os2-emx/12.2.0/include -Ic:/usr/include -IH:/USR/LOCAL1220/include/c++/12.2.0/backward -IH:/USR/LOCAL1220/include -IH:/usr/local1220/lib/gcc/i686-pc-os2-emx/12.2.0/include-fixed --include G:/Qt6-dev/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/moc_predefs.h -o G:/Qt6-dev/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc G:/qt6-os2/src/plugins/platforms/os2/main.cpp

Output
------
G:/qt6-os2/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID"

[195/1197] Automatic MOC for target FbSupportPrivate
[196/1197] Automatic MOC for target Core
AutoMoc: G:/qt6-os2/src/corelib/plugin/qpluginloader.h:0:1: note: No relevant classes found. No output generated.
ninja: build stopped: subcommand failed.
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 08:15:06 pm
Hey Tellie,

I've seen that error too - I haven't fixed that one yet. I have no idea (yet) wtf is causing that parse error at IID
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 08:58:42 pm
Hi Paul,

How you get then the dll's you showed?
As i see not a single dll atm :P
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 09:00:43 pm
Hi Paul,

How you get then the dll's you showed?
As i see not a single dll atm :P

Try cmake --build . without the --parallel

With current git I'm breaking in gui due to some things I changed trying to fix breaks later on :P
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 09:01:28 pm
GCC 9.2.0. Guess have to try 12.2.0, Paul can you remind me of the URL to download it?

https://smedley.id.au/tmp/gcc-12.2.0-os2-20220820.zip


Cheers,

Paul
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 09:20:37 pm
Hi Paul,
It makes no diff if i remove the --parallel
Still failed with the "IID" error....
Title: Re: Qt6
Post by: Paul Smedley on November 14, 2022, 09:57:01 pm
Weird... for me it bootstraps first - then builds corelib - that moc error is from trying to build the os2 plugin, which (for me) comes much later in the build process.

Can you post your config.summary?

Also, try changing into build/src/corelib and running make from there
Title: Re: Qt6
Post by: TeLLie on November 14, 2022, 10:40:42 pm
Hi

Title: Re: Qt6
Post by: Dave Yeo on November 15, 2022, 04:00:49 am
Well, with GCC 12.2.0 it gets slightly further,
Code: [Select]
[ 14%] Running moc --collect-json for target Core
[ 14%] Generating prl file for target Core
Scanning dependencies of target Core
[ 14%] Building CXX object src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx.gch
In file included from K:/work/qt6-os2/build/include/QtCore/qtimer.h:1,
                 from K:/work/qt6-os2/src/corelib/global/qt_pch.h:84,
                 from K:/work/qt6-os2/build/src/corelib/CMakeFiles/Core.dir/cmae_pch.hxx:5,
                 from <command-line>:
K:/work/qt6-os2/src/corelib/kernel/qtimer.h:242:2: fatal error: cannot write PC
 file: required memory segment unavailable
  242 | };
      |  ^
compilation terminated.
make[2]: *** [src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx.gch] Error 1

Aren't pre-compiled headers supposed to be disabled? Seems the configure test for pre-compiled headers crashed with 9.2.0 but not 12.2.0.
Guess I close the browser and retry
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 05:05:48 am
You need to add -no-pch to your configure line.
Title: Re: Qt6
Post by: Dave Yeo on November 15, 2022, 05:59:22 am
You need to add -no-pch to your configure line.

Yes, I found that after posting. Still getting missing symbols related to libcx while linking qtcore so hacked os2.cmake more.
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 09:42:10 am
Hey Tellie,
Output
------
G:/qt6-os2/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID"

I asked a question at https://forum.qt.io/topic/140737/porting-qt-6-2-to-os-2-operating-system - let's see what they have to say...

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 09:43:34 am
You need to add -no-pch to your configure line.

Yes, I found that after posting. Still getting missing symbols related to libcx while linking qtcore so hacked os2.cmake more.

FWIW - my os2.cmake is at https://smedley.id.au/tmp/os2.cmake

We should also be able to add cx as a required lib in cmakelists.txt - but os2/cmake is easier right now :)

Cheers,

Paul
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 12:29:38 pm
Hi Paul,
If i look in the qt5 repo i see same file  is using for the qt5 port
Title: Re: Qt6
Post by: Dave Yeo on November 15, 2022, 04:36:13 pm
You need to add -no-pch to your configure line.

Yes, I found that after posting. Still getting missing symbols related to libcx while linking qtcore so hacked os2.cmake more.

FWIW - my os2.cmake is at https://smedley.id.au/tmp/os2.cmake

We should also be able to add cx as a required lib in cmakelists.txt - but os2/cmake is easier right now :)

Cheers,

Paul

I ended up with problems in the networking code, once again thought I had IPv6. Not sure why it is not picking up the "QT_NO_IPV6" defines in mkspecs/os2-g++/qmake.conf. I ended up adding it to build/src/network/qnetwork-config.h and the compile made it to the Parse error at "IID"
I'll look at your cmake
Title: Re: Qt6
Post by: Rich Walsh on November 15, 2022, 05:01:46 pm
G:/qt6-os2/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID"

The code in question is:
Code: [Select]
Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "os2.json")

'IID' identifies the datatype of "QPlatformIntegrationFactoryInterface_iid" but the compiler has no idea of what that may be because 'IID' hasn't been defined (or typedef'd).

From the context, I'd guess that 'IID' is a very fundamental type that should have been defined in a header #included by some ancestor of this class - you shouldn't have to #include it yourself. Since other platforms use this same function, maybe the definition of 'IID' was conditionally-compiled out for the OS/2 platform. Just a WAG...
Title: Re: Qt6
Post by: Dave Yeo on November 15, 2022, 06:23:32 pm
Yes, it is typedef'd in src/3rdparty/iaccessible2/generated/x86/ia2_api_all_i.c, just a matter of a missing include I assume and whether it is the .c or .h that should be included.
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 08:30:06 pm
I also posted to the qt devel mailing list. There's some ideas at https://lists.qt-project.org/pipermail/development/2022-November/043283.html

I'll try the suggestion this morning but won't know if it worked or not until I get home from work in 11 hours or so!!

Edit: I updated that cmakelists.txt based on the windows version and committed it. Local build in progress now but Tellie or Dave may beat me to knowing if it helped.
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 08:55:55 pm
Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 09:29:56 pm
Hi Rich,

G:/qt6-os2/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID"

The code in question is:
Code: [Select]
Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "os2.json")

'IID' identifies the datatype of "QPlatformIntegrationFactoryInterface_iid" but the compiler has no idea of what that may be because 'IID' hasn't been defined (or typedef'd).

From the context, I'd guess that 'IID' is a very fundamental type that should have been defined in a header #included by some ancestor of this class - you shouldn't have to #include it yourself. Since other platforms use this same function, maybe the definition of 'IID' was conditionally-compiled out for the OS/2 platform. Just a WAG...

I'd grep'd all the headers looking for this definition without success. It looks like the answer is to include Qt::Gui in the LIBRARIES (per the Qt mailing list).

Cheers,

Paul.
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 09:31:10 pm
Hey Tellie,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

Did you do a 'git pull' the use my change, or you made your own edit? (Curious, as based on a review on windows/cmakelists.txt, I added more to cmakelists.txt that just Qt::Gui)

Cheers,

Paul.
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 09:58:35 pm
I did a git pull, but maybe you dint push the change yet
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 10:07:37 pm
I did a git pull, but maybe you dint push the change yet
Oops - I did try to do it before I left for work, it must have failed :(

I basically made the os2/CMakeLists.txt more like windows/CMakeLists.txt (not including the windows specific libs of course).

It will be interesting to see how much further you get. I'll attempt to continue work this evening.

Cheers,

Paul.
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 10:08:39 pm
Hey Tellie,

Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..

I had this too - do a 'git pull' and it should address it.
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 10:13:47 pm
Hey Tellie,

Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..

I had this too - do a 'git pull' and it should address it.

I get this after i had did the pull...
I try later again....
Title: Re: Qt6
Post by: Paul Smedley on November 15, 2022, 10:24:43 pm
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
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 11:14:32 pm
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....
Title: Re: Qt6
Post by: TeLLie on November 15, 2022, 11:30:49 pm
Hi Paul

I notice something weird before when i had theqt6core dll building
So before i build a clean build

it seems that the dll are linking as lib/qt6core6.dll

** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Created on:       22/11/15 21:27:50
Executable Image: lib/Qt6Core6.dll
creating an OS/2 EMX dynamic link library

Do you see that to ?
As i try to run uic it says it's looking for the lib/qt6core6.dll

Title: Re: Qt6
Post by: Paul Smedley on November 16, 2022, 01:23:33 am
Hi Tellie,

I notice something weird before when i had theqt6core dll building
So before i build a clean build

it seems that the dll are linking as lib/qt6core6.dll

** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Created on:       22/11/15 21:27:50
Executable Image: lib/Qt6Core6.dll
creating an OS/2 EMX dynamic link library

Do you see that to ?
As i try to run uic it says it's looking for the lib/qt6core6.dll

Yes - I get Qt6Core6.dll too. I assume this is the default naming convention - I've done nothing to change this.

Cheers,

Paul.
Title: Re: Qt6
Post by: Paul Smedley on November 16, 2022, 01:25:15 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'll investigate tonight...

Cheers,

Paul
Title: Re: Qt6
Post by: Dave Yeo on November 16, 2022, 02:27:08 am
I've been adding the define to src/network/qtnetwork-config.h
Title: Re: Qt6
Post by: Dave Yeo on November 16, 2022, 03:04:23 am
Lots of errors here in src/plugins/platforms/os2/qos2clipboard, enough I'm not going to bother pasting them but guessing it might need a bit of a rewrite or hopefully just a bit of adapting.
BTW, git pull didn't find anything so I tried this,
Code: [Select]
index be461530..7c822111 100644
--- a/src/plugins/platforms/os2/CMakeLists.txt
+++ b/src/plugins/platforms/os2/CMakeLists.txt
@@ -21,7 +21,17 @@ qt_internal_add_plugin(QOS2IntegrationPlugin
         qos2theme.cpp
         qos2window.cpp

+    DEFINES
+        QT_NO_CAST_FROM_ASCII
+        QT_NO_FOREACH
+
     INCLUDE_DIRECTORIES
         ${CMAKE_CURRENT_SOURCE_DIR}
+    LIBRARIES
+        Qt::Core
+        Qt::CorePrivate
+        Qt::Gui
+        Qt::GuiPrivate
+
 )
Title: Re: Qt6
Post by: Paul Smedley on November 16, 2022, 04:20:51 am
That's pretty must what I did this morning (from memory), I'll re-push it when I get home.
Title: Re: Qt6
Post by: Paul Smedley 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 :)
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: TeLLie 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.
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley 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....
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: TeLLie 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...
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: TeLLie 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??
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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....
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Dave Yeo on November 18, 2022, 08:33:51 am
I got the TLS plugin to compile with this patch,
Code: [Select]
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index 146132b9..03944a84 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -100,6 +100,10 @@ typedef INT (WSAAPI *LPFN_WSASENDMSG)(SOCKET s, LPWSAMSG lpMsg, DWORD dwFlags,
 #  endif // !WSAID_WSASENDMSG
 #endif // Q_OS_WIN
 
+#ifdef __OS2__
+#define QT_NO_IPV6 1
+#endif
+
 union qt_sockaddr {
     sockaddr a;
     sockaddr_in a4;
diff --git a/src/plugins/tls/openssl/qdtls_openssl.cpp b/src/plugins/tls/openssl/qdtls_openssl.cpp
index 55a82f7f..2ab2231f 100644
--- a/src/plugins/tls/openssl/qdtls_openssl.cpp
+++ b/src/plugins/tls/openssl/qdtls_openssl.cpp
@@ -542,7 +542,11 @@ extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
         // using this address), but let's pretend a success.
         switch (dtls->remoteAddress.protocol()) {
         case QAbstractSocket::IPv6Protocol:
+#ifdef __OS2__
+            return sizeof(sockaddr_in);     
+#else
             return sizeof(sockaddr_in6);
+#endif
         case QAbstractSocket::IPv4Protocol:
             return sizeof(sockaddr_in);
         default:

Still seems wrong that IPv6 support seems to be detected.
Now the build is dying here,
Code: [Select]
file H:/tmp\ldconv_qminimalintegration_cpp_o_f40e6377332b19cbd0.obj(ldconv_qminimalintegration_cpp_o_f40e6377332b19cbd0.obj): undefined symbol __ZTV19QFontconfigDatabase
make[2]: *** [plugins/platforms/qminimal.dll] Error 1
make[1]: *** [src/plugins/platforms/minimal/CMakeFiles/QMinimalIntegrationPlugin.dir/all] Error 2

Hopefully don't need a newer fontconfig.
Bedtime here.
Title: Re: Qt6
Post by: Paul Smedley on November 18, 2022, 08:58:02 am
I just checked in fixes for qos2clipboard.cpp and also the qminimal plugin

Edit: also for qos2
Title: Re: Qt6
Post by: TeLLie on November 18, 2022, 02:21:15 pm
Hi Paul & Dave

I now have use make and removed the ninja out of path.

G:\qt6\bin>qmake.exe --version
QMake version 3.1
Using Qt version 6.2.4 in /qt6/lib


But here it stops @ .......


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
------


make.exe[2]: *** [src/widgets/CMakeFiles/Widgets_autogen] Error 1
make.exe[1]: *** [src/widgets/CMakeFiles/Widgets_autogen.dir/all] Error 2
make.exe[1]: *** Waiting for unfinished jobs....
G:/qt6-os2/src/platformsupport/fbconvenience/qfbvthandler.cpp: In constructor 'QFbVtHandler::QFbVtHandler(QObject*)':
G
Title: Re: Qt6
Post by: Dave Yeo on November 18, 2022, 04:16:12 pm
Hi Tellie, try using BEGINLIBPATH to put the lib directory where the freshly built DLLs are in LIBPATH
Title: Re: Qt6
Post by: Paul Smedley on November 18, 2022, 06:18:16 pm
Tellies failure looks similar to mine, I'll almost wager he has a crash in popuplog.os2. I set a rebuild going with gcc 9.5.0 (vs 12.2.0) last night, will see how it goes once I get up. (Just got woken by a storm, but it's only 3:45am, so I'd better not go grab the laptop!)
Title: Re: Qt6
Post by: Dave Yeo on November 18, 2022, 06:31:40 pm
Yes, I'm now getting the same error. Still had to patch for the TLS plugin to compile here.
Title: Re: Qt6
Post by: TeLLie on November 18, 2022, 07:35:30 pm
Hi
After set beginpath i see now this error:
I have notting in popup.log


G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In constructor 'QOffscreenIntegration::QOffscreenIntegration()':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:102:30: error: expected type-specifier before 'QGenericUnixFontDatabase'
  102 |     m_fontDatabase.reset(new QGenericUnixFontDatabase());
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In member function 'virtual QAbstractEventDispatcher* QOffscreenIntegration::createEventDispatcher() const':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:243:42: error: 'QEventDispatcherOS2' was not declared in this scope
  243 |     return new QOffscreenEventDispatcher<QEventDispatcherOS2>();
      |                                          ^~~~~~~~~~~~~~~~~~~
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:243:61: error: template argument 1 is invalid
  243 |     return new QOffscreenEventDispatcher<QEventDispatcherOS2>();
      |                                                             ^
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In member function 'virtual const QFont* OffscreenTheme::font(QPlatformTheme::Font) const':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:288:46: error: variable 'QFont systemFont' has initializer but incomplete type
  288 |         static QFont systemFont(QLatin1String("Sans Serif"), 9);
      |                                              ^
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:289:45: error: variable 'QFont fixedFont' has initializer but incomplete type
  289 |         static QFont fixedFont(QLatin1String("monospace"), 9);
      |                                             ^
In file included from G:/qt6-dev/include/QtCore/qscopedpointer.h:1,
                 from G:/qt6-os2/src/corelib/serialization/qdatastream.h:43,
                 from G:/qt6-dev/include/QtCore/qdatastream.h:1,
                 from G:/qt6-os2/src/corelib/kernel/qmetatype.h:52,
                 from G:/qt6-dev/include/QtCore/qmetatype.h:1,
                 from G:/qt6-os2/src/gui/kernel/qplatformscreen.h:53,
                 from G:/qt6-dev/include/QtGui/6.2.4/QtGui/qpa/qplatformscreen.h:1,
                 from G:/qt6-os2/src/gui/kernel/qplatformintegration.h:54,
                 from G:/qt6-dev/include/QtGui/6.2.4/QtGui/qpa/qplatformintegration.h:1,
                 from G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.h:43,
                 from G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:40:
G:/qt6-os2/src/corelib/tools/qscopedpointer.h: In instantiation of 'static void QScopedPointerDeleter<T>::cleanup(T*) [with T = QPlatformFontDatabase]':
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:116:25:   required from 'QScopedPointer<T, Cleanup>::~QScopedPointer() [with T = QPlatformFontDatabase; Cleanup = QScopedPointerDeleter<QPlatformFontDatabase>]'
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:96:46:   required from here
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:57:40: error: invalid application of 'sizeof' to incomplete type 'QPlatformFontDatabase'
   57 |         typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
      |                                        ^~~~~~~~~
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:60:9: warning: possible problem detected in invocation of 'operator delete' [-Wdelete-incomplete]
   60 |         delete pointer;
      |         ^~~~~~~~~~~~~~

Not sure if this same as Paul mention before about fontconfig....
Title: Re: Qt6
Post by: Paul Smedley on November 18, 2022, 09:29:09 pm
Yes, I'm now getting the same error. Still had to patch for the TLS plugin to compile here.
Weird, no patching for the TLS plugin here.....
Title: Re: Qt6
Post by: Paul Smedley on November 18, 2022, 09:31:14 pm
Hey Tellie,

Hi
After set beginpath i see now this error:
I have notting in popup.log


G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In constructor 'QOffscreenIntegration::QOffscreenIntegration()':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:102:30: error: expected type-specifier before 'QGenericUnixFontDatabase'
  102 |     m_fontDatabase.reset(new QGenericUnixFontDatabase());
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In member function 'virtual QAbstractEventDispatcher* QOffscreenIntegration::createEventDispatcher() const':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:243:42: error: 'QEventDispatcherOS2' was not declared in this scope
  243 |     return new QOffscreenEventDispatcher<QEventDispatcherOS2>();
      |                                          ^~~~~~~~~~~~~~~~~~~
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:243:61: error: template argument 1 is invalid
  243 |     return new QOffscreenEventDispatcher<QEventDispatcherOS2>();
      |                                                             ^
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp: In member function 'virtual const QFont* OffscreenTheme::font(QPlatformTheme::Font) const':
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:288:46: error: variable 'QFont systemFont' has initializer but incomplete type
  288 |         static QFont systemFont(QLatin1String("Sans Serif"), 9);
      |                                              ^
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:289:45: error: variable 'QFont fixedFont' has initializer but incomplete type
  289 |         static QFont fixedFont(QLatin1String("monospace"), 9);
      |                                             ^
In file included from G:/qt6-dev/include/QtCore/qscopedpointer.h:1,
                 from G:/qt6-os2/src/corelib/serialization/qdatastream.h:43,
                 from G:/qt6-dev/include/QtCore/qdatastream.h:1,
                 from G:/qt6-os2/src/corelib/kernel/qmetatype.h:52,
                 from G:/qt6-dev/include/QtCore/qmetatype.h:1,
                 from G:/qt6-os2/src/gui/kernel/qplatformscreen.h:53,
                 from G:/qt6-dev/include/QtGui/6.2.4/QtGui/qpa/qplatformscreen.h:1,
                 from G:/qt6-os2/src/gui/kernel/qplatformintegration.h:54,
                 from G:/qt6-dev/include/QtGui/6.2.4/QtGui/qpa/qplatformintegration.h:1,
                 from G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.h:43,
                 from G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:40:
G:/qt6-os2/src/corelib/tools/qscopedpointer.h: In instantiation of 'static void QScopedPointerDeleter<T>::cleanup(T*) [with T = QPlatformFontDatabase]':
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:116:25:   required from 'QScopedPointer<T, Cleanup>::~QScopedPointer() [with T = QPlatformFontDatabase; Cleanup = QScopedPointerDeleter<QPlatformFontDatabase>]'
G:/qt6-os2/src/plugins/platforms/offscreen/qoffscreenintegration.cpp:96:46:   required from here
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:57:40: error: invalid application of 'sizeof' to incomplete type 'QPlatformFontDatabase'
   57 |         typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ];
      |                                        ^~~~~~~~~
G:/qt6-os2/src/corelib/tools/qscopedpointer.h:60:9: warning: possible problem detected in invocation of 'operator delete' [-Wdelete-incomplete]
   60 |         delete pointer;
      |         ^~~~~~~~~~~~~~

Not sure if this same as Paul mention before about fontconfig....

I think you're back to getting further than me now, so you'll have to either fix it yourself or wait for me to catch up :)

My GCC 9.5.0 build failed as I didn't clear cmakecache.txt - so it tried to compile with gcc 12 and link with gcc 9 libs, which not surprisingly failed :P

More later...

Edit: I just pushed a probable fix for this...
Title: Re: Qt6
Post by: TeLLie on November 18, 2022, 10:56:17 pm
Hi

I had indeed use the fix you have pushed, i had the fix taken from qt5
Title: Re: Qt6
Post by: Paul Smedley on November 18, 2022, 11:49:07 pm
I'm now dying here:
Code: [Select]
[ 90%] Building CXX object src/printsupport/CMakeFiles/PrintSupport.dir/PrintSupport_autogen/mocs_compilation.cpp.o
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp: In static member function 'static void QPrintDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)':
U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:93:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   93 |         case 1: _t->d_func()->_q_togglePageSetCombo((*reinterpret_cast< std::add_pointer_t<bool>>(_a[1]))); break;
      |                             ^~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:10,
                 from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/dev/qtbase-everywhere-src-6.2.4/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'
   51 | class QPrintDialogPrivate;
      |       ^~~~~~~~~~~~~~~~~~~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:94:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   94 |         case 2: _t->d_func()->_q_collapseOrExpandDialog(); break;
      |                             ^~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:10,
                 from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/dev/qtbase-everywhere-src-6.2.4/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'
   51 | class QPrintDialogPrivate;
      |       ^~~~~~~~~~~~~~~~~~~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:95:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   95 |         case 3: _t->d_func()->_q_checkFields(); break;
      |                             ^~
In file included from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:10,
                 from U:/DEV/qtbase-everywhere-src-6.2.4/build/src/printsupport/PrintSupport_autogen/mocs_compilation.cpp:4:
U:/dev/qtbase-everywhere-src-6.2.4/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'
   51 | class QPrintDialogPrivate;
      |       ^~~~~~~~~~~~~~~~~~~
make[1]: *** [src/printsupport/CMakeFiles/PrintSupport.dir/PrintSupport_autogen/mocs_compilation.cpp.o] Error 1
make: *** [PrintSupport_autogen/mocs_compilation.cpp.o] Error 2
Title: Re: Qt6
Post by: TeLLie on November 19, 2022, 12:26:07 am
Hihi

I get same error now to...

G:/qt6-dev/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:93:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   93 |         case 1: _t->d_func()->_q_togglePageSetCombo((*reinterpret_cast< std::add_pointer_t<bool>>(_a[1]))); break;
      |                             ^~
In file included from G:/qt6-dev/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:10:
G:/qt6-os2/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'
   51 | class QPrintDialogPrivate;
      |       ^~~~~~~~~~~~~~~~~~~
G:/qt6-dev/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:94:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   94 |         case 2: _t->d_func()->_q_collapseOrExpandDialog(); break;
      |                             ^~
G:/qt6-os2/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'
   51 | class QPrintDialogPrivate;
      |       ^~~~~~~~~~~~~~~~~~~
G:/qt6-dev/src/printsupport/PrintSupport_autogen/2NRMJ5X7RK/moc_qprintdialog.cpp:95:29: error: invalid use of incomplete type 'class QPrintDialogPrivate'
   95 |         case 3: _t->d_func()->_q_checkFields(); break;
      |                             ^~
G:/qt6-os2/src/printsupport/dialogs/qprintdialog.h:51:7: note: forward declaration of 'class QPrintDialogPrivate'


BTw...

the latest push you made about #include <QtEventDispatcherSupport/private/qos2guieventdispatcher_p.h>
I get here a error that it could not find file.....
If i change to #include <QtGui/Support/private/qos2guieventdispatcher_p.h>
Then it is ok
Title: Re: Qt6
Post by: Paul Smedley on November 19, 2022, 01:10:48 am
Fixed the src\plugins\platforms\offscreen\qoffscreenintegration.cpp issue, that's what I get for committing something untested :/
Title: Re: Qt6
Post by: Dave Yeo on November 19, 2022, 04:33:06 am
Yes, I'm now getting the same error. Still had to patch for the TLS plugin to compile here.
Weird, no patching for the TLS plugin here.....

Yea, I can't understand what is happening but for some reason it thinks I have IPv6 support.
I created a branch and committed it locally.
Title: Re: Qt6
Post by: Paul Smedley on November 19, 2022, 05:21:53 am
I am so close... got to 92% complete and got a missing symbol from sqlite - so now switched to rpm sqlite3 rather than my local build.

I compiled a console helloworld and it works, tried a gui one, and i'm getting:
Code: [Select]
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.

Probably/hopefully as I haven't 'installed' it yet, so it can't find qos2.dll...
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley on November 19, 2022, 06:39:35 am
Cool, I guess that script should work for building qtdeclarative
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Dave Yeo 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()
Title: Re: Qt6
Post by: TeLLie 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 ?
Title: Re: Qt6
Post by: TeLLie 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...
Title: Re: Qt6
Post by: TeLLie 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.

Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Paul Smedley on November 20, 2022, 06:33:51 am
Well my SIGSEGV was due to the versions of freetype and/or fontconfig on my laptop.

Building on my Thinkcentre M93P which in a pure RPM environment, the screenshot shows the first ever Qt6 gui app running on ArcaOS :)

Admittedly, it's a simple hello world, but I'm still pretty pumped!
Title: Re: Qt6
Post by: Paul Smedley on November 20, 2022, 06:41:37 am
For reference, to built the other qt modules, use a configure command like the below:
Code: [Select]
dash /qt6/bin/qt-configure-module .. 2>&1 | tee configure.log
Title: Re: Qt6
Post by: Dave Yeo on November 20, 2022, 06:58:02 am
For reference, to built the other qt modules, use a configure command like the below:
Code: [Select]
dash /qt6/bin/qt-configure-module .. 2>&1 | tee configure.log

Good to see your hello world worked. /qt6 is where you installed? Have to retry as I tried the latest beta and it wiped my ramdisk so have to reinstall.
Title: Re: Qt6
Post by: Paul Smedley on November 20, 2022, 07:15:12 am
Hey Dave,

For reference, to built the other qt modules, use a configure command like the below:
Code: [Select]
dash /qt6/bin/qt-configure-module .. 2>&1 | tee configure.log

Good to see your hello world worked. /qt6 is where you installed? Have to retry as I tried the latest beta and it wiped my ramdisk so have to reinstall.

Yeah I installed to /qt6. I also fixed the installer to install shell scripts vs .bat files :)

Edit: Current binaries are at https://smedley.id.au/tmp/qt6base-6.2.4-os2-20221120.zip - also includes my helloworldgui.exe example app.
Title: Re: Qt6
Post by: Paul Smedley on November 20, 2022, 09:22:30 am
qtdeclarative is built - source at https://github.com/psmedley/qt6-declarative-os2

Next up is QtMultimedia - https://github.com/psmedley/qt6-multimedia-os2 - which it turns out, also needs QtShaderTools - https://github.com/psmedley/qt6-shadertools-os2

Edit: these are built now, on to QtSVG - https://github.com/psmedley/qt6-svg-os2
Title: Re: Qt6
Post by: TeLLie on November 20, 2022, 11:16:56 am
Hi Paul,

I rebuild it with the latest changes you make but it still asked for the os2 plugin.
Did you do something others or??

I also tried you're build and see same...
F:\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.

Title: Re: Qt6
Post by: David McKenna on November 20, 2022, 01:39:50 pm
Paul,

 You never cease to amaze! 'Helloworldgui' works here and console too. Only 10 days and you have a basic working QT6.... thanks heaps!

Regards,
Title: Re: Qt6
Post by: TeLLie on November 20, 2022, 02:56:14 pm
Hi Paul,
Have to correct my previous answer about you're build, thats working.

But i did a clean build and then install it to g:/qt6 but its still says it cannot find plugin

Is there some change that you dint push yet or?

I tried to compile qt6-declarative-os2
Had to compile qt6-shadertools-os2 first
That build fine.

But if i search on the link error i see thats the error inside the Qt6Shad6.dll but not in the .a file.


file D:\temp\ldconv_libstdc++_a_2997637a5b1a199520.lib(cxx11-ios_failure.obj): undefined symbol __ZNSt12system_errorC2ESt10error_codeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
file D:\temp\ldconv_libstdc++_a_2997637a5b1a199520.lib(cxx11-ios_failure.obj): undefined symbol __ZNSt12system_errorC2ESt10error_codePKc
Title: Re: Qt6
Post by: Dave Yeo on November 20, 2022, 07:50:02 pm
Hi Paul,
Have to correct my previous answer about you're build, thats working.

But i did a clean build and then install it to g:/qt6 but its still says it cannot find plugin

Is there some change that you dint push yet or?

I tried to compile qt6-declarative-os2
Had to compile qt6-shadertools-os2 first
That build fine.

But if i search on the link error i see thats the error inside the Qt6Shad6.dll but not in the .a file.


file D:\temp\ldconv_libstdc++_a_2997637a5b1a199520.lib(cxx11-ios_failure.obj): undefined symbol __ZNSt12system_errorC2ESt10error_codeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
file D:\temp\ldconv_libstdc++_a_2997637a5b1a199520.lib(cxx11-ios_failure.obj): undefined symbol __ZNSt12system_errorC2ESt10error_codePKc

My build here seems to work fine, displays the latest (from Paul's package) helloworldgui fine. Previous one crashed.
Title: Re: Qt6
Post by: TeLLie on November 20, 2022, 09:47:16 pm
Hi
Finaly i got it working :)

Title: Re: Qt6
Post by: Dave Yeo on November 20, 2022, 10:26:34 pm
Hi
Finaly i got it working :)

Good, which GCC did you build with? I used the RPM 9.2.0
Title: Re: Qt6
Post by: TeLLie on November 20, 2022, 11:00:02 pm
Hi Dave

Used gcc 1220
Title: Re: Qt6
Post by: Paul Smedley on November 21, 2022, 12:16:16 am
Hey Dave,
You never cease to amaze! 'Helloworldgui' works here and console too. Only 10 days and you have a basic working QT6.... thanks heaps!

Thanks! To be honest, I didn't expect to get this far, this quick. I'd also expect that once we try and port some apps, that there will be problems, but we'll cross that bridge when we get to it.

I've now built:
QtDeclarative
QtMultimedia
QtShaderTools
QtSVG
QtTools
QtWebsockets
QtWebchannel

I've created a repo for QtWebEngine, and have created a set of diffs from the Qt 5.15.2 code, but haven't yet started moving over any OS2 specific files, nor adapting the changes in *.pri to CMakeLists.txt. A task for this week :)

Cheers,

Paul.
Title: Re: Qt6
Post by: Tom on November 21, 2022, 01:09:06 am
F:\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.

Is the information in this ticket maybe useful? https://github.com/bitwiseworks/qtbase-os2/issues/77
Title: Re: Qt6
Post by: Paul Smedley on November 21, 2022, 01:27:52 am
F:\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.

Is the information in this ticket maybe useful? https://github.com/bitwiseworks/qtbase-os2/issues/77

Nope, there was just something wrong with Tellie's environment. Most likely, he didnt rerun the configuration script to pickup changes that had been made to correctly detect dlopen support on OS/2.

Cheers,

Paul.
Title: Re: Qt6
Post by: Jochen Schäfer on November 21, 2022, 08:27:08 am
@Paul:
Can you please include the translations in your build, too? It's missing from the Qt5 and there is an issue open for it.
Title: Re: Qt6
Post by: TeLLie on November 21, 2022, 08:31:01 am
F:\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.

Is the information in this ticket maybe useful? https://github.com/bitwiseworks/qtbase-os2/issues/77

Nope, there was just something wrong with Tellie's environment. Most likely, he didnt rerun the configuration script to pickup changes that had been made to correctly detect dlopen support on OS/2.

Cheers,

Paul.

Yes where the env....

Title: Re: Qt6
Post by: Paul Smedley on November 21, 2022, 09:36:33 am
@Paul:
Can you please include the translations in your build, too? It's missing from the Qt5 and there is an issue open for it.

I can look at this - do you have any idea how these are enabled on other platforms?
Title: Re: Qt6
Post by: Paul Smedley on November 21, 2022, 09:42:18 am
Quick update to say there's no update today. I had some other business to attend to this evening, so all I can tease with is that the inital setup of https://github.com/psmedley/qt6-webengine-os2
Title: Re: Qt6
Post by: Jochen Schäfer on November 21, 2022, 10:27:27 am
@Paul:
Can you please include the translations in your build, too? It's missing from the Qt5 and there is an issue open for it.

I can look at this - do you have any idea how these are enabled on other platforms?
TBH, I have no clue.
All I know is, that it is its own module QtTranslations, which BWW hadn't cloned, so I have to bundle the translations with FeatherPad and FeatherNote, which is less than ideal.
It also concerns the shortcuts and its translations. Without it and any other locale than en, shortcuts can fail to be recognized. I had this issue with my de locale. Eg. CTRL will be translated to STRG in German and the CTRL shortcuts will not work.

Title: Re: Qt6
Post by: Paul Smedley on November 21, 2022, 11:03:33 am
Hi Jochen,

I think you answered my question :) it's the module QtTranslations - https://download.qt.io/official_releases/qt/6.2/6.2.4/submodules/qttranslations-everywhere-src-6.2.4.tar.xz should be easy enough to build. I might even try it before I start looking at QtWebEngine.
Title: Re: Qt6
Post by: Paul Smedley on November 22, 2022, 02:25:20 am
Hi All,

Wondering if anyone has tried to port any Qt6 apps using either the zip I provided or their own self build from git? I'm curious how apps that are more complicated than the 'hello world' example might perform.

Cheers,

Paul.
Title: Re: Qt6
Post by: Dave Yeo on November 22, 2022, 05:43:42 am
I tried qt-creator as that is how it is recommended to build the examples. Too much missing I think.
Code: [Select]
-- Could NOT find Qt6Qml (missing: Qt6Qml_DIR)
-- Could NOT find Qt6Core5Compat (missing: Qt6Core5Compat_DIR)
CMake Error at cmake/FindQt5.cmake:57 (find_package):
  Found package configuration file:

    h:/tmp/qt6/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "Qml".

  Expected Config file at "h:/tmp/qt6/lib/cmake/Qt6Qml/Qt6QmlConfig.cmake"
  does NOT exist

  Failed to find Qt component "Core5Compat".

  Expected Config file at
  "h:/tmp/qt6/lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfig.cmake" does NOT
  exist



Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "K:/work/qt-creator/qtcreator_build/CMakeFiles/CMakeOutput.log".
See also "K:/work/qt-creator/qtcreator_build/CMakeFiles/CMakeError.log".

I found the missing QT6Core5Compat error interesting but had other stuff to do so didn't follow up yet.
Title: Re: Qt6
Post by: Paul Smedley on November 22, 2022, 06:27:09 am
How did you try and configure it?
Title: Re: Qt6
Post by: TeLLie on November 22, 2022, 07:15:49 am
Hi Paul

I compile several progs
Some worked some didn't but what i notice to the ones that compiled with qt6 so far is that the tabs from the menubar Are not looking fine, as it's not showing all lines.
Look add linguïst or designer. When home i put some here so peeps can test...
Title: Re: Qt6
Post by: Dave Yeo on November 22, 2022, 07:28:51 am
How did you try and configure it?

Followed the instructions,
Code: [Select]
    mkdir qtcreator_build
    cd qtcreator_build

    cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources
    cmake --build .

with the -G Ninja removed as recommended if not having Ninja, along with path to llvm also removed. It died almost immediately before the --build stage
Title: Re: Qt6
Post by: Jochen Schäfer on November 22, 2022, 08:51:55 am
Hi All,

Wondering if anyone has tried to port any Qt6 apps using either the zip I provided or their own self build from git? I'm curious how apps that are more complicated than the 'hello world' example might perform.

Cheers,

Paul.
Not yet. When I find some time, I will try to compile something.

BTW, now that you also ported Python 3, how probable is a port of PyQt6?
Title: Re: Qt6
Post by: Paul Smedley on November 22, 2022, 09:43:32 am
Hi All,

Wondering if anyone has tried to port any Qt6 apps using either the zip I provided or their own self build from git? I'm curious how apps that are more complicated than the 'hello world' example might perform.
Not yet. When I find some time, I will try to compile something.

BTW, now that you also ported Python 3, how probable is a port of PyQt6?

Anything is possible, but qtwebengine is the next target. Only 166 source files with rejected diffs, let along the ones that patch couldn't find (moved or renamed)  :o

We're away for the weekend, so not sure how much progress there will be.
Title: Re: Qt6
Post by: Paul Smedley on November 22, 2022, 09:44:43 am
Hi Jochen,

I think you answered my question :) it's the module QtTranslations - https://download.qt.io/official_releases/qt/6.2/6.2.4/submodules/qttranslations-everywhere-src-6.2.4.tar.xz should be easy enough to build. I might even try it before I start looking at QtWebEngine.

Had a quick look, not as trivial as the other modules, it will have to wait until after I get stuck/bored with QtWebEngine :)

Edit: had a look at CmakeLists.txt for qtwebengine, Needs cmake >=3.19 - so guess I'd better look at that...
Title: Re: Qt6
Post by: Jochen Schäfer on November 22, 2022, 02:40:55 pm
Hi All,

Wondering if anyone has tried to port any Qt6 apps using either the zip I provided or their own self build from git? I'm curious how apps that are more complicated than the 'hello world' example might perform.
Not yet. When I find some time, I will try to compile something.

BTW, now that you also ported Python 3, how probable is a port of PyQt6?

Anything is possible, but qtwebengine is the next target. Only 166 source files with rejected diffs, let along the ones that patch couldn't find (moved or renamed)  :o

We're away for the weekend, so not sure how much progress there will be.
Hi Paul.

No pressure here. We all can be happy, that you do that work. If at some time, PyQt6 falls from the sky ;-), some tools will be possible.
Title: Re: Qt6
Post by: TeLLie on November 22, 2022, 05:19:43 pm
Hi PAul,

On several programs i get this in popup.log

11-22-2022  17:14:44  SYS2070  PID 0295  TID 0001  Slot 007a
F:\QT6_SOURCE\FOCUSWRITER-1.8.3\CMAKE-1220\FOCUSWRITER.EXE
QT6QUIC6->QT6QUIC6.__ZN20QQuickFileNameFilter16staticMetaObjectE
127

I see its in Qt6Quic6.dll and Qt6QuickDialogs2Utils_dll.a
If i add the .a to exe file its still show this error in popup

Also.....
H:\usr\local1220\lib>chkdll32 Qt6Quic6.dll
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'Qt6Gui6' --> H:\USR\LOCAL1220\LIB\QT6GUI6.DLL.
Loading DLL 'Qt6Core6' --> H:\USR\LOCAL1220\LIB\QT6CORE6.DLL.
Loading DLL 'Qt6Quic6' --> NOT loaded!
DosExit or exception while loading 'Qt6Quic6'.
Loading DLL 'Qt6Qml6' --> H:\USR\LOCAL1220\LIB\QT6QML6.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.

and

[chkdll32 Qt6Mult6.dll]

Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'Qt6Core6' --> H:\USR\LOCAL1220\LIB\QT6CORE6.DLL.
Loading DLL 'Qt6Mult6' --> NOT loaded!
DosExit or exception while loading 'Qt6Mult6'.
Loading DLL 'Qt6Qml6' --> H:\USR\LOCAL1220\LIB\QT6QML6.DLL.
Loading DLL 'Qt6Gui6' --> H:\USR\LOCAL1220\LIB\QT6GUI6.DLL.
Loading DLL 'Qt6Quic6' --> H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL.
Unable to load procedure from Qt6Quic6 (file: H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL)
Entry '__ZNK10QSGTexture16removedFromAtlasEP23QRhiResourceUpdateBatch' could not be resolved.
DosQueryProcAddr returned: 127
Unable to load procedure from Qt6Quic6 (file: H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL)
Entry '__ZNK10QSGTexture14isAtlasTextureEv' could not be resolved.
DosQueryProcAddr returned: 127
Unable to load procedure from Qt6Quic6 (file: H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL)
Entry '__ZNK10QSGTexture24normalizedTextureSubRectEv' could not be resolved.
DosQueryProcAddr returned: 127
Unable to load procedure from Qt6Quic6 (file: H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL)
Entry '__ZN10QSGTexture11qt_metacallEN11QMetaObject4CallEiPPv' could not be resolved.
DosQueryProcAddr returned: 127
Unable to load procedure from Qt6Quic6 (file: H:\USR\LOCAL1220\LIB\QT6QUIC6.DLL)

Seems there some wrong ???

Btw do you see same  or...
If not could you zip up al youre dll and .a

Title: Re: Qt6
Post by: Paul Smedley on November 22, 2022, 08:52:16 pm
Hey Tellie, I'm guessing that DLL is from https://download.qt.io/official_releases/qt/6.2/6.2.4/submodules/qtquicktimeline-everywhere-src-6.2.4.tar.xz ? I haven't tried to build this module...

Edit: Nope it's from QtQuick - which QtDeclarative didn't enable for some reason.

Edit2: because at the time I built QtDeclarative, I hadn't built QtShaderTools
Title: Re: Qt6
Post by: TeLLie on November 23, 2022, 12:00:03 am
Hi PAul,

What should i do rebuild without QtShaderTools
Or any other suggestion?
Title: Re: Qt6
Post by: Paul Smedley on November 23, 2022, 02:06:51 am
Hey Tellie,

I set a new build of QtDeclarative going this morning and QtShaderTools was detected, so QtQuick will get built. I'll do some testing and confirm if I can reproduce your issue. It's potentially an issue with symbols not being correctly exported....
Title: Re: Qt6
Post by: Paul Smedley on November 25, 2022, 12:22:24 am
Hey all, sorry, I've had a busy week, and am heading to our holiday house this weekend.

I've been spending what little time I have updating cmake to v3.19... I got it building this morning, but its crashing whilst generating makefiles - which is less that idea.

I also discovered a problem in how cmake generates 8.3 DLL names - where it just uses the first 8 characted of the DLL name. In general this works OK.... but in cases where Qt6 wants to build Qt6Multimedia & Qt6MultimediaWidgets - then both DLL's end up being called Qt6Multi and we get into trouble.

I'll hack cmake to do something a bit more creative once I fix the crashes in 3.19...
Title: Re: Qt6
Post by: Paul Smedley on November 25, 2022, 04:31:11 am
Still working on the DLL naming issue with cmake, but I got bored and compiled focuswriter 1.8.3....
see attached screenshot...

There are definitely some issues, trying to paste from the clipboard results in a crash :) but it's encouraging.
Title: Re: Qt6
Post by: Paul Smedley on November 25, 2022, 05:38:20 am
https://smedley.id.au/tmp/cmake-3.19.8-os2-20221125.zip seems to work.... for DLL names > 8 it now uses the first 7 and last 1 characters of the DLL name; and currently isn't appending the DLL version number to the DLL name.
Title: Re: Qt6
Post by: TeLLie on November 25, 2022, 08:23:48 am
Hi Paul,

Thankz for the newer build :)
Need i to recompile all with the newer cmake or just the multimedia ?

And have fun in you're holidayhouse :P
Title: Re: Qt6
Post by: Paul Smedley on November 25, 2022, 09:58:04 am
Hey Tellie,
Thankz for the newer build :)
Need i to recompile all with the newer cmake or just the multimedia ?

And have fun in you're holidayhouse :P

Most/all of the DLL names will change, so ideally, rebuild all. I'm doing a full rebuild myself to see if anything else is broken :P

Once I've done the rebuild I'll upload a new zip as an alpha so at least if anyone wants to try and port anything there is a consistent set of libs.

I also need to work out why focus writer / cmake couldn't find the qt libs, so I had to manually hack make files to get it linking ..
Title: Re: Qt6
Post by: Paul Smedley on November 25, 2022, 10:27:50 pm
I tried qt-creator as that is how it is recommended to build the examples. Too much missing I think.
Code: [Select]
-- Could NOT find Qt6Qml (missing: Qt6Qml_DIR)
-- Could NOT find Qt6Core5Compat (missing: Qt6Core5Compat_DIR)
CMake Error at cmake/FindQt5.cmake:57 (find_package):
  Found package configuration file:

    h:/tmp/qt6/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "Qml".

  Expected Config file at "h:/tmp/qt6/lib/cmake/Qt6Qml/Qt6QmlConfig.cmake"
  does NOT exist

  Failed to find Qt component "Core5Compat".

  Expected Config file at
  "h:/tmp/qt6/lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfig.cmake" does NOT
  exist



Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "K:/work/qt-creator/qtcreator_build/CMakeFiles/CMakeOutput.log".
See also "K:/work/qt-creator/qtcreator_build/CMakeFiles/CMakeError.log".

I found the missing QT6Core5Compat error interesting but had other stuff to do so didn't follow up yet.

FYI - qt5compat from https://download.qt.io/official_releases/qt/6.2/6.2.4/submodules/qt5compat-everywhere-src-6.2.4.tar.xz builds out of the box... and gives me a Qt6Core5Compat_dll.a

Qt Creator 8.0.1 configure completes now...
Title: Re: Qt6
Post by: Paul Smedley on November 26, 2022, 05:23:24 am
Documenting this here whilst I think about it - I suspect the focuswriter issues with pasting are due to the hacks I made to get https://github.com/psmedley/qt6-base-os2/blob/main/src/plugins/platforms/os2/qos2clipboard.cpp building :)
Title: Re: Qt6
Post by: Paul Smedley on November 26, 2022, 09:47:26 am
Making progress with QtCreator.. some hacks required to get past build breaks...

One thing that will be needed is support in cmake for WINDOWS_EXPORT_ALL_SYMBOLS - otherwise the Proparser DLL has no exports....
Title: Re: Qt6
Post by: Paul Smedley on November 26, 2022, 10:54:14 pm
OK... time for what is VERY much an ALPHA release...

Qt6 binaries/libraries - https://smedley.id.au/tmp/qt6-6.2.4-os2-20221127.zip

Focuswriter 1.8.3 for Qt6 - https://smedley.id.au/tmp/focuswriter-1.8.3-qt6-20221127.zip

I already know about a TRAP with copy/paste form Focuswriter - I've created a minimal ticket to track this at https://github.com/psmedley/qt6-base-os2/issues/1

There are BOUND to be other issues as well.

Some release notes:
1) As I stated at the start of this thread, this release would not have been possible with bww's work on Qt5 - most of the OS/2 specific changes for Qt6 were lifted straight from the Qt5 code; with build fixes coming from me.
2) There was a LOT of work to adapt cmake to a later version which was needed for Qt6; and also to adapt the Qt6 build system which completely changed.
3) QtWebEngine is NOT (yet?) included, so at this stage, there is no browser possible with Qt6. It is loosely on the agenda to try and get this building, but it's a big job.
4) Thanks to Elbert Pol and Dave Yeo, who have been testing the build system and identifying issues
5) All the code for Qt is at my github at https://github.com/psmedley
6) Currently included is:

Whilst I'll continue to work on this as time permits, any sponsorship is greatly appreciated - via PayPal using the link at https://os2ports.smedley.id.au, or via the Arca Noea webstore at https://www.arcanoae.com/shop/os2-ports-paul-smedley

If nothing else - if you're interested in seeing this work continue, please comment here to let me know that I'm not wasting my time on this!

Cheers,

Paul
Title: Re: Qt6
Post by: David McKenna on November 26, 2022, 11:36:00 pm
 Thanks Paul! Of course I'm interested in seeing this continue - unbelievable how fast you are getting results. Thanks to Dave and Tellie too for helping make it work.

Regards,

 P.S. - the link to Focuswriter gives a 404...

Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 12:54:04 am
Oops, will fix focuswriter link when we get back to the house

Edit: link is fixed
Title: Re: Qt6
Post by: Dave Yeo on November 27, 2022, 01:59:19 am

3) QtWebEngine is NOT (yet?) included, so at this stage, there is no browser possible with Qt6. It is loosely on the agenda to try and get this building, but it's a big job.


Bitwise just discovered that there is now a requirement of node.js for QTWebEngine. Hopefully it is portable enough for dmik to port.
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 02:39:23 am
Yeah I saw that, I haven't even gotten as far as trying to run configure for it yet with the Qt6 version
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 06:29:10 am
I refreshed the zip file with a new qos2.dll that fixes the clipboard issues.
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 09:35:48 am
configure output from qtwebengine is attached... a few dependencies missing..
Title: Re: Qt6
Post by: Martin Iturbide on November 27, 2022, 02:03:57 pm
Whilst I'll continue to work on this as time permits, any sponsorship is greatly appreciated - via PayPal using the link at https://os2ports.smedley.id.au, or via the Arca Noea webstore at https://www.arcanoae.com/shop/os2-ports-paul-smedley

If nothing else - if you're interested in seeing this work continue, please comment here to let me know that I'm not wasting my time on this!

Thank you very much Paul for your efforts with porting Qt 6. This is very interesting because it opens the door of the potencial software that can be ported.

Like:
- https://opensourcelibs.com/libs/qt (https://opensourcelibs.com/libs/qt)
- https://wiki.manjaro.org/index.php/List_of_Qt_Applications (https://wiki.manjaro.org/index.php/List_of_Qt_Applications)


Regards
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 10:26:35 pm
Hey Martin,

Whilst I'll continue to work on this as time permits, any sponsorship is greatly appreciated - via PayPal using the link at https://os2ports.smedley.id.au, or via the Arca Noea webstore at https://www.arcanoae.com/shop/os2-ports-paul-smedley

If nothing else - if you're interested in seeing this work continue, please comment here to let me know that I'm not wasting my time on this!

Thank you very much Paul for your efforts with porting Qt 6. This is very interesting because it opens the door of the potencial software that can be ported.

Like:
- https://opensourcelibs.com/libs/qt (https://opensourcelibs.com/libs/qt)
- https://wiki.manjaro.org/index.php/List_of_Qt_Applications (https://wiki.manjaro.org/index.php/List_of_Qt_Applications)

Note that many of the projects in the above are still Qt4/Qt5... I actually struggled to find many examples of projects that have moved to Qt6. Scribus is one that I'll try and build in the near future.

Cheers,

Paul.
Title: Re: Qt6
Post by: David McKenna on November 27, 2022, 11:00:07 pm
Hi Paul,

  Tried Focuswriter and it seems to work OK... can type text and copy from clipboard, spell checking works, can change most settings and they work (with a few exceptions), can save and print to pdf.

  A couple of things don't work: no typing sounds, no symbols available, no themes (that I can tell), and no printer (except pdf).

  One odd thing is drop-down menus appear in the wrong location - seems to be to the left and above where they should be. You have to aim your cursor where it 'should' be to make a selection, but it works if you do. The menu bar items appear over the menu bar - if you click where they appear, you get what is under the box on the menu bar, not what is in the box. Have to aim below and to the right of the box.

  Not sure if these issues are due to QT6 or Focuswriter problems. Thanks for you work on this!

Regards,
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 11:35:46 pm
Hey Dave,

Thanks! that's encouraging!! Sound could be just to an issue with QtMultimedia (I guess), printing I'll have to check what CUPS support was detected by QtBase - themes? I guess these are focuswriter themes? Perhaps I didn't package it properly. I didn't configure focuswriter with an install directory, so it defaulted to /usr/local which was going to be a PITA - and to reconfigure it meant hand hacking some makefiles to account for some issues detecting libraries <sigh>

Menu bar items almost sounds like https://github.com/bitwiseworks/qtbase-os2/commit/b037b745dd403030bdd8962016787730829a74e4

Oops I thought I'd picked up this commit, but turns out I hadn't (see https://github.com/psmedley/qt6-base-os2/blob/main/src/plugins/platforms/os2/qos2window.cpp)

I'll update this tonight, and also investigate the sound and printing. I assume sound works in Qt5?

Cheers,

Paul.
Title: Re: Qt6
Post by: David McKenna on November 27, 2022, 11:50:43 pm
Hey Paul,

  Actually, packaging may be the culprit with sounds (says it can't find /Programs/focuswriter/share/keyenter.wav), themes (desktop backgrounds for focuswriter) and symbols. Printing probably not working in QT6, because no printer appears (except PDF) in the printer dialog of focuswriter. Also didn't mention no drag and drop, but don't know if that should work or not. No idea about the drop down issue - I'll look for your update to see if that helps - thanks!

Regards,

  P.S. forgot to mention that the 'Helloworld' apps bundled with the latest drop don't work - I think you changed the DLL naming structure and they were made for the old format.
Title: Re: Qt6
Post by: Paul Smedley on November 27, 2022, 11:57:56 pm
Oops forgot to remove the helloworld examples :/

I'll do a proper package of focuswriter then I get a chance.
Title: Re: Qt6
Post by: Paul Smedley on November 28, 2022, 08:22:42 am
Hey Dave,

Menu bar items almost sounds like https://github.com/bitwiseworks/qtbase-os2/commit/b037b745dd403030bdd8962016787730829a74e4

Oops I thought I'd picked up this commit, but turns out I hadn't (see https://github.com/psmedley/qt6-base-os2/blob/main/src/plugins/platforms/os2/qos2window.cpp)

I'll update this tonight, and also investigate the sound and printing. I assume sound works in Qt5?

https://smedley.id.au/tmp/qt6-6.2.4-qos2-20221128.zip has a new qos2.dll that might fix the menu bar issue - copy the new dll into \qt6\plugins\platform
Title: Re: Qt6
Post by: Paul Smedley on November 28, 2022, 09:10:36 am
I'll do a proper package of focuswriter then I get a chance.

https://smedley.id.au/tmp/focuswriter-1.8.3-qt6-20221128.zip
Title: Re: Qt6
Post by: Paul Smedley on November 28, 2022, 09:15:57 am
Actually, packaging may be the culprit with sounds (says it can't find /Programs/focuswriter/share/keyenter.wav), themes (desktop backgrounds for focuswriter) and symbols. Printing probably not working in QT6, because no printer appears (except PDF) in the printer dialog of focuswriter. Also didn't mention no drag and drop, but don't know if that should work or not. No idea about the drop down issue - I'll look for your update to see if that helps - thanks!

re: printing, config.summary says:
Code: [Select]
Qt PrintSupport:
  CUPS ................................... yes

So I might have to double check patches to see if I missed anything...
Title: Re: Qt6
Post by: Paul Smedley on November 28, 2022, 10:51:57 am
I also got Qt Creator 8.01 built tonight, will see if it works tomorrow....
Title: Re: Qt6
Post by: David McKenna on November 28, 2022, 12:25:59 pm
Paul,

  Installed this new focuswriter (20221128) under C:\usr\local but it traps on starting. I'll attach the trap log...

Regards,
Title: Re: Qt6
Post by: TeLLie on November 28, 2022, 05:48:43 pm
HI Dave,

Did you try to del the conf file in the /home/.config
I notice if i set the icon under text that it failed here also.
Also i see no icons ...
Title: Re: Qt6
Post by: Paul Smedley on November 28, 2022, 11:27:52 pm
Hey Dave,

  Installed this new focuswriter (20221128) under C:\usr\local but it traps on starting. I'll attach the trap log...

I'll admit I didn't get time to try and run it myself - will try do so tonight. Does it start if you move some of the subdirectories out of the way? Perhaps there's issues loading some of the files in the subdirectories.

Cheers,

Paul.
Title: Re: Qt6
Post by: David McKenna on November 29, 2022, 01:13:08 am
 Hi Paul and Tellie!

 I tried deleting 'QTConfig.conf' in /Home/.config, but it made no difference, and was not re-created when I tried running Focuswriter again. I moved '/Share/Focuswriter' out of the way, and then Focuswriter would start, but then have all the issues I previously mentioned. So you may be on to something there Paul...

 Also changing 'Settings' -> 'Preferences' -> 'Toolbar' -> 'Style' -> 'Text Position' does nothing except get trap logs on shutdown - hadn't tried that before... and no icons here either.

 Should also mention that there is no improvement with the new qtos2.dll - drop down menus are still out of place (go to 'Settings' -> 'Preferences' and check any drop down box).

Regards,
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 03:36:17 am
Thanks guys, that's helpful. I'll create a focuswriter.xqs that may provide more useful exceptq logs. I'll also revisit the *.cpp I moved across from qt5 - I think that whilst some of my previous fixes got it building, they weren't necessarily correct - so may be causes traps like the clipboard one did :)
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 08:41:59 am
OK for me, when focuswriter is started from /focuswriter/bin/focuswriter.exe it works fine.... Perhaps it doesn't like being run from another path?
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 09:18:51 am
https://smedley.id.au/tmp/qt-creator-8.0.1-os2-20221129.zip - note that even with my cmake DLL name hack, we run into DLL hell - with 2x DLL's called languag8.dll

Needs something like the below to help it find it's DLLs:
set beginlibpath=u:\qt6\lib;u:\qt6\lib\qtcreator;u:\qt6\lib\qtcreator\plugins


On first run, it will crash (due to above issue), on second run it will ask if you want to disable a plugin - then qtcreator will start.
Title: Re: Qt6
Post by: David McKenna on November 29, 2022, 12:59:56 pm
Paul,

  When I move the focuswriter directories to C:\focuswriter\... I still get a trap on start. Focuswriter console shows this message before the trap:

'QTMultimedia is not currently supported on this platform or compiler.'

 Maybe that is a clue?

 Edit: I also tried QTCreator and it seems to work well. Even menus and drop-down boxes are located properly - wonder what is wrong with focuswriter? The only issue I noticed was no 'Help' available and got this in the console:

[C:\qt6\bin]qtcreator
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
QTextBrowser: No document for qthelp://org.qt-project.qtcreator.801/doc/index.ht
ml

 and of course I don't have a clue how to use it, so can't really test it well...

Regards,
Title: Re: Qt6
Post by: TeLLie on November 29, 2022, 01:14:40 pm
Hi

As i told before here it starts from every dit i tried

It traps as soon i choose for icons under
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 09:28:36 pm
Hey Dave!

  When I move the focuswriter directories to C:\focuswriter\... I still get a trap on start. Focuswriter console shows this message before the trap:

'QTMultimedia is not currently supported on this platform or compiler.'

 Maybe that is a clue?

 Edit: I also tried QTCreator and it seems to work well. Even menus and drop-down boxes are located properly - wonder what is wrong with focuswriter? The only issue I noticed was no 'Help' available and got this in the console:

[C:\qt6\bin]qtcreator
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
SOFT ASSERT: "index >= 0" in file U:/DEV/qt-creator-8.0.1/src/plugins/help/local
helpmanager.cpp, line 362
QTextBrowser: No document for qthelp://org.qt-project.qtcreator.801/doc/index.ht
ml

 and of course I don't have a clue how to use it, so can't really test it well...

Regards,

I have no real clue about the ''QTMultimedia is not currently supported on this platform or compiler.'' message. I might have to grep the source. What CPU is this system? I'm wondering about some kind of CPU optimisation. Perhaps also run chkdll32 or pmdll n the Qt6Mult*.dll and check for missing dependencies?

I have no idea how to use Qt Creator either - I was just happy it loaded.

My next focus is going to be on building Scribus with Qt6 - as this is something that most users could probably use/test - then I'll move on to figuring out how to get QtWebEngine building.

Cheers,

Paul.
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 09:29:41 pm
Hi Tellie,

As i told before here it starts from every dit i tried

It traps as soon i choose for icons under

Sorry, I don't quite understand this..

Cheers,

Paul.
Title: Re: Qt6
Post by: David McKenna on November 29, 2022, 10:39:49 pm
Hey Paul and Tellie,

  CPU is an Intel i3-8100. I checked with PMDLL and all DLL's needed for focuswriter are available. Same with QT6Multa.dll and QT6Mults.dll. If it works for you guys, it makes me wonder if there is something about your build environment that I don't have that makes it work? I'll double check on another computer to see if it traps there too.

 Is there a configuration file for Focuswriter? It's not obvious if there is...

 A new Scribus would be awesome - now THAT I do have a clue how to test!

Regards,
Title: Re: Qt6
Post by: Paul Smedley on November 29, 2022, 10:51:13 pm
hey Dave,

  CPU is an Intel i3-8100. I checked with PMDLL and all DLL's needed for focuswriter are available. Same with QT6Multa.dll and QT6Mults.dll. If it works for you and Tellie, it makes me wonder if there is something about your build environment that I don't have that makes it work? I'll double check on another computer to see if it traps there too.

 Is there a configuration file for Focuswriter? It's not obvious if there is...

 A new Scribus would be awesome - now THAT I do have a clue how to test!

I have an affinity for Scribus - one of the developers is a friend that used to run OS/2 back in the day, and I also know they'll accept patches :)

Hopefully it won't take too much effort. QtWebEngine is a BIG beast...
Title: Re: Qt6
Post by: Jochen Schäfer on November 30, 2022, 01:20:56 pm
I just tested QtCreator. I have the following issue:
I can't open any projects, because OS/2's drive style paths will be recognized as relative path.
So QtCreator prepends the working directory (where it was started) to the selected path.

@Paul: Should I create issue on your Github?
Title: Re: Qt6
Post by: Paul Smedley on November 30, 2022, 09:12:38 pm
I just tested QtCreator. I have the following issue:
I can't open any projects, because OS/2's drive style paths will be recognized as relative path.
So QtCreator prepends the working directory (where it was started) to the selected path.

@Paul: Should I create issue on your Github?

Hi Jochen - from a quick grep of the qt-creator sources - looks like there is some win specific code to handle file paths, so sure, let's create an issues, but please do it in https://github.com/psmedley/qt-creator-os2 (which is empty right now, but I'll commit the code when I get a chance)
Title: Re: Qt6
Post by: Jochen Schäfer on December 01, 2022, 08:54:41 am
Hi Paul.

I created an issue report.
Title: Re: Qt6
Post by: Paul Smedley on December 01, 2022, 09:44:28 am
Thanks Jochen - will try investigate over the weekend. It's going to be a warm one, so a good time to be inside under the aircon :)
Title: Re: Qt6
Post by: Paul Smedley on December 02, 2022, 08:47:39 am
Small update. I got Qt::Quick (which is part of QtDeclarative) built. Updated binaries are at: https://smedley.id.au/tmp/qt6-6.2.4-os2-20221202.zip

This allowed me to get a little further with configuration of QtWebEnginer - and I've now made the first commit of patches to https://github.com/psmedley/qt6-webengine-os2

Note 1: There are still a bunch of rejected patches to be worked through
Note 2: Until NodeJS >= 10.19 is built, the QtWebEngine won't get built.

I've started looking at Nodejs, but the make is failing with:
Code: [Select]
../deps/v8/src/base/bits.cc:121:1: fatal error: opening dependency file U:/dev/node-v10.19.0/out/Release/.deps/U:/dev/node-v10.19.0/out/Release/obj.host/v8_libbase/deps/v8/src/base/bits.o.d.raw: No such file or directory

Clearly an issue with the determination of relative paths on OS/2, but I haven't yet been able to find the .py file that does this.

Not sure how I'll go this weekend, as I tested positive to covid this morning :(
Title: Re: Qt6
Post by: Paul Smedley on December 02, 2022, 08:58:35 am
Re: nodejs - I created https://github.com/psmedley/node-os2

I think the problems are in either:
https://github.com/psmedley/node-os2/blob/main/lib/url.js or
https://github.com/psmedley/node-os2/blob/main/tools/gyp/pylib/gyp/generator/make.py

but I could be wrong ;)

edit: I hand modified paths in out/makefile to remove the drive letters and the build got further....
Title: Re: Qt6
Post by: Paul Smedley on December 03, 2022, 06:53:24 am
A couple of teasing screenshots....

Need to fix plugins before I release an alpha....
Title: Re: Qt6
Post by: Paul Smedley on December 03, 2022, 10:03:59 pm
As promised.... https://smedley.id.au/tmp/scribus-1.7.0svn-os2-qt6-20221204.zip

Note: there are some messages from the console I need to investigate:
Code: [Select]
Broken filename passed to function
QProcessPrivate::createPipe: DosOpen(\pipe\Qt5\00008047\QProcess\0x1dfb50\Stdin)
 returned 231
Broken filename passed to function
Broken filename passed to function
Broken filename passed to function
Error loading plugin
dlopen rc=2 extra=PYTHON38
Error loading plugin
dlopen rc=2 extra=PYTHON38
pathForIcon: Unable to load icon /scribus/share/scribus/icons/1_5_1/lab.png: File not found
pathForIcon: Unable to load icon /scribus/share/scribus/icons/1_5_1/spot.png: File not found
pathForIcon: Unable to load icon /scribus/share/scribus/icons/1_5_1/register.png: File not found
QPixmap::setMask() mask size differs from pixmap size

There are also issues with screen corruption when resizing windows - I haven't noticed this with other Qt6 apps, so this may be due to some hacks I had to make to Cairo 1.14 compiling. I'll investigate in due course.

The python38 messages are from scriptpl - I'll try and fix this to use the bww python39

Feedback appreciated so I know I'm not wasting my time on this.
Title: Re: Qt6
Post by: Paul Smedley on December 03, 2022, 11:43:49 pm
Tea editor - https://smedley.id.au/tmp/tea-qt-62.0.2-os2-qt6-20221204.zip

The intent of some of these ports like Qt Creator, Scribus and Tea are to help identify bugs in the Qt6 framework. If people don't test and provide feedback, then bugs won't get fixed.

Not directed at the few people who have commented in this thread on things - Jochen, David, Dave and Elbert off the top of my covid infected brain.
Title: Re: Qt6
Post by: Paul Smedley on December 03, 2022, 11:50:05 pm
There are definitely some warts in Tea with the file open dialogs and drive letter support.... This might be related to the qt-creator issues Jochen mentioned
Title: Re: Qt6
Post by: David McKenna on December 04, 2022, 12:23:23 am
Hi Paul,

  Thanks for the ports! I tried scribus and get the same messages you do at startup - maybe a packaging issue? It seems to want icons in /scribus/share/scribus/icons/1_5_1 which doesn't exist. I also get a lot of missing icon errors when testing. There is a prefernce setting under 'user interface' where 1.5.1 is a choice, but changing it only brings more messages.

  The biggest problem I have with it is I can't choose anything in the 'C:' drive in any dialog - it always comes up blank. Any other drive is fully populated. Of course 'C:' is where everything I need is (and is the unixroot). So I can't set scribus up to use anything on 'C:'.

  The splash screen is oddly truncated at the top and right, as are all menu item dropdowns (similar to what I saw in focuswriter). Also drop down box dialogs are offset also like in focuswriter.

  I tried basic functions like adding text frames, image frames, render frames and some free-hand drawing and they all worked, but can't choose anything on 'C:'  to put in some of them. Typing and drawing seem to work fine.

 It's a great start - hope to see it progress!

  BTW - I finally figured out where the focuswriter conf file was (/Home/.config/GottCode) and deleted it, then Focuswriter would start. Themes and symbols now work, but if I choose 'typing sounds' in settings, it crashes and will not start again until I delete the conf file. So the 'typing sounds' setting is what was causing my crash.

  I'll keep testing...

Regards,

  P.S. - hope you get over the covid quickly - I had it about 2 months ago and was bedridden for 3 days and out of it for a week after that... take care of yourself!
Title: Re: Qt6
Post by: Paul Smedley on December 04, 2022, 01:31:04 am
Hey David,

I've seen the same thing as what you see with the 'C:' drive dialog except in my case it's the 'U:' drive where I'm running things from...

That one is definitely a qt6base issue as I see similar things in Tea.

I see the same with the splashscreen and the menu item dropdowns...

Covid is relatively mild so far, mild fever/chills, sore throat, body aches and coughing. Tested positive Friday morning, so on day 3 now. Can't think about anything too complex, but I can do simple things :)

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on December 04, 2022, 03:09:39 am
https://smedley.id.au/tmp/qt6core-20221204.zip has an updated qt6core.dll that seems to fix the issues navigating drives that are the same drive the app is bring run from....
Title: Re: Qt6
Post by: Dave Yeo on December 04, 2022, 05:10:19 am
There are also issues with screen corruption when resizing windows - I haven't noticed this with other Qt6 apps, so this may be due to some hacks I had to make to Cairo 1.14 compiling. I'll investigate in due course.

The last time I tried updating Cairo, something was broken, I forget what now and testing, it seems OK. Actually the system Cairo has some brokenness and IIRC, the update made it more obvious.
You can test by replacing the system Cairo by putting your Cairo and Pixman ahead in LIBPATH and trying a Mozilla app and/or a Cairo screensaver module.
Here's the patch I created for git head some time back (1.17.3pre). Pixman shouldn't need any patches, the Cairo build will break when it gets to the scripting stuff due to conflicting header names but make install will install everything needed by the OS/2 surface backend IIRC. I didn't bother with the OS/2 printing surface as GDI printing became broken anyways.
Now Cairo has a new maintainer after years of none and he dropped all the experimental backends including OS/2 to concentrate on GTK's needs.
Edit: added txt to the patch to post it.
Title: Re: Qt6
Post by: Paul Smedley on December 04, 2022, 05:26:10 am
Thank! Building Cairo 1.16.0 now with this patch, and will see if it fixes scribus...

Also created https://github.com/psmedley/cairo-os2
Title: Re: Qt6
Post by: Paul Smedley on December 04, 2022, 06:17:18 am
Updated cairo helped fix screen redraws in Scribus - I'm refreshing the zip...
Title: Re: Qt6
Post by: Paul Smedley on December 04, 2022, 08:00:18 am
Updated qt6 package includes all OS/2 fixes and also QtTranslations - https://smedley.id.au/tmp/qt6-6.2.4-os2-20221204.zip
Title: Re: Qt6
Post by: David McKenna on December 04, 2022, 03:58:04 pm
Hey Paul,

  Thanks for the update! The directories /modules, /phrasebooks, /plugins, /qml, and /translations are all empty in this archive... are they supposed to be?

Regards,
Title: Re: Qt6
Post by: TeLLie on December 04, 2022, 06:22:58 pm
Hi David,

The zip file is ok, afaik
C:\Home\Downloads>7z T qt6-6.2.4-os2-20221204.zip

7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.IBM-850,Utf16=on,HugeFiles=on,32 bits,4 CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (806C1),ASM,AES-NI)

Scanning the drive for archives:
1 file, 60993569 bytes (59 MiB)

Testing archive: qt6-6.2.4-os2-20221204.zip
--
Path = qt6-6.2.4-os2-20221204.zip
Type = zip
Physical Size = 60993569

Everything is Ok

Folders: 519
Files: 6964
Size:       202940092
Compressed: 60993569
Title: Re: Qt6
Post by: David McKenna on December 04, 2022, 06:32:00 pm
Hey Tellie!

  Thanks for showing that... I have been using 'UNZIP' to extract Paul's archives, but seeing your example I tried using '7z' and I got more files extracted with '7z' than with 'Unzip'! No idea why, didn't get any errors when using 'Unzip', but I'll be using '7z' from now on. Both QT6 and Scribus got more files extracted with 7z... strange.

  Anyway, the folders I mentioned as empty are no longer empty after using '7z'. Thanks!

Regards,
Title: Re: Qt6
Post by: Paul Smedley on December 05, 2022, 02:57:56 am
I can't explain this... I just unzipped a copy locally and those directories definitely aren't empty.
Title: Re: Qt6
Post by: Paul Smedley on December 05, 2022, 07:30:42 am
I built libtorrent and qbittorrent today - however qbittorrent needs some code to implement random number generation... https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/random.cpp#L89

This is too much for my brain today, so it will have to wait.
Title: Re: Qt6
Post by: Paul Smedley on December 05, 2022, 08:53:16 am
With some help from Steven, I got the random code working. It loads and seems to be able to add a torrent, but isn't downloading (for me at least) - possible due to the SSL errors on the console?
Code: [Select]
[U:\qbittorrent]qbittorrent
QtSingleCoreApplication: listen on local socket failed, QLocalServer::listen: Na
me error
Fontconfig error: Cannot load default config file
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslKey
qt.network.ssl: Active TLS backend does not support key creation
qt.network.ssl: The backend "cert-only" does not support QSslSocket
qt.network.ssl: The backend named "cert-only" does not support TLS
qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
https://smedley.id.au/tmp/qbittorrent-4.5.0-os2-20221205.zip
Title: Re: Qt6
Post by: Paul Smedley on December 05, 2022, 10:22:33 pm
Hey All,

I've created the following Issues in github to document some of the functional issues I've seen:
QSSL issues - https://github.com/psmedley/qt6-base-os2/issues/2
DosOpen error in console - https://github.com/psmedley/qt6-base-os2/issues/3
Socket error: QLocalSocket::connectToServer: Unknown error 49 - https://github.com/psmedley/qt6-base-os2/issues/4
"Broken filename passed to function" seen in console - https://github.com/psmedley/qt6-base-os2/issues/5

I should also document one for the menus being slightly off, but I don't have the brain capacity right now to attempt to describe it :)
Title: Re: Qt6
Post by: David McKenna on December 05, 2022, 10:51:05 pm
Hey Paul,

  I really wanted QBitTorrent to work, but just couldn't do it - same issues you mention. Tried all kinds of settings but no go. I also wonder about the message at the top of the console 'QtSingleCoreApplication: listen on local socket failed, QLocalServer::listen: Name error' which I see as well. I also see a lot of 'OpenType support missing for....' various things over and over.

  Re: Unzip problem - I think I was getting into a depleted memory situation with that. The new QT6 and apps suck up a lot of memory and I was testing for a long time so probably got into trouble with that. I've been marking DLL's to load high since then and so far no issues with unzip...

Regards,
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 01:02:51 am
https://smedley.id.au/tmp/tlsplugin-qt6-20221206.zip makes the TLS errors go away.

Ensure you remove the contents of \qt6\plugins\tls before unzipping, as the DLL name has changed and the alst full build included both new/old names :(

Of course, qbittorrent still thinks it's offline due to:
Code: [Select]
QtSingleCoreApplication: listen on local socket failed, QLocalServer::listen: Name error
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 02:55:06 am
OK I kinda know what's wrong now..... I added some debug and It's trying to connect to:
Code: [Select]
full ServerName: "\\socket\\C:/Home/.config/qBittorrent/ipc-socket"
That isn't ever going to work :)
Title: Re: Qt6
Post by: David McKenna on December 06, 2022, 04:02:05 am
Paul,

  Get a 404 on the tls plugin link...

Regards,
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 04:09:58 am
Paul,

  Get a 404 on the tls plugin link...

Regards,

Oops - didn't copy the file over to the right directory...
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 05:56:50 am
New full build, that rolls in some changes to corelib, network and of course the TLS plugin... qbittorrent still not working :(

https://smedley.id.au/tmp/qt6-6.2.4-os2-20221206.zip
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 06:56:25 am
Getting back to thinking about the crash in focuswriter when typing sounds are enabled - do sounds work at all in Qt5? I can't for the life of me see any code that enables this....
Title: Re: Qt6
Post by: Dave Yeo on December 06, 2022, 07:56:36 am
Getting back to thinking about the crash in focuswriter when typing sounds are enabled - do sounds work at all in Qt5? I can't for the life of me see any code that enables this....

They work in Dooble, playing the local radio station.
Title: Re: Qt6
Post by: TeLLie on December 06, 2022, 08:21:29 am
Hi Paul,
Afair type sounds worked in previous builds
But not sure with qt5.
But need to look as i have the older sources on a older HD.
Well let you know asap...
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 08:22:43 am
That's weird... I just don't see the code that enables audit.... I see why QtMultimedia fails with typing sounds:

Reference https://github.com/psmedley/qt6-multimedia-os2/blob/main/src/multimedia/platform/qplatformmediaintegration.cpp#L72 as we don't detect any of the supported backends, no audio is supported....
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 08:30:41 am
btw I posted about the menu problem at the Qt development mailing list... https://lists.qt-project.org/pipermail/development/2022-December/043388.html
Title: Re: Qt6
Post by: Dave Yeo on December 06, 2022, 05:29:15 pm
Getting back to thinking about the crash in focuswriter when typing sounds are enabled - do sounds work at all in Qt5? I can't for the life of me see any code that enables this....

They work in Dooble, playing the local radio station.

Seems to only be implemented in the webengine right now, namely "qt5/qtwebengine/src/3rdparty/chromium/media/audio/os2"
Title: Re: Qt6
Post by: Gregg Young on December 06, 2022, 07:44:25 pm
Hi

Sorry to be late to the party but I've been traveling. I installed the latest QT6 drop and installed Tea. I see that the drop down boxes don't work. They show the list of choices but you can't select any of them. Using the arrow keys or scroll wheel allows you to change the selection except for the drive letter. I found that by typing the drive letter in I could change drives and I can successfully change to the boot drive. I see this error message which may be related.
update_keyboards()
"D:/Home/Default/tea/keyboards"
qt.core.qobject.connect: QObject::connect: No such signal QComboBox::currentIndexChanged (QString)


I also see the high left menu corruption. Several of the edit boxes are too short for even a single line of text and they don't seem to be resizable.

I think -lcx not being added is a defect and think that 
SET(CMAKE_C_STANDARD_LIBRARIES_INIT "-lcx")
should be added to os2.cmake

I will give some additional apps a try and try building QT6.

Thanks

Gregg
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 09:14:10 pm
Hi Gregg - in my local os2.cmake - I have -lcx added to CMAKE_SHARED_LINKER_FLAGS_INIT; CMAKE_MODUE_LINKER_FLAGS_INIT & CMAKE_EXE_LINKER_FLAGS_INIT

When porting apps - you'll probably end up with thinks like QT6::WIDGETS-NOTFOUND in the generated build.make files - I need to work out why this is the case - possibly as the import libs have are qt6widgets_dll.a not qt6widgets.a - need to investigate...
Title: Re: Qt6
Post by: Paul Smedley on December 06, 2022, 11:45:04 pm
https://smedley.id.au/tmp/qt6-6.2.4-os2-20221207.zip now includes (untested) examples in the examples folder

These are bound to show bugs :)
Title: Re: Qt6
Post by: Paul Smedley on December 07, 2022, 01:41:53 am
I rebuilt qt-creator with the newer cmake, which took care of some of the DLL naming conflicts, and it also includes some fixes for path related issues.

https://smedley.id.au/tmp/qt-creator-8.0.1-os2-20221207.zip

It's still not terribly useful, as trying to tell it the path to a qmake.exe (for example) leads to a long delay, followed by a message "The qmake executable .... could not be added. Cannot start ...."

There's a (possibly related) console message:
Code: [Select]
[launcher] "qtc.utils.launcher: \"Socket error: QLocalSocket::connectToServer: Unknown error 49 (Can't assign requested address)\"\r\n"

(edited, added .zip to url)
Title: Re: Qt6
Post by: Paul Smedley on December 07, 2022, 02:37:38 am
Getting back to thinking about the crash in focuswriter when typing sounds are enabled - do sounds work at all in Qt5? I can't for the life of me see any code that enables this....

They work in Dooble, playing the local radio station.

Seems to only be implemented in the webengine right now, namely "qt5/qtwebengine/src/3rdparty/chromium/media/audio/os2"

Thanks! For ease of reference - https://github.com/bitwiseworks/qtwebengine-chromium-os2/tree/38fcc8b007408de5f3b9c711c42b31b82a6349c0/chromium/media/audio/os2

I wonder if this can be adapted to add an os2 backend to qtmultimedia - ie at https://github.com/psmedley/qt6-multimedia-os2/tree/main/src/multimedia/platform
Title: Re: Qt6
Post by: Paul Smedley on December 07, 2022, 08:15:51 am
I rebuilt qt-creator with the newer cmake, which took care of some of the DLL naming conflicts, and it also includes some fixes for path related issues.

https://smedley.id.au/tmp/qt-creator-8.0.1-os2-20221207.zip

It's still not terribly useful, as trying to tell it the path to a qmake.exe (for example) leads to a long delay, followed by a message "The qmake executable .... could not be added. Cannot start ...."

There's a (possibly related) console message:
Code: [Select]
[launcher] "qtc.utils.launcher: \"Socket error: QLocalSocket::connectToServer: Unknown error 49 (Can't assign requested address)\"\r\n"

Head scratching.... I built corelib with the unix Qprocess code - a DLL is at https://smedley.id.au/tmp/qt6core-20221207.zip

I don't get the socket error message; but I still get the 30 second delay then "The qmake executable .... could not be added. Cannot start ...."

The error is coming from https://github.com/psmedley/qt-creator-os2/blob/main/src/plugins/qtsupport/baseqtversion.cpp#L1807 but best I can tell, the executable isn't even getting called....
Title: Re: Qt6
Post by: Paul Smedley on December 07, 2022, 09:24:28 pm
Trying to get the test suite building.... might help identify where the problems are in qprocess (and elsewhere)

Also found a possible way forward for nodejs - https://chromium.googlesource.com/v8/node-ci - building it with an alternative build tool which is already used by chromium
Title: Re: Qt6
Post by: Dave Yeo on December 07, 2022, 10:44:09 pm
gn seems to work standalone.
Title: Re: Qt6
Post by: Paul Smedley on December 08, 2022, 09:09:44 am
gn seems to work standalone.

Do you have an autoninja too?
Title: Re: Qt6
Post by: Gregg Young on December 08, 2022, 05:00:37 pm

Do you have an autoninja too?

Hi Paul

I have ninja.exe. You probably do to if your qt5 web engine build got far enough U:\QT5_Workspace\qt5\qtwebengine\src\3rdparty\ninja\ninja.exe.

I got QT6 base to build. It had a problem with QDbus.dll because the lib name was wrong Dbus_1-NOTFOUND. It should have been Dbus13.dll. I fixed the CmakeLists.txt for QDbus.dll do you want a patch for it?

I am also working on adding the ability to open links and files where opening a different (child) app is required.
Title: Re: Qt6
Post by: Dave Yeo on December 08, 2022, 05:02:13 pm
gn seems to work standalone.

Do you have an autoninja too?

No, just ninja.exe and ninja.bootstrap.exe with both looking like the same bibary, same size and date and time.
Possibly it is just renamed ninja.exe or things have changed since our old version of chromium. Might have to build an older version on node.js to match our old version, 8x.x IIRC.
Attached ninja
Title: Re: Qt6
Post by: TeLLie on December 08, 2022, 06:32:26 pm

Do you have an autoninja too?

Hi Paul

I have ninja.exe. You probably do to if your qt5 web engine build got far enough U:\QT5_Workspace\qt5\qtwebengine\src\3rdparty\ninja\ninja.exe.

I got QT6 base to build. It had a problem with QDbus.dll because the lib name was wrong Dbus_1-NOTFOUND. It should have been Dbus13.dll. I fixed the CmakeLists.txt for QDbus.dll do you want a patch for it?

Hi Greg

I see in my cmakecache.txt

//The directory containing a CMake configuration file for DBus1.
DBus1_DIR:PATH=h:/usr/local1220/lib/cmake/DBus1

//Path to a file.
DBus1_INCLUDE_DIR:PATH=h:/usr/local1220/include/dbus-1.0

//Path to a library.
DBus1_LIBRARY:FILEPATH=h:/usr/local1220/lib/dbus-1_dll.a

But i have also a dbus-13_dll.a



I am also working on adding the ability to open links and files where opening a different (child) app is required.
Title: Re: Qt6
Post by: Paul Smedley on December 08, 2022, 07:41:54 pm
Hi Gregg,


Do you have an autoninja too?

I have ninja.exe. You probably do to if your qt5 web engine build got far enough U:\QT5_Workspace\qt5\qtwebengine\src\3rdparty\ninja\ninja.exe.

I got QT6 base to build. It had a problem with QDbus.dll because the lib name was wrong Dbus_1-NOTFOUND. It should have been Dbus13.dll. I fixed the CmakeLists.txt for QDbus.dll do you want a patch for it?

I am also working on adding the ability to open links and files where opening a different (child) app is required.

a PR or patch for QtDbus would be great.

I built the latest ninja last night (1.11.1) - I'll upload to github at some point.
Title: Re: Qt6
Post by: Gregg Young on December 08, 2022, 09:02:11 pm
Hi Greg

I see in my cmakecache.txt

//The directory containing a CMake configuration file for DBus1.
DBus1_DIR:PATH=h:/usr/local1220/lib/cmake/DBus1

//Path to a file.
DBus1_INCLUDE_DIR:PATH=h:/usr/local1220/include/dbus-1.0

//Path to a library.
DBus1_LIBRARY:FILEPATH=h:/usr/local1220/lib/dbus-1_dll.a

But i have also a dbus-13_dll.a


I have the following files:

J:\usr\lib\dbus-13_dll.a
J:\usr\lib\dbus-1_dll.a
J:\usr\lib\dbus13.dll

When I tried to link with J:\usr\lib\dbus-1_dll.a it failed (not found). It compiled when I tried J:\usr\lib\dbus13.dll.

My cmakecache.txt was the same as yours.  If it worked for you I will try reinstalling Dbus and see what happens. Are you using the i686 or the Pentium4 version of Dbus? Mine's the Pentium4.

Thanks

Gregg
Title: Re: Qt6
Post by: Paul Smedley on December 08, 2022, 09:06:40 pm
FYI - autoninja comes from depot-tools - https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
Title: Re: Qt6
Post by: Gregg Young on December 08, 2022, 09:21:04 pm
I rebuilt qt-creator with the newer cmake, which took care of some of the DLL naming conflicts, and it also includes some fixes for path related issues.

https://smedley.id.au/tmp/qt-creator-8.0.1-os2-20221207.zip

It's still not terribly useful, as trying to tell it the path to a qmake.exe (for example) leads to a long delay, followed by a message "The qmake executable .... could not be added. Cannot start ...."

There's a (possibly related) console message:
Code: [Select]
[launcher] "qtc.utils.launcher: \"Socket error: QLocalSocket::connectToServer: Unknown error 49 (Can't assign requested address)\"\r\n"

(edited, added .zip to url)

Hi Paul

I tried this but got: The path is correct.
Code: [Select]
Failed to load core: V:\Download\qt-creator-8.0.1-os2-20221207\qtcreator\lib\qtcreator\plugins\Core.dll:
Cannot load library V:/Download/qt-creator-8.0.1-os2-20221207/qtcreator/lib/qtcreator/plugins/Core.dll: (dlopen rc=2 extra=AGGREGAN)
Title: Re: Qt6
Post by: Paul Smedley on December 08, 2022, 09:50:44 pm
{0}[u:\qtcreator] chkdll32 lib\qtcreator\plugins\Core.dll
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'Qt6Gui' --> U:\QT6\LIB\QT6GUI.DLL.
Loading DLL 'Qt6Core' --> U:\QT6\LIB\QT6CORE.DLL.
Loading DLL 'Qt6Widgs' --> U:\QT6\LIB\QT6WIDGS.DLL.
Loading DLL 'Utils' --> U:\QTCREATOR\LIB\QTCREATOR\UTILS.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Loading DLL 'Extensim' --> U:\QTCREATOR\LIB\QTCREATOR\EXTENSIM.DLL.
Loading DLL 'Qt6Coret' --> U:\QT6\LIB\QT6CORET.DLL.
Loading DLL 'Aggregan' --> U:\QTCREATOR\LIB\QTCREATOR\AGGREGAN.DLL.
Loading DLL 'Qt6Qml' --> U:\QT6\LIB\QT6QML.DLL.
Loading DLL 'Qt6Print' --> U:\QT6\LIB\QT6PRINT.DLL.
Loading DLL 'Qt6Sql' --> U:\QT6\LIB\QT6SQL.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
All DLL's used by 'lib\qtcreator\plugins\Core.dll' could be loaded.

make sure the lib\qtcreator and lib\qtcreator\plugins are in the libpath

I'm using a qtcreator.cmd like:
set beginlibpath=u:\qtcreator\lib\qtcreator;u:\qtcreator\lib\qtcreator\plugins;
qtcreator.exe
Title: Re: Qt6
Post by: TeLLie on December 08, 2022, 09:53:41 pm
Hi Greg

I see in my cmakecache.txt

//The directory containing a CMake configuration file for DBus1.
DBus1_DIR:PATH=h:/usr/local1220/lib/cmake/DBus1

//Path to a file.
DBus1_INCLUDE_DIR:PATH=h:/usr/local1220/include/dbus-1.0

//Path to a library.
DBus1_LIBRARY:FILEPATH=h:/usr/local1220/lib/dbus-1_dll.a

But i have also a dbus-13_dll.a


I have the following files:

J:\usr\lib\dbus-13_dll.a
J:\usr\lib\dbus-1_dll.a
J:\usr\lib\dbus13.dll

When I tried to link with J:\usr\lib\dbus-1_dll.a it failed (not found). It compiled when I tried J:\usr\lib\dbus13.dll.

My cmakecache.txt was the same as yours.  If it worked for you I will try reinstalling Dbus and see what happens. Are you using the i686 or the Pentium4 version of Dbus? Mine's the Pentium4.
Hi Greg,

I use pentium

Thanks

Gregg
Title: Re: Qt6
Post by: Dave Yeo on December 09, 2022, 12:12:31 am
I have dbus disabled, can't imagine it doing much on OS/2
Title: Re: Qt6
Post by: Paul Smedley on December 09, 2022, 01:41:46 am
I did a debug build of Qt6 - so I'm going to step through a simple testcase that is giving me the "Broken filename passed to function" error and try and work out what's happening...

uggh local variables aren't showing for me, and it's asking for paths for every source file :(
Title: Re: Qt6
Post by: Dave Yeo on December 09, 2022, 02:13:17 am
Have you looked at https://doc.qt.io/qt-6/debug.html (https://doc.qt.io/qt-6/debug.html)
Title: Re: Qt6
Post by: Dave Yeo on December 09, 2022, 04:33:36 am
I built the latest ninja last night (1.11.1) - I'll upload to github at some point.

It's interesting doing the build with ninja on the PATH. After the configure step, there are no makefiles so have to do a cmake build . (Cmake uses too much memory to do parallel here) Ninja replaces make and eventually the build dies due to the qtcore dll being misnamed in the def as something like lib/qtcore.dll, forget the actual name.
Really the cmake build should be fixed, unluckily I know very little about cmake.
Title: Re: Qt6
Post by: Paul Smedley on December 09, 2022, 05:14:25 am
For me, the build finished with ninja in path, but the executables failed due to being unable to find lib/qt6core
Title: Re: Qt6
Post by: Dave Yeo on December 09, 2022, 05:40:14 am
I may have to reboot, now I'm seeing garbage instead of lib/qt6core. I also had a problem with my branch with workarounds for the IPv6 issue I described earlier, perhaps a failure of rebasing.
Title: Re: Qt6
Post by: Paul Smedley on December 09, 2022, 08:25:37 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...
Title: Re: Qt6
Post by: Jochen Schäfer on December 09, 2022, 09:34:22 am
I did a debug build of Qt6 - so I'm going to step through a simple testcase that is giving me the "Broken filename passed to function" error and try and work out what's happening...

uggh local variables aren't showing for me, and it's asking for paths for every source file :(
How do you debug?
Title: Re: Qt6
Post by: Paul Smedley on December 09, 2022, 09:43:44 am
I tried loading my testcase in icsdebug..... couldn't view local variables tho... mind you, I'm not very good with the debugger...
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Dave Yeo on December 10, 2022, 07:41:20 am
Use the system libevent?
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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 :)
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Paul Smedley 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....
Title: Re: Qt6
Post by: TeLLie 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
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: David McKenna 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,
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Dave Yeo on December 18, 2022, 03:53:26 am
OK, we were lucky that Mozilla did the work of adapting the build system to have a couple of choices including list files that work as response files.
Title: Re: Qt6
Post by: Dave Yeo on December 18, 2022, 04:01:10 am
Also don't forget that your later GCC builds seem to be broken with using list (response) files, at least they never succeeded at compiling xul.dll whereas GCC 9.2.0 does succeed. Might be passing the arguments or emxomfld or to GCC, I'm not knowledgeably enough to say.
Title: Re: Qt6
Post by: Paul Smedley on December 18, 2022, 07:23:47 am
Also don't forget that your later GCC builds seem to be broken with using list (response) files, at least they never succeeded at compiling xul.dll whereas GCC 9.2.0 does succeed. Might be passing the arguments or emxomfld or to GCC, I'm not knowledgeably enough to say.
They seem to work well enough for Qt6, which also uses response files <shrug>
Title: Re: Qt6
Post by: Martin Iturbide on December 18, 2022, 02:17:27 pm
Hi Guys

Just a reminder to thank you a lot for your efforts. Thanks Paul for all the time you took and for this way of developing openly to let people know and learn from your work.

Regards
Title: Re: Qt6
Post by: Paul Smedley on December 18, 2022, 08:21:46 pm
OK, I got a bunch of missing symbols, but I hacked enough to (almost) get a node.exe....
Code: [Select]
creating an OS/2 EMX executable
Error! E2028: _uv_exepath is an undefined reference
Error! E2028: _uv_ip6_addr is an undefined reference
Error! E2028: _uv_ip6_name is an undefined reference
Error! E2028: _uv_resident_set_memory is an undefined reference
Error! E2028: _uv__set_process_title is an undefined reference
Error! E2028: _uv__hrtime is an undefined reference
Error! E2028: _uv__fs_event_close is an undefined reference
Error! E2028: _uv__io_poll is an undefined reference
Error! E2028: _uv__platform_invalidate_fd is an undefined reference
Error! E2028: _uv_fs_event_init is an undefined reference
Error! E2028: _uv_fs_event_start is an undefined reference
Error! E2028: _uv_get_free_memory is an undefined reference
Error! E2028: _uv_get_total_memory is an undefined reference
Error! E2028: _uv_uptime is an undefined reference
Error! E2028: _uv_loadavg is an undefined reference
Error! E2028: _uv_interface_addresses is an undefined reference
Error! E2028: _uv_free_interface_addresses is an undefined reference
Error! E2028: _uv_cpu_info is an undefined reference
Error! E2028: _uv_free_cpu_info is an undefined reference
Error! E2028: _uv__io_check_fd is an undefined reference
Error! E2028: _uv__platform_loop_init is an undefined reference
Error! E2028: _uv__platform_loop_delete is an undefined reference
Error! E2028: _uv__io_fork is an undefined reference
Error! E2028: _getservbyport_r is an undefined reference
Will try fix tonight...
Title: Re: Qt6
Post by: Paul Smedley on December 19, 2022, 08:38:16 am
I'm now down to the following...
Code: [Select]
Error! E2028: _uv_exepath is an undefined reference
Error! E2028: _uv_resident_set_memory is an undefined reference
Error! E2028: _uv_get_free_memory is an undefined reference
Error! E2028: _uv_get_total_memory is an undefined reference
Error! E2028: _uv_uptime is an undefined reference
Error! E2028: _uv_loadavg is an undefined reference
Error! E2028: _uv_cpu_info is an undefined reference
Error! E2028: _uv_free_cpu_info is an undefined reference
Title: Re: Qt6
Post by: Paul Smedley on December 19, 2022, 09:04:38 am
stubbed some of these - but uv_exepath() remains... from http://docs.libuv.org/en/v1.x/misc.html

int uv_exepath(char *buffer, size_t *size)
Gets the executable path. You must call uv_setup_args before calling this function.

I vague recall a way to get the current executable path of a running executable - but can't find it right now. Any tips?

I got a node.exe this evening by hacking around the above... of course, it's giving a SIGILL on trying to run a simple example... https://smedley.id.au/tmp/63a0afef-bc39_01-NODE-exceptq.txt has the trap. Tired this evening so will look at it tomorrow
Title: Re: Qt6
Post by: Lars on December 19, 2022, 10:11:03 am
stubbed some of these - but uv_exepath() remains... from http://docs.libuv.org/en/v1.x/misc.html

int uv_exepath(char *buffer, size_t *size)
Gets the executable path. You must call uv_setup_args before calling this function.

I vague recall a way to get the current executable path of a running executable - but can't find it right now. Any tips?

1) Use "DosQueryModFromEIP" from the running executable, passing in as "Address" the address of any arbitrary routine that is statically linked into the executable (could be function "uv_exepath" itself if that is statically linked to the exe, ha ha ...)
2) use the returned module handle as entry to "DosQueryModuleName".

Alternative (maybe the easier and better solution):
1) use "DosGetInfoBlocks" to get to a pointer to the PPIB of the running executable
2) use "ppib->pib_hmte" as the module handle for "DosQueryModuleName".

I seem to remember that, for an executable at least, "DosQueryModuleName" returns the full path and name of the executable binary.
Title: Re: Qt6
Post by: Paul Smedley on December 19, 2022, 10:22:00 am
Thanks Lars, your option 1 is what I vaguely recall from some other port!
Title: Re: Qt6
Post by: Lars on December 19, 2022, 10:26:10 am
Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...
Title: Re: Qt6
Post by: Paul Smedley on December 20, 2022, 09:50:59 pm
Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...

Thanks I'll look into this - I hacked around the requirement for that function for now.

My current focus is to get nodejs compiling 'out of the box' without requiring makefiles to be hacked. Folks can track progress at https://github.com/psmedley/node-os2
Title: Re: Qt6
Post by: Paul Smedley on December 23, 2022, 02:30:11 am
With a LOT of help from Steven Levine, https://github.com/psmedley/node-os2/commit/1c5b8544c2b5fea0a0df67c03ef1aee6b7d3f600 implements the use of response files to create libs with command lines which would otherwise exceed 32k
Title: Re: Qt6
Post by: Paul Smedley on December 23, 2022, 09:54:56 am
ok https://github.com/psmedley/node-os2 can now be used to generate a node.exe

See conf.cmd for some hacks that are still required to out/makefile and some directories that need to be manually created

Still generates a SIGILL on running :(
Title: Re: Qt6
Post by: Paul Smedley on December 24, 2022, 02:11:32 am
I implemented a kludge for the SIGILL - see https://github.com/psmedley/node-os2/issues/7

now, node.exe --help works without a SIGILL :)

But... trying to run something like myfirst.js from https://www.w3schools.com/nodejs/nodejs_get_started.asp gives:
node.exe myfirst.js:
Code: [Select]
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'U:/DEV/node-os2/myfirst.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
This is likely path related..

Or node.exe /myfirst.js
Code: [Select]
net.js:1219
      err = handle.bind6(address, port);
                   ^

TypeError: handle.bind6 is not a function
    at createServerHandle (net.js:1219:20)
    at Server.setupListenHandle [as _listen2] (net.js:1247:14)
    at listenInCluster (net.js:1328:12)
    at Server.listen (net.js:1415:7)
    at Object.<anonymous> (/myfirst.js:6:4)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

But getting there :)
Title: Re: Qt6
Post by: Paul Smedley on December 24, 2022, 08:15:16 am
Slowly going crazy... have added some stuff to try make it work more like win32, but still won't load something like 'node myfirst.js'
Error: Cannot find module 'U:\DEV\node-os2\myfirst.js', paths = C:\Home\.node_modules,C:\Home\.node_libraries,U:\DEV\NODE-OS2\OUT\RELEASE\lib\node, isMain = true, parent = null
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:637:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:833:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Title: Re: Qt6
Post by: Paul Smedley on December 24, 2022, 09:18:09 am
OK latest commits seem to take care of this...

However, things still aren't quite right...

on linux, node myfirst.js opens a connection on port 8080 and I can connect to it with curl, and it returns 'Hello World!'

On OS/2, I can't connect to localhost :(

Edit: It's supposed to listen on port 8080 - running netstat, I noticed something was listening on port 52871

curl http://localhost:52871 returned:
Hello World!
Title: Re: Qt6
Post by: Paul Smedley on December 25, 2022, 10:23:40 pm
Hey Lars,

Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...

I stole your implementation from the bww github - there's a small issue with it - corrected in https://github.com/psmedley/node-os2/commit/ffae745f9b6cc92209bc956d2058b0db7b53b3bb

I couldn't raise an issue in bithub as they're not enabled, so hopefully you see this.
Title: Re: Qt6
Post by: Paul Smedley on December 25, 2022, 10:30:42 pm
Progress update, node seems to be mostly working...now trying to get npm (node package manager) working so we can install modules.. for qtwebengine, I think we need at least typescript...

running npm -f install typescript gives the log attached
Title: Re: Qt6
Post by: Paul Smedley on December 26, 2022, 09:03:46 am
Hey all... well I hand installed typescript - and cobbled together enough that tsc works to convert a .ts file into .js - which I think is what my qtwebengine build is stuck doing..

test build at https://smedley.id.au/tmp/node-10.19-os2-20221226.zip

Needs a libcn0 from 2022 (from netlabs-exp)

To test - create a helloworld.ts:
Code: [Select]
let message: string = 'Hello World';
console.log(message);

Compile it with ./tsc helloworld.ts

A helloworld.js should get created...
Running node.exe helloworld.js should produce:
Hello World

Now to see if qtwebengine gets any further :)
Title: Re: Qt6
Post by: Paul Smedley on December 26, 2022, 09:07:24 am
OK it got a bit further, then got stuck at:
Code: [Select]
Traceback (most recent call last):
  File "../../../../../src/3rdparty/chromium/third_party/node/node.py", line 63, in <module>
    RunNode(sys.argv[1:])
  File "../../../../../src/3rdparty/chromium/third_party/node/node.py", line 58, in RunNode
    raise RuntimeError('%s failed: %s' % (cmd, stderr))
RuntimeError: ['C:/USR/LOCAL/BIN/node.exe', '../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup', '--silent', '--plugin', 'terser', '--config', '../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/rollup.config.js', '--input', 'gen/third_party/devtools-frontend/src/front_end/formatter_worker/FormatterActions.prebundle.js', '--file', 'gen/third_party/devtools-frontend/src/front_end/formatter_worker/FormatterActions.js'] failed: [!] (plugin terser) TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at new JestWorker (U:\dev\qt6-webengine-os2\src\3rdparty\chromium\third_party\devtools-frontend\src\node_modules\jest-worker\build\index.js:131:39)
    at Object.renderChunk (U:\dev\qt6-webengine-os2\src\3rdparty\chromium\third_party\devtools-frontend\src\node_modules\rollup-plugin-terser\rollup-plugin-terser.js:22:23)
    at Promise.resolve.then (U:\dev\qt6-webengine-os2\src\3rdparty\chromium\third_party\devtools-frontend\src\node_modules\rollup\dist\shared\rollup.js:18988:25)


Title: Re: Qt6
Post by: Paul Smedley on December 26, 2022, 09:58:38 pm
of course, this exact command works fine on linux, so clearly a problem with my node port :(
Title: Re: Qt6
Post by: Paul Smedley on December 27, 2022, 01:14:42 am
OK got past this.... A hack of a .js file had gone bad - of course the hack was not present when I checked out the source on linux..

Next prob is that sometimes node generates no output - on linux, we get a 0 byte file, on OS/2, I'm getting NO file...

I hacked around this by manually creating these as I got build failures. Now back to building c++ and fixing build breaks, which is much more enjoyable than hacking nodejs...

Edit: quick afteroon update - 15,565 actions to go - so ~39% complete based on the 25,370 total when I started...

Edit2: the no output file issue is really annoying - but need a fresh head to investigate that!
Title: Re: Qt6
Post by: Paul Smedley on December 27, 2022, 09:47:45 am
OK this seems a good place to break for the day....

Code: [Select]
C:/USR/BIN/python2.7.exe ../../../../../src/3rdparty/chromium/build/gn_run_binary.py nasm.exe -DPREFIX -fobj -I../../../../../src/3rdparty/chromium/third_party/libvpx/source/config/ -I../../../../../src/3rdparty/chromium/third_party/libvpx/source/config/linux/ia32/ -I../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/ -I./ -I../../../../../src/3rdparty/chromium/ -Igen/ -DCHROMIUM -MD obj/third_party/libvpx/libvpx_asm/idctllm_mmx.obj.d -o obj/third_party/libvpx/libvpx_asm/idctllm_mmx.obj ../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:48: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:49: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:51: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:51: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:52: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:52: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:53: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:53: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:54: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:54: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:63: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:64: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:65: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:187: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:187: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:191: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:191: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:193: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:193: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:197: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:197: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:199: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:199: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:203: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:203: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:208: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:208: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:212: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:212: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:236: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:236: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:237: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:238: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:243: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:251: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:251: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:252: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:252: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:253: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:253: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:254: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:254: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:256: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:257: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:262: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:276: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:276: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:277: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:277: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:278: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:278: error: invalid effective address
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:279: error: impossible combination of address sizes
../../../../../src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/common/x86/idctllm_mmx.asm:279: error: invalid effective address
nasm.exe failed with exit code 1
[65/12295] ACTION //ui/gfx/mojom:native_handle_types_js__generator(//build/toolchain/os2:x86)

On the positive side - 12,230 actions remaining - so around 50% done.

Looks like they changed from yasm to nasm....

More tomorrow...
Title: Re: Qt6
Post by: Lars on December 27, 2022, 02:46:39 pm
1) need to define ABI_IS_32BIT (x86_abi_support.asm).
You might be able to hack that latter file to specify the __OUTPUT_FORMAT__ to match what the OS/2 port of NASM uses, would be something like "obj". That will then set ABI_IS_32BIT. You might need to be forced to call NASM with the -fobj switch.
2) about some convenience macros (to access arguments), I think our port of NASM is too old to provide/support these.
Title: Re: Qt6
Post by: Dave Yeo on December 27, 2022, 05:45:48 pm
Yes, it looks like your using 16bit code. Somethnig like defining the segments for 32 bit,
Code: [Select]
.TEXT32 align=16 public use32 class=CODE
.DATA32 align=16 public use32 class=DATA
Title: Re: Qt6
Post by: Dave Yeo on December 27, 2022, 05:49:00 pm
2) about some convenience macros (to access arguments), I think our port of NASM is too old to provide/support these.

Nasm shoud just build if a newer one is needed.
Title: Re: Qt6
Post by: Dave Yeo on December 27, 2022, 06:30:41 pm
Can you not use the system VPX? Or else get the source from Bitwise's port, doing it yourself would be time consuming.
Title: Re: Qt6
Post by: Lars on December 27, 2022, 07:47:16 pm
Yes, it looks like your using 16bit code. Somethnig like defining the segments for 32 bit,
Code: [Select]
.TEXT32 align=16 public use32 class=CODE
.DATA32 align=16 public use32 class=DATA

No, the assembler code is written as 64-bit code. But the define will override register names to its 32-bit counterparts (the general register set). I am not sure about the section/segment defaults though. For OS/2, it is recommended to use the FLAT keyword in the section/segment declaration.
Title: Re: Qt6
Post by: Dave Yeo on December 27, 2022, 08:47:37 pm
Last I looked, libvpx supported 32 bit. For the assembler, basically adding an obj (obj32) section to x86inc.asm. Lots of the versions floating around have aout support already for us and some obj support. It is a shame the x264 people refused to support OS/2.
Anyways for the Qt5 webengine, we just use the native libvpx, same with Firefox now.
BTW, IIRC, flat is no longer needed and it might have been the cause for using a different segment, not that it matters much with flat addressing.
Title: Re: Qt6
Post by: Paul Smedley on December 27, 2022, 09:04:39 pm
Thanks Lars and Dave, I was starting to think I was talking to myself in here :)

I was too brain dead last night to do much investigation - so it was good to wake this morning to some tips ;)

1) System vpx - I don't think this is an option, as our vpx is too old:
    pkg_check_modules(VPX vpx>=1.10.0 IMPORTED_TARGET)
- our vpx is 1.8.x
2) nasm is already using the -fobj switch
3) setting ABI_IS_32BIT looks to be the solution - the code hadn't been adapted from the switch from yasm to nasm - so there is code for:
Code: [Select]
%macro SECTION_RODATA 0-1 16
    %ifidn __OUTPUT_FORMAT__,win32
        SECTION .rdata align=%1
    %elif WIN64
        SECTION .rdata align=%1
    %elifidn __OUTPUT_FORMAT__,macho32
        SECTION .text align=%1
        fakegot:
    %elifidn __OUTPUT_FORMAT__,aout
        SECTION .text
    %else
        SECTION .rodata align=%1
    %endif
%endmacro

; PIC macros from vpx_ports/x86_abi_support.asm.
%ifidn __OUTPUT_FORMAT__,elf32
%define ABI_IS_32BIT 1
%elifidn __OUTPUT_FORMAT__,macho32
%define ABI_IS_32BIT 1
%elifidn __OUTPUT_FORMAT__,win32
%define ABI_IS_32BIT 1
%elifidn __OUTPUT_FORMAT__,aout
%define ABI_IS_32BIT 1
%else
%define ABI_IS_32BIT 0
%endif

That will need tweaking for obj :)

Will try fix this today.

Cheers,

Paul

Edit: the attached makes the code build (not sure it's 100% correct though)
Title: Re: Qt6
Post by: Andy Willis on December 27, 2022, 09:17:15 pm
2) about some convenience macros (to access arguments), I think our port of NASM is too old to provide/support these.

Nasm shoud just build if a newer one is needed.
It requires a newer autoconf (2.71) than I have (2.69).  I had been building it for awhile but it has been about 2 years since I did (they even moved the repository not long after my last pull it seems). 
Tried building with OpenWatcom (which used to work here) but they changed things enough that I am getting a build error in a perl script.  I don't know if that is a problem in my Perl install, our Perl in general, or something wrong in their build.
Title: Re: Qt6
Post by: Paul Smedley on December 27, 2022, 09:20:13 pm
FWIW - chromium builds NASM version 2.15.03rc6 and I did nothing to make it buiild...
Title: Re: Qt6
Post by: Paul Smedley on December 27, 2022, 09:30:39 pm
Hey Andy,

2) about some convenience macros (to access arguments), I think our port of NASM is too old to provide/support these.

Nasm shoud just build if a newer one is needed.
It requires a newer autoconf (2.71) than I have (2.69).  I had been building it for awhile but it has been about 2 years since I did (they even moved the repository not long after my last pull it seems). 
Tried building with OpenWatcom (which used to work here) but they changed things enough that I am getting a build error in a perl script.  I don't know if that is a problem in my Perl install, our Perl in general, or something wrong in their build.

I built the latest with GCC out of the box... https://smedley.id.au/tmp/nasm-2.16.01-os2-20221228.zip

Cheers,

Paul
Title: Re: Qt6
Post by: Dave Yeo on December 28, 2022, 02:05:22 am
Going by memory, this,
Code: [Select]
+%elifidn __OUTPUT_FORMAT__,obj
+%define SECTION_RODATA section .data
should be something like
Code: [Select]
+%elifidn __OUTPUT_FORMAT__,obj
+%define SECTION_RODATA section .data align=16 use32
Not sure about whether you need the align and it might need FLAT appended.
Look at Bitwise's libvpx port, IIRC x86inc.asm has the obj section, otherwise I can't remember offhand where I saw it.
BTW, YASM is NASM compatible so the switch shouldn't matter. The worse with using NASM when YASM was called for was the include lines, forget the specifics but could look them up, I think they had to end with a \
Title: Re: Qt6
Post by: Paul Smedley on December 28, 2022, 02:36:06 am
Thanks - I've changed to that and we'll see what happens. I had a look at https://github.com/bitwiseworks/libvpx-os2/blob/master/vpx_ports/x86_abi_support.asm and don't see any obj support - nor in KO's vpx repo..
Title: Re: Qt6
Post by: Dariusz Piatkowski on December 28, 2022, 03:35:28 am
Thanks Lars and Dave, I was starting to think I was talking to myself in here :)
...

Paul,
You are certainly NOT talking to yourself, rather the problem is that short of yourself and a few other folks (who are responding as they can) we simply do not have the skillset/know-how needed to contribute to move this forward.

I will say this: reading the posts - and I do read every one of them - does allow me to at least better understand the current situation we are in and in general become more aware of where the gaps exist!

So keep the descriptive updates coming please, they are greatly appreciated...and Thank You!
Title: Re: Qt6
Post by: Dave Yeo on December 28, 2022, 04:43:03 am
Thanks - I've changed to that and we'll see what happens. I had a look at https://github.com/bitwiseworks/libvpx-os2/blob/master/vpx_ports/x86_abi_support.asm and don't see any obj support - nor in KO's vpx repo..

OK, it is the Mozilla's old VPX that has OMF support.
At the end of libvpx\vpx_ports\x86_abi_support.asm
Code: [Select]
%ifidn __OUTPUT_FORMAT__,obj
%define SECTION_RODATA section .text
section .text align=16 use32 class=CODE
group CGROUP text
%endif
Also, same file, about line 23.
Code: [Select]
%elifidn __OUTPUT_FORMAT__,win32
%define ABI_IS_32BIT 1
%elifidn __OUTPUT_FORMAT__,obj
%define ABI_IS_32BIT 1
%else
%define ABI_IS_32BIT 0
%endif

And at the end of media\libvpx_config.asm
Code: [Select]
%elifidn __OUTPUT_FORMAT__,obj
%include "vpx_config_x86-os2-gcc.asm"
%endif

Here's the files, vpx_config_x86-os2-gcc.asm and vpx_config_x86-os2-gcc.c as well

Title: Re: Qt6
Post by: Dave Yeo on December 28, 2022, 06:11:58 am
Tried building with OpenWatcom (which used to work here) but they changed things enough that I am getting a build error in a perl script.  I don't know if that is a problem in my Perl install, our Perl in general, or something wrong in their build.

It's been years since OpenWatcom could build nasm. They used to distribute an OS/2 version built with OW on nasm.us until it wouldn't build.
The assembler built with OW was subtly broken too. Used to run the FFmpeg FATE test suite and everything passed, then I started getting four H264 conformance test failures out of close to a hundred such tests, rebuilt nasm with GCC and those test failures cleared up.
Title: Re: Qt6
Post by: Paul Smedley on December 28, 2022, 08:37:03 am
HI Dariusz,

So keep the descriptive updates coming please, they are greatly appreciated...and Thank You!

Thanks for taking the time to reply. The forum really needs a way to 'react' to posts so at least people can show their interest - even if they have nothing to add to the conversation. I've spent WAY too much time on this so far, and it can be quite demoralising when almost nobody replies. Hardly anyone seems to have tested any of the binaries/ports for Qt6 that I've posted so far  :'(

Anyway, latest status as on 18:00 ADL time is there are about 5000 actions remaining, so ~80% done.

Cheers,

Paul
Title: Re: Qt6
Post by: Andi B. on December 28, 2022, 10:33:42 am
I follow such discussions too. I learn from the posts of the knowledge people here. I'm pretty sure there are more people out there like me who follow such discussions. So keep on posting. It's not useless to spread OS/2 specific porting knowledge to the world. Thank you all who share your findings/your code.
Title: Re: Qt6
Post by: David McKenna on December 28, 2022, 12:11:45 pm
Hey Paul,

  Of course I am following and trying the test programs too, but in case you are wondering you can look at the top of the page and get an idea how many views of the thread there have been... currently well over 12000!

Regards,
Title: Re: Qt6
Post by: Eugene Tucker on December 28, 2022, 02:06:35 pm
I do follow these threads although I do not comment as I am not a programmer. I do want to state that I appreciate Paul's efforts and the efforts of others to keep OS/2 or Arca OS going. Like an old boss of mine used to say. "If you cant get it. Don't quit it.
Title: Re: Qt6
Post by: Neil Waldhauer on December 28, 2022, 03:28:30 pm
Thanks, Paul, for attempting this port of QT6. It's inspiring how you have done this in a public way, so we can all follow along, even if we can't understand all the moving parts you must deal with for the port.

And thanks for the GCC port, which I can and do use. If anyone uses PMMail, it has made a big difference for that program to be compiled with a newer version.

Of course, others helped, particularly dmik at bitwise, for some parts, and for eveyone who tested and helped.

Happy New Year to you all.
Title: Re: Qt6
Post by: Tom on December 28, 2022, 07:09:24 pm
HI Dariusz,

Thanks for taking the time to reply. The forum really needs a way to 'react' to posts so at least people can show their interest - even if they have nothing to add to the conversation. I've spent WAY too much time on this so far, and it can be quite demoralising when almost nobody replies. Hardly anyone seems to have tested any of the binaries/ports for Qt6 that I've posted so far  :'(

Cheers,

Paul

Paul,

Since I am only familiar with programming in assembler (though I have become quite rusty because of lack of time), following what you and others achieve in C(++), Python and other ilk is beyond my capabilities. I only admire it from a distance, but appreciate it very much nonetheless. So don't take my silence for lack of interest!
Title: Re: Qt6
Post by: Paul Smedley on December 28, 2022, 10:10:12 pm
Thanks guys, appreciate the messages and the interest. Quick update - I started getting some system hangs whilst building last night. I recalled that I previously had issues with this machine (Thinkcentre M73P) when building parallel jobs and the system was rebooting. I read the acpi FAQ this morning, particularly the note about disabling hyperthreading - which I've worked out how to do in the BIOS. I've now gone from 4x cores to 2x, but the build is back to running and hasn't hung yet :)

~3500 actions to go in this particular task
Title: Re: Qt6
Post by: Paul Smedley on December 28, 2022, 10:37:07 pm
hmmm this isn't good...
Title: Re: Qt6
Post by: Dave Yeo on December 28, 2022, 11:45:57 pm
I was getting them while building Qt5, after closing as much stuff as I could, including moving a bunch of stuff out of the startup folder and rebooting, the build continued.
We're right at the edge of what is possible with a 32bit operating system unluckily.
Title: Re: Qt6
Post by: Paul Smedley on December 29, 2022, 12:30:14 am
OK I'm in bigger trouble... even after the bios change to get rid of hyperthreading, I'm still getting spontaneous reboots...

Not sure what can make the system reboot? I don't have REIPL=ON so it's not like I should be rebooting after a trap...

testlog generic attached - I'm open to suggestions...
Title: Re: Qt6
Post by: Dave Yeo on December 29, 2022, 01:32:30 am
Try reducing your virtualaddresslimit, perhaps to 2816 or 2560.
BTW, you could gain some more memory by lowering your threads, 512 seems fine here.
Title: Re: Qt6
Post by: Paul Smedley on December 29, 2022, 05:22:55 am
Thanks Dave, I've changed those - but that didn't help the spontaneous reboots.

I also updated the BIOS, and replaced the thermal paste between the CPU and heatsink (even though I don't think the reboot is heat related).

What *may* have helped is running 'ninja -t restat' and then running ninja 'QtWebEngineCore' directly from src/core/release/i386

I'm now at [427/3510]
Title: Re: Qt6
Post by: Paul Smedley on December 29, 2022, 06:29:28 am
I got a few more 'out of memory' errors from gcc - switching to gcc 9.5.0 instead of the bww 9.2.0 seems to have helped with these...

(As an aside, I was using pure RPM for the initial Qt builds to avoid dependency issues, the longer term goal was always to use my own compiler builds)

Now at [20/2993]

As another aside, I thought the CPU in the M73p was better than it is, turns out the i5-4570T is a 4th gen processor from ~2014. I might have to look for an alternative that has a bit more horsepower.... i7-6700T in the T470S would be better... https://www.ebay.com.au/itm/334560925841 might also be an option...
Title: Re: Qt6
Post by: Sigurd Fastenrath on December 29, 2022, 07:39:39 am
Hi Paul,
do you run your build with ArcaOS on bare Metall or inside a VM? My experience with ArcaOS on newer Hardware than Intel 6th Generation leads to the serious RAM Problems ArcaOS does have. I.e. with intel 8th Generation there is a max of only 1.5 to 2 GB of RAM accessable with ArcaOS, depends on the internal graphics.

For myself the 5th Generation is the last one providing 3.5GB of RAM. I would suggest to move your Build Sytem in a VM, there you can have the full 4 GB and the Host CPU, i.e  Intel 10th Generation.

A sidenote: these days I discovered Problems installing ArcaOS inside Virtualbox on an Thinkpad X1 Carbon 10th Generation, that has a Intel 12th Generation CPU. So May be Hardware with an Intel 10th Generation is a good shot. I have unfortunately no experience with todays AMD CPUs. Good luck!!
 
Title: Re: Qt6
Post by: Paul Smedley on December 29, 2022, 09:10:26 am
HI Sigurd, I'd forgotten about the memory hole issue. I do do a lot of my builds on this laptop - which is running Ubuntu 22.10 on a Intel 11th Gen Core i7-1165G7, but my preference was for some kind of non-laptop that I can setup somewhere convenient and VNC into it...
Title: Re: Qt6
Post by: Lars on December 29, 2022, 11:28:58 am
Hey Lars,

Thanks Lars, your option 1 is what I vaguely recall from some other port!

Yeah and maybe 2) is the better option. At least it has no quirky preconditions on use ...

I stole your implementation from the bww github - there's a small issue with it - corrected in https://github.com/psmedley/node-os2/commit/ffae745f9b6cc92209bc956d2058b0db7b53b3bb

I couldn't raise an issue in bithub as they're not enabled, so hopefully you see this.


Hi Paul,

ok, I see. But because "DosQueryModuleName" does not add/enforce a trailing zero. you will need to change to:

  ...
  memset(buffer,0,*size);
  rc = DosQueryModuleName(ppib->pib_hmte,*size-1,buffer); /* note the -1 */
    if (NO_ERROR == rc) {
      *size = strlen(buffer);
      return 0;
    }
    else
      return ((ERROR_BAD_LENGTH == rc) ? UV_EAI_OVERFLOW : UV_EAI_FAIL);

That will ensure that there always will be a trailing zero.
Title: Re: Qt6
Post by: Dariusz Piatkowski on December 29, 2022, 04:14:11 pm
Hi Paul,

Thanks guys, appreciate the messages and the interest. Quick update - I started getting some system hangs whilst building last night...I read the acpi FAQ this morning, particularly the note about disabling hyperthreading...

This is probably a long-shot given that my OS/2 box is dedicated hardware, but I have disabled the PowerManager completely.

So in \mptn\etc\acpid.cff:

Code: [Select]
;############## Power Manager Settings ###################################
[PowerMan]

; Enable: 1=enabled, 0=disabled, default=1
Enable = 0
...

Initially I did try to make the power adjustments work (focused on lower actual electricity utilization by shutting off the CPU cores that were not "needed") but on this hardware (AMD Phenom II X6 - anchient stuff by all accounts lol) this simply caused all sorts of crazy CPU spikes and overall slow performance, sluggish response, intermittant hangs (or so it felt) etc.

While you are probably a lot closer to having a hardware issue, I do wonder if your current ACPI setup is attempting to manage the CPU cores through that PowerManager logic? It could be that given the heavy CPU loading already taking place, the PowerManager logic is hurting as opposed to helping.
Title: Re: Qt6
Post by: Paul Smedley on December 30, 2022, 02:08:47 am
Hi Darcio, per above, I think it was a corrupt ninja log - since regenerating it, I haven't had the issue with reboots...

I'm still thinking about faster hardware - considering going with something like the NUC I posted, and if the memory hole is too big, I can just virtualise OS/2 under linux....
Title: Re: Qt6
Post by: Paul Smedley on December 30, 2022, 03:45:18 am
Update as on 1300 on Friday 30th...

Currently at: [268/1481] - so 1213 items remaining from the original 25370, so just under 5% remaining.

I'm on my second glass of wine, so not sure how much more progress will be made by me today :)

Had a setback last night where i had to update one of the .gni files to filter out some code for OS/2 - and it went back to ~12000 files to build - fortunately, it only took a couple of hours for it to work out that most of those didn't need to be rebuilt, and to get me back to where I was before I updated the .gni file.

More later....
Title: Re: Qt6
Post by: Dave Yeo on December 30, 2022, 04:49:03 am
Here, with a I5-2400, about 10% slower then yours, per core, it must have taken 12+ plus hours to compile Qt5, mostly the webengine, had to stop due to memory issues a few times. For comparison, Mozilla takes just over a 100 minutes.
Another thing that can slow things down, depending on video card, is drawing to the cmd window. You might try minimizing it or redirecting stdout to a file. Stderr will still show build breaks or watch the CPU meter.
Title: Re: Qt6
Post by: Andy Willis on December 30, 2022, 05:59:11 pm
Here, with a I5-2400, about 10% slower then yours, per core, it must have taken 12+ plus hours to compile Qt5, mostly the webengine, had to stop due to memory issues a few times. For comparison, Mozilla takes just over a 100 minutes.
Another thing that can slow things down, depending on video card, is drawing to the cmd window. You might try minimizing it or redirecting stdout to a file. Stderr will still show build breaks or watch the CPU meter.
I'll often use the mouse to mark some random spot in the command window, however, I found out I can't use that trick on Windows as it does not continue to run like it does on OS/2 (on Windows that trick pauses the program, rather than just hiding the output).
Title: Re: Qt6
Post by: Paul Smedley on December 30, 2022, 10:09:28 pm
yeah these days I always pipe stdout to a file, makes a big difference...
Title: Re: Qt6
Post by: Paul Smedley on December 31, 2022, 12:22:16 am
Morning update before I head out for lunch. Had to edit a header file from V8, which caused a number of files to need to rebuilt. Currently back to [3603/8465]. Hopefully when I get back from lunch I'll be back around the 1000 actions to go :)
Title: Re: Qt6
Post by: Paul Smedley on December 31, 2022, 06:11:27 am
Epic fail there... .ninja_log corrupted again, and after rebuilding it - I was back to ~12000 files. within 15min or so, I'm back to [600/8130] so we'll see what happens

I also ordered the Intel NUC I posted the other day.... there were some ebay cashback offers today so saved about $A25 off the purchase price, so 'only' $A350 :) It will probably arrive the day I go back to work!
Title: Re: Qt6
Post by: Dave Yeo on December 31, 2022, 07:11:02 am
Ninja_log is how ninja keeps track of what it's done? Can you back it up now and again? Even an open file should be copyable.
Title: Re: Qt6
Post by: Paul Smedley on December 31, 2022, 07:41:12 am
Yeah I might have to start doing something like that. The other thing I just realised is that when i built ninja, I didn't increase the stack from the default, and didn't explicitly set -Zhigh-mem

Just rebuilt ninja.exe with an 8mb stack and with high-mem set

Edit: this didn't help - I'm now getting one build attempt, then a hang on the next one.... weird stuff

Edit: I've bitten the bullet and removed .ninja_log, which will trigger a full rebuild. I did this partly as I want to try building without -g0 - and to do that was going to trigger a rebuild anyway.

Set it going, and hopefully, by the time I check it in 2023, I'll be close to being back to where I was :)
Title: Re: Qt6
Post by: Paul Smedley on January 01, 2023, 08:16:24 am
Welp... I'm back to the build getting stuck.... I built a fresh VM as well, and see similar issues there - where vbox gives a:
Code: [Select]
08:11:02.723172 !!         VCPU0: Guru Meditation 1155 (VINF_EM_TRIPLE_FAULT)
08:11:02.723190 !!
08:11:02.723201 !! ACTIVE TRAP=08 ERRCD=0 CR2=00000000deadface PC=0000000000000000 Type=0 cbInstr=ff fIcebp=false (Guest!)
08:11:02.723210 !! Skipping ring-0 registers and stack, rcErr=VINF_EM_TRIPLE_FAULT
08:11:02.723221 !!
08:11:02.723221 !! {mappings, <NULL>}
08:11:02.723222 !!
08:11:02.723238 !!
08:11:02.723239 !! {hma, <NULL>}
08:11:02.723240 !!
08:11:02.723241 !!
08:11:02.723241 !! {cpumguest, verbose}
08:11:02.723246 !!

I've just set a fresh build going with Dave's version of ninja.exe - just in case there is a problem introduced in newer ninja.

Incidentally, native is much quicker than vbox.. Both builds started around the same time:
Native - i5 - 4th Gen - 2x cores - [1896/25370]
Vbox - i7-1165G7 - 4x cores - [1345/25370]

I'm at a bit of a loss now on how to get past this, assuming that reverting to the older ninja doesn't help :(
Title: Re: Qt6
Post by: Paul Smedley on January 02, 2023, 06:08:30 am
@Tellie @dryeo - can you please try a ninja build with https://smedley.id.au/tmp/cmake-3.19.8-os2-20230102.zip ? I tested with qtwebchannel and it seems to create a proper def file... I just want to make sure it's not just me :)
Title: Re: Qt6
Post by: Dave Yeo on January 02, 2023, 06:14:06 am
@Tellie @dryeo - can you please try a ninja build with https://smedley.id.au/tmp/cmake-3.19.8-os2-20230102.zip ? I tested with qtwebchannel and it seems to create a proper def file... I just want to make sure it's not just me :)

I'll try overnight, as you know the memory problems make it hard, can't run anything else while it runs :)
Actually, I guess it just needs to build the first DLL, the def will tell whether it got the internal name correct.
Title: Re: Qt6
Post by: Paul Smedley on January 02, 2023, 06:34:24 am
@Tellie @dryeo - can you please try a ninja build with https://smedley.id.au/tmp/cmake-3.19.8-os2-20230102.zip ? I tested with qtwebchannel and it seems to create a proper def file... I just want to make sure it's not just me :)

I'll try overnight, as you know the memory problems make it hard, can't run anything else while it runs :)
Actually, I guess it just needs to build the first DLL, the def will tell whether it got the internal name correct.

Yeah you should be able to look at the .def that gets created - that's why I tested with qtwebchannel - I think it's just about the smallest module :P

Edit: oops the test was invalid, as building modules uses the makefile type from qtbase :/

Trying qtbase now..

Edit2: bugger - the def still has:
LIBRARY "lib/Qt6Core.dll" INITINSTANCE TERMINSTANCE

we want it just be "Qt6Core.dll"
Title: Re: Qt6
Post by: TeLLie on January 02, 2023, 08:10:53 am
Hi Paul,

Will look @ it this evening when home :)

Wish you  and everybody all the best for 2023 :P

Hi Paul,

Yes  as you mention still get the LIBRARY "lib/Qt6Core.dll" INITINSTANCE TERMINSTANCE

Also notice that the cmake proceduces bogus in the def files like:

DESCRIPTION "@#cmake build system:# #@##1## 25 Dec 2022 11:24:06     TeLLieLaPPie::::0::@@pdfmm_shared"

But it should be like:

DESCRIPTION "@#cmake build system:1.1.0#@##1## 25 Dec 2022 11:24:06     TeLLieLaPPie::::0::@@pdfmm_shared"

Title: Re: Qt6
Post by: Dave Yeo on January 02, 2023, 08:44:00 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.
Title: Re: Qt6
Post by: Paul Smedley on January 02, 2023, 09:03:33 am
Yeah sorry, I kinda understand why now.... but not sure (yet) how to fix it...
Title: Re: Qt6
Post by: Paul Smedley on January 02, 2023, 10:14:28 pm
FYI - I setup sponsorship via Github - https://github.com/sponsors/psmedley

This allows folks to set a monthly amount they'd like to sponsor, or do one off sponsorship. All content will remain free, just thought I'd give another option for those who want to support the project.
Title: Re: Qt6
Post by: Paul Smedley on January 02, 2023, 10:15:33 pm
Yeah sorry, I kinda understand why now.... but not sure (yet) how to fix it...

Actually, I have some ideas.... there's some background info at https://github.com/psmedley/cmake-os2/issues/1
Title: Re: Qt6
Post by: Paul Smedley on January 03, 2023, 12:07:54 am
Build update... I actually have 3x separate builds going on right now....

M73p - (4th gen i5) running with 1x job only (ie no parallel builds) - currently at [24998/25370]
Virtualbox - running with 4x cores and 4x parallel jobs - currently at [16066/19725]
T470s (6th gen i7, running with 4x cores and 4x parallel jobs) - currently at [1341/7551]

I have dump partitions setup under Virtualbox and on the T470s for when ninja starts playing up... Unfortunately, I didn't leave any free space on the SSD on the M73p to setup a dump partition - so at some point I'll have to do a backup / repartition/ restore.

edit: vbox crapped out at [16241/19725] with a 'Guru meditation' fault :(
Title: Re: Qt6
Post by: Paul Smedley on January 03, 2023, 01:32:12 am
The M73 build got to around 250 files to go then had some build errors which I fixed.

I just resumed it (and it worked, phew!) But I only got as far as:
8/247] CXX obj/ABS_PATH/U/DEV/qt6-webengine-os2/build/src/core/Release/i386/qtwebengine_sources/webrtc_log_uploader.o

More later this afternoon.... About to head out for the day
Title: Re: Qt6
Post by: Paul Smedley 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.
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Paul Smedley 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....
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley 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 :)
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley on January 05, 2023, 03:32:09 am
Cool, I'll also have to do some benchmarks or building qt6core with ninja vs makefiles...
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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?
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley on January 06, 2023, 10:01:34 am
https://smedley.id.au/tmp/qt6webee.zip

Had a few drinks with my dad this afternoon so no progress this evening :)
Title: Re: Qt6
Post by: Dave Yeo on January 06, 2023, 04:19:04 pm
Try something like this, (src/3rdparty/chromium/third_party/libjpeg_turbo/simd/jsimdext.inc, around line 62)
Code: [Select]
%elifdef OBJ32  ; ----(nasm -fobj -DOBJ32 ...)----------
; * Borland C++ (Win32)
+; * OS/2 using OMF format

; -- segment definition --
;
+%ifdef __OS2__
+%define SEG_TEXT    .TEXT32 align=16 public use32 class=CODE
+%define SEG_CONST   .DATA32 align=16 public use32 class=DATA
+%else
%define SEG_TEXT    _text  align=32 public use32 class=CODE
%define SEG_CONST   _data  align=32 public use32 class=DATA
%endif

%elifdef ELF    ; ----(nasm -felf[64] -DELF ...)------------

Not sure about the align, if you disable AVX, align=16 should be correct and I don't think we (OMF32) support align=32. IIRC, we do support align=64
The simd stuff in libvpx also seems to get its own segment and may need further tuning.

Title: Re: Qt6
Post by: Dave Yeo on January 06, 2023, 04:47:46 pm
For src/3rdparty/chromium/third_party/libvpx/source/libvpx/vpx_ports/x86_abi_support.asm, around line 400,
Code: [Select]
%endmacro
%elifidn __OUTPUT_FORMAT__,aout
%define SECTION_RODATA section .data
%elifidn __OUTPUT_FORMAT__,obj
-%define SECTION_RODATA section .text
-section .text align=16 use32 class=CODE
-group CGROUP text
       +; OMF needs special handling to ensure everything is in the same segment
       +; and that the segment is 32 bit.
       +%define SECTION_RODATA section .TEXT32 use32 class=CODE
%else
%define SECTION_RODATA section .rodata
%endif

Once again not sure if an align should be in there, it wasn't in the old VPX in Mozilla
Title: Re: Qt6
Post by: Paul Smedley on January 06, 2023, 10:13:35 pm
Thanks trying these now - the 2x E2021 are my last remaining errors, I've hacked around the others.

Still get:
Error! E2021: size of segment text exceeds 64k by 470127 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes
Title: Re: Qt6
Post by: Dave Yeo on January 06, 2023, 10:49:04 pm
Did they get rebuilt? Perhaps delete the object files.
Look at your map file, close to the beginning, at the end of the Segments, here there is,
Code: [Select]
text                                  AUTO           0003:00000000   00082c6f
rodata                                AUTO           0004:00000000   00000480
data                                  AUTO           0005:00000000   00012080

And then search for "0003:" and "0005:" to find which functions are at those segments, eg
Code: [Select]
Module: U:\dev\qt6-webengine-os2\build\src\core\Release\i386\obj\third_party\libvpx\libvpx_asm.a(../..../../../src/3rdparty/chromium/third_party/libvpx/source/
libvpx/vpx_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm)
0003:00000000  _vpx_highbd_filter_block1d4_v2_sse2
0003:000000b8  _vpx_highbd_filter_block1d4_v2_avg_sse2
0003:00000179  _vpx_highbd_filter_block1d4_h2_sse2
0003:00000234  _vpx_highbd_filter_block1d4_h2_avg_sse2
...
Code: [Select]
Module: U:\dev\qt6-webengine-os2\build\src\core\Release\i386\obj\third_party\libjpeg_turbo\libsimd_asm.a(../../../../../src/3rdparty/chromium/third_party/libjpeg_turbo/simd/i386/jccolor-vx2.asm)
0005:00000000  _jconst_rgb_ycc_convert_avx2
0003:0005b500  _jsimd_rgb_ycc_convert_avx2
0003:0005b9a0  _jsimd_extrgb_ycc_convert_avx2
0003:0005be40  _jsimd_extrgbx_ycc_convert_avx2
0003:0005c2c0  _jsimd_extbgr_ycc_convert_avx2
0003:0005c760  _jsimd_extbgrx_ycc_convert_avx2
0003:0005cbe0  _jsimd_extxbgr_ycc_convert_avx2
0003:0005d060  _jsimd_extxrgb_ycc_convert_avx2
...

Edit: Maybe they also need the group declared?
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 01:22:50 am
OK I removed all *.o* and *.a from libvpx and libjpeg_turbo but still get the E2021 errors.

New map at https://smedley.id.au/tmp/qt6webee.zip which I'm about to go look at myself
Title: Re: Qt6
Post by: Dave Yeo on January 07, 2023, 02:46:46 am
OK I removed all *.o* and *.a from libvpx and libjpeg_turbo but still get the E2021 errors.

New map at https://smedley.id.au/tmp/Qt6Webee.zip which I'm about to go look at myself

404 error
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 03:13:12 am
oops, link corrected... interesting is that we've made segment text _worse_ by about 60k...
Title: Re: Qt6
Post by: Dave Yeo on January 07, 2023, 03:43:34 am
oops, link corrected... interesting is that we've made segment text _worse_ by about 60k...

Where is tht 60k? The segments are the same size.
Hopefully something hasn't broken in NASM. Could try adding the FLAT keyword after use32, and perhaps change use32 to USE32. Probably won't help.
Pretty sure when building Mozilla, those obj defines worked. Looking at the map file for ESR38, I do see one small text segment,
Code: [Select]
text                                  AUTO           0003:00000000   000005c7
And both libvpx and libjpeg were compiled IIRC, with CFLAGS -Zomf.
Title: Re: Qt6
Post by: Dave Yeo on January 07, 2023, 03:48:34 am
Lets try building a standalone libjpg and then libvpx, which took more patching to build the whole thing.
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 03:49:37 am
The 1st build attempt had:
Error! E2021: size of segment text exceeds 64k by 393007 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

Latest has:
Error! E2021: size of segment text exceeds 64k by 470127 bytes
Error! E2021: size of segment data exceeds 64k by 8320 bytes

so actually, text is worse by 77,120 bytes...

Edit: USE32 vs use32 made no difference, neither did FLAT...
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 04:52:11 am
ok the following in libvpx\source\libvpx\vpx_ports\x86_abi_support.asm
Code: [Select]
%elifidn __OUTPUT_FORMAT__,obj
; OMF needs special handling to ensure everything is in the same segment
; and that the segment is 32 bit.
%define SECTION_RODATA section .text
section .text align=16 use32 class=CODE
group CGROUP text
got us back down to:
Error! E2021: size of segment text exceeds 64k by 393007 bytes
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 05:23:51 am
I suspect we need something for obj in https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libvpx/source/libvpx/third_party/x86inc/x86inc.asm#L113

Edit: tried a few different things in here and it didn't change anything :(
Title: Re: Qt6
Post by: Dave Yeo on January 07, 2023, 06:08:16 am
Yes, much like the patch in your last post.
Playing with libjpeg, my understanding of the obj format seems wrong as how I patch things doesn't make a difference. I am ending up with segments over 64k that link fine but too many segments and experimenting with group, after reading about it on nasm.us hasn't helped. So these patches I posted didn't change behaviour, which might be a nasm regression as it seems it used to, but the group should put them in a common segment, though no luck with it in libjpeg
I'm more used to aout with this stuff.
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 06:20:11 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
Title: Re: Qt6
Post by: Dave Yeo 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
Title: Re: Qt6
Post by: Paul Smedley 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 :)
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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.....
Title: Re: Qt6
Post by: Paul Smedley on January 07, 2023, 08:41:11 am
Progress...
Error! E2021: size of segment text exceeds 64k by 231071 bytes
Title: Re: Qt6
Post by: Paul Smedley 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 :(
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Paul Smedley 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)
Title: Re: Qt6
Post by: Paul Smedley 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...
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 06:44:31 am
Status of QtWebEngine build:
[100%] Built target spellchecker
Title: Re: Qt6
Post by: Sigurd Fastenrath 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!!
Title: Re: Qt6
Post by: Paul Smedley 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
Title: Re: Qt6
Post by: Dave Yeo 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.
Title: Re: Qt6
Post by: Paul Smedley 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 :(
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 07:52:07 am
Wonder what error 203 is? Did you mark the DLL to load high?
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 07:57:48 am
Wonder what error 203 is? Did you mark the DLL to load high?
No idea what 203 is... no, I haven't tried marking the DLL to load high... perhaps I should? How do I do that again?
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 08:06:08 am
OK running highmem.exe --code \qt6\lib\qt6webee.dll allows dooble to load it, but now I see:
Code: [Select]
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'ssp0' --> C:\USR\LIB\SSP0.DLL.
Loading DLL 'Qt6Core' --> U:\QT6\LIB\QT6CORE.DLL.
Loading DLL 'Qt6Widgs' --> U:\QT6\LIB\QT6WIDGS.DLL.
Loading DLL 'Qt6Gui' --> U:\QT6\LIB\QT6GUI.DLL.
Loading DLL 'Qt6Print' --> U:\QT6\LIB\QT6PRINT.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Loading DLL 'Qt6WebEe' --> U:\QT6\LIB\QT6WEBEE.DLL.
Loading DLL 'stdcpp6' --> C:\USR\LIB\STDCPP6.DLL.
Loading DLL 'Qt6WebEs' --> NOT loaded!
DosExit or exception while loading 'Qt6WebEs'.
Loading DLL 'Qt6Sql' --> U:\QT6\LIB\QT6SQL.DLL.
Loading DLL 'Qt6Chars' --> U:\QT6\LIB\QT6CHARS.DLL.
Loading DLL 'Qt6Qml' --> U:\QT6\LIB\QT6QML.DLL.
Loading DLL 'Qt6Netwk' --> U:\QT6\LIB\QT6NETWK.DLL.

Checking popuplog.os2 shows:
Code: [Select]
01-08-2023  16:33:56  SYS2070  PID d3fe  TID 0001  Slot 0082
C:\OS2\CHKDLL32.EXE
QT6WEBES->QT6QUICS.__ZN12QQuickWidget16staticMetaObjectE
127

so gotta look at this now..
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 08:09:17 am
Good, hopefully the rebuild will fix it. highmem -c qt6*dll might be an idea, load them all high. I have almost everything required by Qt5 loading high.
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 08:22:27 am
OK running highmem.exe --code \qt6\lib\qt6webee.dll allows dooble to load it, but now I see:
Code: [Select]
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'ssp0' --> C:\USR\LIB\SSP0.DLL.
Loading DLL 'Qt6Core' --> U:\QT6\LIB\QT6CORE.DLL.
Loading DLL 'Qt6Widgs' --> U:\QT6\LIB\QT6WIDGS.DLL.
Loading DLL 'Qt6Gui' --> U:\QT6\LIB\QT6GUI.DLL.
Loading DLL 'Qt6Print' --> U:\QT6\LIB\QT6PRINT.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Loading DLL 'Qt6WebEe' --> U:\QT6\LIB\QT6WEBEE.DLL.
Loading DLL 'stdcpp6' --> C:\USR\LIB\STDCPP6.DLL.
Loading DLL 'Qt6WebEs' --> NOT loaded!
DosExit or exception while loading 'Qt6WebEs'.
Loading DLL 'Qt6Sql' --> U:\QT6\LIB\QT6SQL.DLL.
Loading DLL 'Qt6Chars' --> U:\QT6\LIB\QT6CHARS.DLL.
Loading DLL 'Qt6Qml' --> U:\QT6\LIB\QT6QML.DLL.
Loading DLL 'Qt6Netwk' --> U:\QT6\LIB\QT6NETWK.DLL.

Checking popuplog.os2 shows:
Code: [Select]
01-08-2023  16:33:56  SYS2070  PID d3fe  TID 0001  Slot 0082
C:\OS2\CHKDLL32.EXE
QT6WEBES->QT6QUICS.__ZN12QQuickWidget16staticMetaObjectE
127

so gotta look at this now..

OK - so the qt6quics problem is due to QtDeclarative building multiple DLL's with the same name - and the wrong one ending up in \qt6\lib.

I now get:
Code: [Select]
{0}[u:\dev\dooble-2022.12.25] chkdll32 Dooble.exe
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'ssp0' --> C:\USR\LIB\SSP0.DLL.
Loading DLL 'Qt6Core' --> U:\QT6\LIB\QT6CORE.DLL.
Loading DLL 'Qt6Widgs' --> U:\QT6\LIB\QT6WIDGS.DLL.
Loading DLL 'Qt6Gui' --> U:\QT6\LIB\QT6GUI.DLL.
Loading DLL 'Qt6Print' --> U:\QT6\LIB\QT6PRINT.DLL.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Loading DLL 'Qt6WebEe' --> U:\QT6\LIB\QT6WEBEE.DLL.
Loading DLL 'stdcpp6' --> C:\USR\LIB\STDCPP6.DLL.
Loading DLL 'Qt6WebEs' --> U:\QT6\LIB\QT6WEBES.DLL.
Loading DLL 'Qt6Sql' --> U:\QT6\LIB\QT6SQL.DLL.
Loading DLL 'Qt6Chars' --> U:\QT6\LIB\QT6CHARS.DLL.
Loading DLL 'Qt6Qml' --> U:\QT6\LIB\QT6QML.DLL.
Loading DLL 'Qt6Netwk' --> U:\QT6\LIB\QT6NETWK.DLL.
All DLL's used by 'Dooble.exe' could be loaded.

Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 08:28:51 am
Some simple websites seem to load!!!!!

Anything SSL seems to crash with:
Code: [Select]
[54340:4:0108/165546.039000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.

Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 08:46:12 am
OK... for the BRAVE.. and bear in mind the environment is a 180mb download.. I've uploaded it to Dropbox to save my poor 25 mbit upload :)

Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0

Dooble 2022.12.25 - https://smedley.id.au/tmp/dooble-2022.12.25-qt6-os2-20230108.zip

Qt6 is a memory hog - as Dave has suggested - it might be worth marking more DLL's high with highmem.exe

There are other examples in \qt6\examples\webenginequick & \qt6\examples\webwidgets that may be worth testing.

Things like menubar not quite lining up are KNOWN issues - see https://github.com/psmedley/qt6-base-os2/issues/6

Don't forget, you can sponsor further development at https://github.com/sponsors/psmedley or https://www.arcanoae.com/shop/os2-ports-paul-smedley
Title: Re: Qt6
Post by: Sigurd Fastenrath on January 08, 2023, 09:22:39 am
Sponsoring via github is quite difficult (one has to register and so on.), so I did it direct via Paypal.
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 09:33:15 am
Thanks Paul, there's something a bit weird about the zip, fc/2 displays it as empty and forcing it, I see lots of warnings, "warning:  stripped absolute path spec from /qt6/lib/" with various trailing paths. I also see some weird files, ib and llib,
Code: [Select]
Directory of H:\tmp\qt6\qt6

 1-08-23 12:30a         <DIR>    124 ----  .
 1-08-23 12:27a         <DIR>      0 ----  ..
 1-08-23  3:14p         <DIR>    124 a---  bin
11-20-22 10:47a         <DIR>    124 a---  doc
 1-08-23  3:14p         <DIR>    124 a---  examples
12-07-22  8:59p     8,701,530    124 a---  ib
 1-08-23  2:43p         <DIR>    124 a---  include
 1-08-23  3:14p         <DIR>    124 a---  lib
12-07-22  1:17p     1,426,986    124 a---  llib
12-07-22  7:11a         <DIR>    124 a---  mkspecs
 1-08-23  2:43p         <DIR>    124 a---  modules
11-26-22 12:34p         <DIR>    124 a---  phrasebooks
 1-08-23  2:43p         <DIR>    124 a---  plugins
 1-08-23  2:43p         <DIR>    124 a---  qml
 1-08-23  2:43p         <DIR>    124 a---  resources
 1-08-23  2:43p         <DIR>    124 a---  translations
       16 file(s)  10,128,516 bytes used
                    8,558,587 K bytes free

Bedtime here so will test tomorrow
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 09:35:37 am
Sponsoring via github is quite difficult (one has to register and so on.), so I did it direct via Paypal.
Whatever is easiest is appreciated! As Sigurd has highlighted, there is also a Paypal link on my site.
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 09:43:48 am
Thanks Paul, there's something a bit weird about the zip, fc/2 displays it as empty and forcing it, I see lots of warnings, "warning:  stripped absolute path spec from /qt6/lib/" with various trailing paths. I also see some weird files, ib and llib,
Code: [Select]
Directory of H:\tmp\qt6\qt6

 1-08-23 12:30a         <DIR>    124 ----  .
 1-08-23 12:27a         <DIR>      0 ----  ..
 1-08-23  3:14p         <DIR>    124 a---  bin
11-20-22 10:47a         <DIR>    124 a---  doc
 1-08-23  3:14p         <DIR>    124 a---  examples
12-07-22  8:59p     8,701,530    124 a---  ib
 1-08-23  2:43p         <DIR>    124 a---  include
 1-08-23  3:14p         <DIR>    124 a---  lib
12-07-22  1:17p     1,426,986    124 a---  llib
12-07-22  7:11a         <DIR>    124 a---  mkspecs
 1-08-23  2:43p         <DIR>    124 a---  modules
11-26-22 12:34p         <DIR>    124 a---  phrasebooks
 1-08-23  2:43p         <DIR>    124 a---  plugins
 1-08-23  2:43p         <DIR>    124 a---  qml
 1-08-23  2:43p         <DIR>    124 a---  resources
 1-08-23  2:43p         <DIR>    124 a---  translations
       16 file(s)  10,128,516 bytes used
                    8,558,587 K bytes free

Bedtime here so will test tomorrow

That's weird... I created a new zip and re-uploaded to dropbox.. same filename is also available on my server in the usual location, but I'd  rather it not get hammered with multiple 180mb downloads, so I'm not posting the link :)
Title: Re: Qt6
Post by: Martin Iturbide on January 08, 2023, 02:43:20 pm
Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0

Dooble 2022.12.25 - https://smedley.id.au/tmp/dooble-2022.12.25-qt6-os2-20230108.zip
You did it Paul. This is an important milestone and thanks a lot.

Now came my silly question. I want to be brave and try it, but how should it be installed?
I checked the "qt6-6.2.4-os2-20230108.zip" file and I tried to located the bin on /usr/bin, the lib on /usr/lib. Where should I locate the rest?
Is that a good way to try it out, or should I locate all the Qt6 somewhere and add the paths and libpaths on config.sys?

How to mark the DLL's high with highmem.exe? Is it as simple as "highmem qt6*.dll" ?


Don't forget, you can sponsor further development at https://github.com/sponsors/psmedley or https://www.arcanoae.com/shop/os2-ports-paul-smedley

Please sponsor Paul, this is an important milestone.


Regards
Title: Re: Qt6
Post by: David McKenna on January 08, 2023, 02:58:21 pm
 Wow! Wow! Wow!

 Thanks Paul, this is fantastic! Amazing progress... I downloaded QT6 and Dooble, loaded all QT6 DLL's high and it works just as you say. Http:// sites work, but https:// give the error about AIA chasing (?). I also get warinings from Fontconfig - maybe a glitch in my environment? Makes fonts look weird in Dooble. Here is a typical console running QT6 Dooble (don't see this with QT5):

Fontconfig warning: "/@unixroot/etc/fonts\fonts.conf", line 123: Having multiple
 <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/@unixroot/etc/fonts\fonts.conf", line 123: Having multiple
 <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/@unixroot/etc/fonts\fonts.conf", line 123: Having multiple
 <family> in <alias> isn't supported and may not work as expected
Fontconfig warning: "/@unixroot/etc/fonts\fonts.conf", line 368: unknown element
 "blank"
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/@unixroot/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir prefix="xdg">fontconfig</cachedir>
ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.

 After trying an https:// site, Dooble crashes and the system is quite unstable, requiring a reboot.

 I'll check out the examples next...

Regards,

EDIT : it was a glitch in my environment - fixed the fontconfig warnings by re-installing fontconfig...
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 08:44:14 pm
Hi Martin, I simply installed somewhere handy, tmp on my ramdisk (H:) and opened up a cmd window and did,
Code: [Select]
set PATH=H:\tmp\qt6\bin;%PATH%
set BEGINLIBPATH=h:\tmp\qt6\lib
dooble
and it ran fine for a few pages before vanishing. There's some cert issues but no fontconfig issues like David mentioned. The tail,
Code: [Select]
[132:36:0108/113708.183000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.
[132:27:0108/113709.603000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.

Edit, I did highmem -c qt6*dll. I noticed this,
Code: [Select]
Processing module : Qt6WebCl.dll  MODIFIED
Processing module : Qt6WebEe.dll
Processing module : Qt6WebEk.dll  MODIFIED
Something broken or just weird with QtWebEe.dll?

Edit: the PATH and LIBPATH stuff can be done in a script or even a program object
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 08:48:53 pm
Qt6Webee.dll is already processed by me, so isn't modified?
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 08:53:28 pm
Qt6Webee.dll is already processed by me, so isn't modified?

That explains it.
The new zip had the same issue, guessing, the paths are absolute and start with U:, hmm looking, the PATHS start with / eg
Code: [Select]
Archive:  Z:/Mozprofiles/Downloads/qt6-6.2.4-os2-20230108.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 01-07-2023 20:44 00000000  /qt6/bin/
  214251  Defl:N    85209  60% 12-06-2022 10:42 0ec34293  /qt6/bin/androiddeployqt.exe
...
Not a big deal
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 09:34:29 pm
Hey all,

Just to set expectations... I just finished two weeks vacation, where I had more opportunity to play with things. Today, I'm back at work, so things will slow down.... I'll investigate things as time permits.

@Dave - remind me - you're still unable to checkout the git repo? I'll look at uploading a zip of the qt6-webengine-os2 dir - that you should be able to unzip, then use git pull to update. This is how I've transferred the source for some of my VM tests - whilst I was able to checkout the repo once on another machine, I've been unsuccessful since on other OS/2 machines.

Cheers,

Paul.
Title: Re: Qt6
Post by: David McKenna on January 08, 2023, 09:43:18 pm
Hey Paul,

  Just curious... there are 2 files in the root of your QT6 archive: 'ib' and 'llib'. What are they?

  Running examples I'm seeing a lot of errors with QML stuff like:

qrc:/qml/qmlaxes/main.qml:30:1: module "QtQml.WorkerScript" plugin "workerscript
plugin" not found
     import QtQuick 2.0
     ^

  Slight variations on that, but always referring to "workerscript plugin" not found.

Regards,
Title: Re: Qt6
Post by: Paul Smedley on January 08, 2023, 10:29:04 pm
Hey Dave,

I have no idea about the ib and llib - that system ended up running out of RAM last night during the rebuild, and had to be restarted, so maybe I'll repackage it?

No idea about the WorkerScript error - could be one of those cases where due to our 8.3 DLL convention, we have multiple DLL's with the same name so in effect, we're missing some.

Can you tell me which example (well just one will do) gives the error below, and I'll investigate.

Cheers,

Paul.
Title: Re: Qt6
Post by: Dave Yeo on January 08, 2023, 10:46:30 pm
Hey all,

Just to set expectations... I just finished two weeks vacation, where I had more opportunity to play with things. Today, I'm back at work, so things will slow down.... I'll investigate things as time permits.

@Dave - remind me - you're still unable to checkout the git repo? I'll look at uploading a zip of the qt6-webengine-os2 dir - that you should be able to unzip, then use git pull to update. This is how I've transferred the source for some of my VM tests - whilst I was able to checkout the repo once on another machine, I've been unsuccessful since on other OS/2 machines.

Cheers,

Paul.

Hi Paul, no I never did get it checked out. Been meaning to boot to Linux and get it there, just haven't got around to it yet.
I've also been playing around with the latest Qt5 from Bitwise with your node.js but the system keeps trapping, discouraging. Today, thinking about things, I realized I started loading xf86sup.sys while playing with hobX11 so just rebooted with that remmed out to see if it was the problem, otherwise I guess try to get a dump and someone to look at it.
Thanks for your work
Title: Re: Qt6
Post by: Paul Smedley on January 09, 2023, 09:24:19 am
Hey Dave,

  Just curious... there are 2 files in the root of your QT6 archive: 'ib' and 'llib'. What are they?

Confirming that these are just bogus files mistakenly located in my \qt6\ dir.....
Title: Re: Qt6
Post by: Paul Smedley on January 09, 2023, 09:29:15 am
Wonder what error 203 is? Did you mark the DLL to load high?

I chatted with Steven - error 203 is a cryptic way of saying the DLL is too big :)
Title: Re: Qt6
Post by: Paul Smedley on January 09, 2023, 09:30:52 am
Some simple websites seem to load!!!!!

Anything SSL seems to crash with:
Code: [Select]
[54340:4:0108/165546.039000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.

So I've changed my mind - I don't think the above is directly the cause of the SSL issues - but at the same time, I'm not sure why the message is being logged. The was a similar message in cert_verify_proc_builtin.cc in Qt 5.15 but the message wasn't coming up endlessly.... interesting....
Title: Re: Qt6
Post by: Paul Smedley on January 09, 2023, 10:25:42 am
No idea about the WorkerScript error - could be one of those cases where due to our 8.3 DLL convention, we have multiple DLL's with the same name so in effect, we're missing some.

Can you tell me which example (well just one will do) gives the error below, and I'll investigate.

OK, so seems to be the WebEngineQuick examples that give this error....

On another topic, I saw a message about sqlite3 during one of my tests this evening, it reminded me of https://github.com/psmedley/qt6-webengine-os2/issues/2

I also need to investigate Komh's comment on https://github.com/psmedley/qt6-webengine-os2/commit/aaee21b9879cead674a26e44f7a6e06424324b6c
Title: Re: Qt6
Post by: David McKenna on January 09, 2023, 12:22:22 pm
Paul,

  Also any example that starts with 'QML...' under /examples/charts/.... will show the workerscript error. Some of those charts examples also have odd gray line or rectangle artifacts on them, especially animated ones.

  Ran into this too:

01-08-2023  15:49:06  SYS2070  PID 008a  TID 0001  Slot 009f
C:\QT6\EXAMPLES\WEBENGINEQUICK\RECIPEBROWSER\RECIPEBROWSER.EXE
QT6QUICL->QT6QUICS.__ZN20QQuickFileNameFilter16staticMetaObjectE
127

  I also have had some https:// websites work just fine - even with the simple browser. Try /examples/webenginewidgets/videoplayer - a youtube video that works fine here, even though it repeatedly shows the 'AIA chasing' error in the console.

Regards,
Title: Re: Qt6
Post by: Rich Walsh on January 09, 2023, 01:44:17 pm
could be one of those cases where due to our 8.3 DLL convention, we have multiple DLL's with the same name

Just a thought... It often seems like getting a usable 8.3 DLL name out of some of these build systems is quite a chore. Wouldn't it be easier to let these packages use whatever name they want, then in a post-processing step, update the file and module names as needed? This could be done at build-time or later in a batch coordinated by a control file.

If you're interested, let me know. I'd probably implement it in REXX (which is pretty good for patching binaries) but deliver it as an .exe so you wouldn't have to run 'cmd.exe'. And... since I'll probably recycle some of the REXX I wrote for MozTurbo, the util could also mark the DLL for high-mem, if desired.
Title: Re: Qt6
Post by: Dave Yeo on January 09, 2023, 04:45:33 pm
Some simple websites seem to load!!!!!

Anything SSL seems to crash with:
Code: [Select]
[54340:4:0108/165546.039000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing.

So I've changed my mind - I don't think the above is directly the cause of the SSL issues - but at the same time, I'm not sure why the message is being logged. The was a similar message in cert_verify_proc_builtin.cc in Qt 5.15 but the message wasn't coming up endlessly.... interesting....

I get the same messages along with complaints about OpenGl,
Code: [Select]
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
and yet have not found a page that doesn't load. The browser disappears often and last night while filling out a form, the WPS froze. I'm typing this in in Dooble. (BTW, spell check isn't working)
Thinking about what may be different, it occurred to me that how I unzipped the package might be the difference.
As I said earlier, I usually use fc/2 for unzipping, which shows the zip as empty, along time back I set up a user menu to unzip to the opposite panel, looking now, it is simply unzip with no parameters. I wonder if I'm losing a symlink or such that breaks things for others.
As for the disappearing, I still wonder about NSS as FF/SM had the same issue with NSS.
Title: Re: Qt6
Post by: Dave Yeo on January 09, 2023, 05:01:26 pm
At youtube, some videos play, some freeze, skipped ads once and sound started looping and needed to restart the browser. It is playing AV1 video.
Full screen doesn't do anything, nor does F11. Clicking the mini-player thing, the browser froze at about a 3rd of loading the page. Need to restart the browser to continue, otherwise it just sits there with the circle thing spinning on the tab, same with another tab.
Title: Re: Qt6
Post by: Dave Yeo on January 09, 2023, 06:49:09 pm
Seems that Dooble only likes some paths.
I've been running Dooble on my ramdisk, installed at h:\tmp\qt6 and https works fine. Tried installing to k:\qt6, never loads a https page. Tried k:\tmp\qt6, same result. Pretty weird that the drive would matter, they're both formatted JFS.
I'll try some others.
Title: Re: Qt6
Post by: Dave Yeo on January 09, 2023, 09:54:24 pm
After resetting the profile, it seems to load HTTPS from any drive. Did finally get a trp, breakpoint.
Title: Re: Qt6
Post by: Paul Smedley on January 09, 2023, 11:01:29 pm
After resetting the profile, it seems to load HTTPS from any drive. Did finally get a trp, breakpoint.

I saw a couple of those Breakpoint traps too - I guess that means there's a breakpoint set in the code somewhere? I'll have to go looking.

Where is the Dooble profile? in %HOME% I guess? Interesting... I'm going to go through the patches to net\cert\* more closely this evening and look for anything I may have misapplied.

Cheers,

Paul.
Title: Re: Qt6
Post by: Dave Yeo on January 10, 2023, 12:49:36 am
Yes, the profile is in %HOME%/.dooble, there's also a way to reset it under settings.
In Mozilla, the int 3"s are there to trap when memory gets screwy. Your Dooble vanishes a lot here, os2world (not the forum) for example seems to always trigger the vanishing act.
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 01:20:36 am
Possibly related to the profile corruption (assuming it uses sqlite) is https://github.com/psmedley/qt6-webengine-os2/issues/2 I'll try look into it tonight.
Title: Re: Qt6
Post by: Dave Yeo on January 10, 2023, 02:03:07 am
Sqlite3 dropped OS/2 support long ago and patching it is a bitch, especially trying to patch the almalgation, really they introduced a new way to support other OS's.
I take it that the system sqlite3 is too old?
Dooble does use sqlite3,
Code: [Select]
W:\Home\.dooble>file dooble_accepted_or_blocked_domains.db
dooble_accepted_or_blocked_domains.db: SQLite 3.x database, last written using SQLite version 3028000

No wal (write ahead log/journal) like Mozilla uses to help recover from a crash. IIRC there's also another way of doing journal-ling that Win32 (and Linux?) uses with sqlite3 to help recover from crashes.
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 02:46:52 am
Hey Dave, to be honest, I'm not sure how to enable system sqlite3 - BWW had patched/replaced the amalgamation with a newer version than what was included in 5.15.... I'm naively thinking that the amalgamation is mainly a concatenation of the individual source files, and there can't be that many required patches, and it can't be that hard :) I'll have more to say this evening.
Title: Re: Qt6
Post by: Dave Yeo on January 10, 2023, 02:53:40 am
Yes, the amalgamation is basically concatenated source, though I think there was more to it.
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 05:12:25 am
Yes, the amalgamation is basically concatenated source, though I think there was more to it.
Actually, it looks like I can just run the script at https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/sqlite/scripts/generate_amalgamation.py to regenerate the amalgamation files.....
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 09:01:18 am
Hey Rich,
could be one of those cases where due to our 8.3 DLL convention, we have multiple DLL's with the same name

Just a thought... It often seems like getting a usable 8.3 DLL name out of some of these build systems is quite a chore. Wouldn't it be easier to let these packages use whatever name they want, then in a post-processing step, update the file and module names as needed? This could be done at build-time or later in a batch coordinated by a control file.

If you're interested, let me know. I'd probably implement it in REXX (which is pretty good for patching binaries) but deliver it as an .exe so you wouldn't have to run 'cmd.exe'. And... since I'll probably recycle some of the REXX I wrote for MozTurbo, the util could also mark the DLL for high-mem, if desired.

Definitely interested - but this approach would also require changes to cmake to make cmake NOT shorten the names. I also suspect this might not work for some of the Qml issues, where Qt seems to be looking for the 'original' name.

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 09:31:16 am
A few small fixes in https://smedley.id.au/tmp/qt6webee-20220110.zip

I've already run highmem on the DLL. I'm also posting this from Dooble from Qt6 :)
Title: Re: Qt6
Post by: Dave Yeo on January 10, 2023, 05:11:35 pm
After this update, Dooble won't fully load most web pages, instead simply vanishing. New profile didn't help either.
Title: Re: Qt6
Post by: Rich Walsh on January 10, 2023, 08:05:00 pm
could be one of those cases where due to our 8.3 DLL convention, we have multiple DLL's with the same name
Wouldn't it be easier to let these packages use whatever name they want, then in a post-processing step, update the file and module names as needed? This could be done at build-time or later in a batch coordinated by a control file.

Definitely interested - but this approach would also require changes to cmake to make cmake NOT shorten the names. I also suspect this might not work for some of the Qml issues, where Qt seems to be looking for the 'original' name.

The goal is to be helpful across a range of projects without requiring you to go out of your way to use it. Perhaps one of these use cases will fit your needs now or later:

* Basic usage:    mk83 qt6webengine.dll qt6weben

* Avoid name collisions:    mk83 qt6webee.dll qt6weben

* Coordinate renames using a control file:    mk83 qt6webengine.dll /F qt6dlls.txt
(where 'qt6dlls.txt' is a simple plain-text file with entries like "qt6webengine.dll qt6weben").

* Batch rename after a build:    mk83 /X qt6dlls.txt
(this assumes the control file contains qualified filenames so they can be found)

These are the scenarios that come to mind. If it seems worth the effort, I'll proceed.
Title: Re: Qt6
Post by: Paul Smedley on January 10, 2023, 09:29:20 pm
After this update, Dooble won't fully load most web pages, instead simply vanishing. New profile didn't help either.
Interesting, I didn't see this in my limited testing. The only quirk I noticed was that some pages looked like they had loaded, but rendered a grey page instead of the actual page. There really weren't that many changes, so hard to understand how things broke. I assume you tried rebooting?
Title: Re: Qt6
Post by: Dave Yeo on January 10, 2023, 11:39:07 pm
Yes, tried rebooting. I don't think one page fully loaded whereas before most fully loaded. Tested things like the BBC, CBC, Github, Bitbucket and here.
Guess I should revisit trying to build NSS, it is weird as it uses the NSPR4 build system but it sure reminds me of how the Mozilla apps vanished (no where as much though) when using the latest system NSPR4/NSS.
Title: Re: Qt6
Post by: Remy on January 11, 2023, 02:37:04 am
Yes, tried rebooting. I don't think one page fully loaded whereas before most fully loaded. Tested things like the BBC, CBC, Github, Bitbucket and here.
Guess I should revisit trying to build NSS, it is weird as it uses the NSPR4 build system but it sure reminds me of how the Mozilla apps vanished (no where as much though) when using the latest system NSPR4/NSS.

Not enough storage ?
Title: Re: Qt6
Post by: Paul Smedley on January 11, 2023, 03:02:54 am
Hey Dave,

Yes, tried rebooting. I don't think one page fully loaded whereas before most fully loaded. Tested things like the BBC, CBC, Github, Bitbucket and here.
Guess I should revisit trying to build NSS, it is weird as it uses the NSPR4 build system but it sure reminds me of how the Mozilla apps vanished (no where as much though) when using the latest system NSPR4/NSS.

Well we definitely ARE using nss... I'll revisit the changes in https://github.com/psmedley/qt6-webengine-os2/commit/7e86e5c1bf36fa83f41030cfa1599284d0deb8ed this evening - whilst they do align better with 5.15.x, there are other changes in that code too that may be causing us issues (noting the net_fetcher warnings, something is definitely not quite right for our platform.

I also noticed there are a couple of unittests there, so I'll see if they built and try running them.
Title: Re: Qt6
Post by: Dave Yeo on January 11, 2023, 03:16:45 am
Yes, tried rebooting. I don't think one page fully loaded whereas before most fully loaded. Tested things like the BBC, CBC, Github, Bitbucket and here.
Guess I should revisit trying to build NSS, it is weird as it uses the NSPR4 build system but it sure reminds me of how the Mozilla apps vanished (no where as much though) when using the latest system NSPR4/NSS.

Not enough storage ?

Seemed fine looking in Theseus, plus after the reboot things should have been better.
Title: Re: Qt6
Post by: Paul Smedley on January 11, 2023, 05:09:44 am
Interesting, I just read that newer version of qtwebengine can be built against older Qt versions (up to the last LTS version).

So in theory at least, we can try built qtwebengine 6.4 using the qt 6.2 libs.....
Title: Re: Qt6
Post by: Paul Smedley on January 11, 2023, 08:43:44 am
Hey Dave,

Yes, tried rebooting. I don't think one page fully loaded whereas before most fully loaded. Tested things like the BBC, CBC, Github, Bitbucket and here.
Guess I should revisit trying to build NSS, it is weird as it uses the NSPR4 build system but it sure reminds me of how the Mozilla apps vanished (no where as much though) when using the latest system NSPR4/NSS.

Well we definitely ARE using nss... I'll revisit the changes in https://github.com/psmedley/qt6-webengine-os2/commit/7e86e5c1bf36fa83f41030cfa1599284d0deb8ed this evening - whilst they do align better with 5.15.x, there are other changes in that code too that may be causing us issues (noting the net_fetcher warnings, something is definitely not quite right for our platform.

I also noticed there are a couple of unittests there, so I'll see if they built and try running them.

https://smedley.id.au/tmp/qt6webee-20220111.zip reverts the changes in the above commit. It would be interesting to confirm if these help you.

Cheers,

Paul
Title: Re: Qt6
Post by: Dave Yeo on January 11, 2023, 04:19:36 pm
Yes, things are more stable with that version. Still disappears now and again. Trying to post here caused sigtraps
Title: Re: Qt6
Post by: Paul Smedley on January 11, 2023, 11:30:07 pm
I raised https://github.com/psmedley/qt6-webengine-os2/issues/6 for the disappearing browser issue.
Title: Re: Qt6
Post by: Dave Yeo on January 12, 2023, 12:02:13 am
I think my hard drive is dying so not much testing until I replace it.
Title: Re: Qt6
Post by: Paul Smedley on January 12, 2023, 12:12:58 am
I think my hard drive is dying so not much testing until I replace it.

Good luck with the replacement - reminds me that I need to back up my virtualbox dev drive :)
Title: Re: Qt6
Post by: Paul Smedley on January 12, 2023, 09:43:16 am
https://smedley.id.au/tmp/qt6webee-20230112.zip seems to fix the "[54340:4:0108/165546.039000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing." issues....
Title: Re: Qt6
Post by: roberto on January 12, 2023, 06:04:26 pm
Hello
This last version improves a lot.
But when opening a YouTube, he stops the sound and also the image.
If I leave it open the dooble.exe, and I open the manhjongg.exe, after playing for a while, with the activated sound, the Dooble.exe program, takes up the operation of the video, perfect.
This returns to me the dooble.exe:
Code: [Select]
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204?conn2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://i.ytimg.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[94:9:0112/172145.062000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172145.064000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034

Also comment, I have not let me write the dooble.exe qt6, in this message the square brackets [ ]
Saludos
Title: Re: Qt6
Post by: roberto on January 12, 2023, 06:21:08 pm
It also seems that it works well executing this patch in QBASIC.
regards
Code: [Select]
REM VG.BAS
REM                ROBERTO GAINZA      07-01-23
          REM      LOS 1000 PRIMEROS MEMORIA
          REM

CLS

DATA long a
PRINT "ejecutando ..."

FOR A = 1 TO 10000000
REM no quitar la linea print o se generara el error
 PRINT A

REM KAI 1000 SIGUIENTES
POKE &H2A75DEC5, 1
POKE &H2A75DF02, 1
POKE &H2A75E123, 1
POKE &H2A75E296, 1
POKE &H2A75E2A4, 1
POKE &H2A75E2D7, 1
POKE &H2A75E378, 1
POKE &H2A75E4C7, 1
POKE &H2A75E4D8, 1
POKE &H2A75E551, 1
POKE &H2A75E59E, 1
POKE &H2A75E617, 1
POKE &H2A75E67B, 1
POKE &H2A75E6C5, 1
POKE &H2A75E702, 1
POKE &H2A75E740, 1
POKE &H2A75E7B9, 1
POKE &H2A75E923, 1
POKE &H2A75EA25, 1
POKE &H2A75EAD7, 1
POKE &H2A75EB32, 1
POKE &H2A75EC98, 1
POKE &H2A75ED9E, 1


REM KAI 1000 SIGUIENTES
POKE &H640442D8, 1
POKE &H64044351, 1
POKE &H6404439E, 1
POKE &H640444A4, 1
POKE &H640445E7, 1
POKE &H64044723, 1
POKE &H6404487B, 1
POKE &H640448C5, 1
POKE &H64044902, 1
POKE &H64044A98, 1
POKE &H64044AC3, 1
POKE &H64044B51, 1
POKE &H64044C25, 1
POKE &H64044CD7, 1
POKE &H64044DE7, 1
POKE &H64044F23, 1
POKE &H64045017, 1
POKE &H640450C5, 1
POKE &H64045102, 1
POKE &H64045108, 1



NEXT A
END


Now if I let me write [], something improves.
This is my first message in your QT6 dooble, in Os2world. !!
Regards
Title: Re: Qt6
Post by: TeLLie on January 12, 2023, 07:07:26 pm
Hi All
I compiles some QT6 progs.
I use Paul latest qt6 files..
simsu-1.4.2-qt6.7z
peg-e-1.3.2-qt6.7z
novprog-3.2.2-qt6.7z
kapow-1.6.1-qt6.7z
hexalate-1.2.2-qt6.7z
gottet-1.2.2-qt6.7z
cutemaze-1.3.2-qt6.7z
tanglet-1.6.3-qt6.7z
connectagram-1.3.3-qt6.7z
focuswriter-1.8.4-qt6.7z

It has still same probs as discribe in this Topic....

You can download from : http://rpm.netlabs.org/test/QT6/
Title: Re: Qt6
Post by: David McKenna on January 12, 2023, 10:16:03 pm
 Paul,

  I can confirm the 'AIA chasing' error is gone, and this version of qt6webengine is much more stable for Dooble (as in doesn't crash or disappear as much) if a bit jerky. Thanks for your efforts!

  There are some functions that don't work (like pdf's, ftp and printing) - should I create tickets at github for those?

Regards,
Title: Re: Qt6
Post by: Martin Iturbide on January 12, 2023, 11:39:34 pm
Quote
Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0

Dooble 2022.12.25 - https://smedley.id.au/tmp/dooble-2022.12.25-qt6-os2-20230108.zip

https://smedley.id.au/tmp/qt6webee-20230112.zip
Hi
I tried Qt6 (with qt6webee-20230112.zip) and Dooble.

As Dave suggested

First:
 highmem -c qt6*dll
Then:
 set PATH=C:\qt6\bin;%PATH%
 set BEGINLIBPATH=c:\qt6\lib
 dooble

Dooble loads with the reported issues:
- Menus are not located correctly.
- Error on dooble loading:
Quote
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.

But Dooble does not render any page for me. If I put an file URL it will download it fine. It looks on the browser like it is loading but nothing shows or happens.
Any other log I can take? or something I may be missing?

Regards
Title: Re: Qt6
Post by: Dave Yeo on January 12, 2023, 11:48:36 pm
   There are some functions that don't work (like pdf's, ftp and printing) - should I create tickets at github for those?


I know in my efforts to compile the latest Qt5, I had to disable pdf's/printing, they were both covered by the same option.
Ftp has been dropped from most browsers now, so possibly Dooble doesn't support ftp.
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 12:38:32 am
Hi Roberto,
It also seems that it works well executing this patch in QBASIC.
regards
<snip>
Now if I let me write [], something improves.
This is my first message in your QT6 dooble, in Os2world. !!
Regards

Can you explain more about what this patch is doing? It is modifying one of the DLL's? Do the square brackets work in Qt5 Dooble?

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 12:39:52 am
Hi again,
This last version improves a lot.
But when opening a YouTube, he stops the sound and also the image.
If I leave it open the dooble.exe, and I open the manhjongg.exe, after playing for a while, with the activated sound, the Dooble.exe program, takes up the operation of the video, perfect.
This returns to me the dooble.exe:
Code: [Select]
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204?conn2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://i.ytimg.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[94:9:0112/172145.062000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172145.064000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034

I assume happens with the audio stream in Qt5 Dooble? This code is unchanged and is way beyond my ability to investigate. Audio sharing has always (IMHO) been an issue on OS/2....
Title: Re: Qt6
Post by: David McKenna on January 13, 2023, 12:40:33 am
Hey Dave,

  Dooble docs claim ftp is supported (and gopher too! - tho I haven't tried it).

  Another issue I have - with QT5 Dooble, when I start it, the Dooble logo appears in the center of the screen, then the Dooble window appears in the location I last used it.

  With the QT6 Dooble, the logo appears above and to the left of the center of the screen, then the Dooble window appears way too big with huge images, off the edge of the screen to the right and bottom as if it thinks the screen resolution is larger than it really is. If I resize the window, close Dooble, then re-open, the window is way too big again.

  I wonder if this is related to the menu drop-down lists being offset? Maybe the problem is not the list positions, but the window position...

  Anyone else see this?

Regards,
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 12:41:35 am
Hey Dave!

  I can confirm the 'AIA chasing' error is gone, and this version of qt6webengine is much more stable for Dooble (as in doesn't crash or disappear as much) if a bit jerky. Thanks for your efforts!

  There are some functions that don't work (like pdf's, ftp and printing) - should I create tickets at github for those?

Good news - thanks for sharing! Yeah go on and create individual tickets for pdf, printing and ftp on github - as Dave Yeo has suggested, FTP may not be possible, but I have seen some code wrapped around an #ifdef that suggests FTP could be enabled....
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 12:43:23 am
Hi Martin,

But Dooble does not render any page for me. If I put an file URL it will download it fine. It looks on the browser like it is loading but nothing shows or happens.
Any other log I can take? or something I may be missing?

I've seen this sporadically too - but certainly not on all pages. I'd make sure you're on a reasonably fresh boot - and also can you confirm what VIRTUALADDRESSLIMIT is set to?

Cheers,

Paul.
Title: Re: Qt6
Post by: Dave Yeo on January 13, 2023, 12:53:34 am
Hi David, the Dooble logo is where expected, basically centre of screen, it is missing two borders like it is drawn slightly offset. The window also opens where it should with the right size images.

Hi Paul, got an SSD and everything backed up so not too scared to use the old drive, actually using my ram disk mostly.
This build seems somewhat better. Still vanishes sometimes, seems to happen when the console spits out JavaScript errors, also first complaining about no opengl, for os2world.com
Code: [Select]
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Uncaught ReferenceError: osdlfm is not definedQFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Uncaught ReferenceError: osdlfm is not defined

Hi Martin, I often have to click the address bar at the end of the URL and press return before the first page loads, then things load OK.
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 02:55:03 am
Raised a new issue today for simplebrowser crashing accessing www.os2world.com - https://github.com/psmedley/qt6-webengine-os2/issues/8

Interesting console messages that I haven't seen before:
Code: [Select]
[151:4:0113/122057.387000:ERROR:disk_data_allocator.cc(174)] DISK: Cannot write to disk. written = -1 FILE_ERROR_FAILED
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 04:37:15 am
Just reflecting.... it's 2 months and 3 days since I first posted about Qt6, and we have a semi-working QtWebEngine, and a bunch of apps that whilst they have some warts, work pretty darn well :)
Title: Re: Qt6
Post by: Dave Yeo on January 13, 2023, 04:51:17 am
Raised a new issue today for simplebrowser crashing accessing www.os2world.com - https://github.com/psmedley/qt6-webengine-os2/issues/8

Interesting console messages that I haven't seen before:
Code: [Select]
[151:4:0113/122057.387000:ERROR:disk_data_allocator.cc(174)] DISK: Cannot write to disk. written = -1 FILE_ERROR_FAILED

Needs adjusting to take the Windows file path instead of the Posix (Linux) file path. IIRC, there was work put into Mozilla for the JS engine to access the file system.
Actually looking at the message again, it might be for web storage though SeaMonkey doesn't save anything from os2world.
Title: Re: Qt6
Post by: Rich Walsh on January 13, 2023, 07:51:27 am
@Paul,

PMFJI... attached is the util I mentioned ('mk83.exe') that will rename DLLs with long names.

Code: [Select]

mk83   - changes a DLL's file and module names to be 8.3-compliant
       - also sets/clears the HIMEM flag for executable segments

usage: mk83 [/H | /L] [/D] filename.dll [modname | lookup.txt]
  or   mk83 [/H | /L] [/D] /B lookup.txt

       [/H] set flag  [/L] clear flag  [/D] delete original DLL
       [/B] batch update all DLLs in lookup.txt

       [lookup.txt] a text file with one "filename.dll modname"
         pair per line; if the DLL name is qualified, its path is
         ignored for lookups but used for batch updates.


FYI... this is actually a REXX script attached to an executable header ('runrx.exe'). To see the script, open 'mk83.exe' in Text Editor, turn on word-wrap, then scroll down to the beginning of the script. You can recover the script by deleting everything from the beginning of the file down to the first /* then saving as 'mk83.cmd'.
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 08:57:40 am
Thanks Rich, apologies for not getting back to you, with being back at work this week, I'm pretty time poor.

Appreciate your efforts on this, TBH sorting out the residual DLL name clashes is pretty low on my todo list right now, my current focus is trying to fix the known Qt issues, but it will eventually bubble up to the top of my list :)

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 09:02:45 am
Google to allow 3rd party libs to use Rust - https://security.googleblog.com/2023/01/supporting-use-of-rust-in-chromium.html
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 09:10:44 am
Dooble 2023.01.13 - https://smedley.id.au/tmp/dooble-2023.01.13-os2-qt6-20230113.zip

Not too much new:
Code: [Select]
Welcome to the 2023.01.13 release of Dooble. Corrections and new features are detailed below.
New setting: Retain Session Tabs. See Settings -> History.
Special parsing of address text via Control keyboard modifier.
Spooky Friday!
memzero() key information.

PS Posted from Dooble/2 with Qt 6.2.4
Title: Re: Qt6
Post by: Mike Kölling on January 13, 2023, 09:48:48 am
PS Posted from Dooble/2 with Qt 6.2.4

Hi Paul,

First off all THANKS for your ongoing effort to port software to OS/2.
I downloaded yesterday your QT6 version (20230108), the latest qtwebee (20230112)  as well as Dooble (20221225) for QT6. I applied highmem -b to the DLLs in QT6 folder.
Dooble starts (with quirky menus) but couldn't load any page. It still showing the running circle indicator but no web page will be displayed.
I wonder if my system might be missing some necessary programs / DLLs because I don't have any development tools on my system.

Greetings from Potsdam,
Mike
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 09:50:40 am
https://smedley.id.au/tmp/qt6webee-20230112.zip seems to fix the "[54340:4:0108/165546.039000:ERROR:cert_verify_proc_builtin.cc(559)] No net_fetcher for performing AIA chasing." issues....

Curious to see if there are any significant +ve or -ve changes compared to the above in https://smedley.id.au/tmp/qt6webee-20230113.zip
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 09:52:35 am
Hey Mike,

PS Posted from Dooble/2 with Qt 6.2.4

Hi Paul,

First off all THANKS for your ongoing effort to port software to OS/2.
I downloaded yesterday your QT6 version (20230108), the latest qtwebee (20230112)  as well as Dooble (20221225) for QT6. I applied highmem -b to the DLLs in QT6 folder.
Dooble starts (with quirky menus) but couldn't load any page. It still showing the running circle indicator but no web page will be displayed.
I wonder if my system might be missing some necessary programs / DLLs because I don't have any development tools on my system.

Thanks for trying! If the app starts - that's a pretty good sign that you have all the requisite DLLs. I have seen some symptoms like this in my testing, have you recently rebooted? Qt6 is pretty memory hungry.

Also, what's your VIRTUALADDRESSLIMIT set to? if it's only 1536, try increasing it to 2048 or 2560.
Title: Re: Qt6
Post by: Mike Kölling on January 13, 2023, 09:59:22 am
Hey Mike,

Thanks for trying! If the app starts - that's a pretty good sign that you have all the requisite DLLs. I have seen some symptoms like this in my testing, have you recently rebooted? Qt6 is pretty memory hungry.

Also, what's your VIRTUALADDRESSLIMIT set to? if it's only 1536, try increasing it to 2048 or 2560.

Dear Paul,

Thanks for your speedy reply. I will apply your recommendations and do another test. However, due to tight schedule for today, I can do it at earliest over the weekend. I will keep you updated.
Wish you a great weekend.

Mike

Title: Re: Qt6
Post by: Martin Iturbide on January 13, 2023, 01:08:28 pm
Hi Martin,

But Dooble does not render any page for me. If I put an file URL it will download it fine. It looks on the browser like it is loading but nothing shows or happens.
Any other log I can take? or something I may be missing?
I've seen this sporadically too - but certainly not on all pages. I'd make sure you're on a reasonably fresh boot - and also can you confirm what VIRTUALADDRESSLIMIT is set to?

Hi Paul.

I had changed to VIRTUALADDRESSLIMIT=2560 and also (just in case) deleted the .dooble folder (I didn't anything vital there).

Now Dooble render and OS2World is showing up. But the browser is not stable and crashes after a while of loading OS2World.com.

I got this on the command line:
Quote
[C:\HOME\DESKTOP\DOOBLE-2022.12.25-QT6-OS2-20230108]dooble
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
[warn] select: Socket operation on non-socket
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.

Nothing on POPUPLOG.OS2. I don't know what other log or report I can generate, I'm open to suggestions.

Regards
Title: Re: Qt6
Post by: roberto on January 13, 2023, 06:32:32 pm
Hi Roberto,
It also seems that it works well executing this patch in QBASIC.
regards
<snip>
Now if I let me write [], something improves.
This is my first message in your QT6 dooble, in Os2world. !!
Regards
Can you explain more about what this patch is doing?
For now I do not do anything, I think it is incomplete, I confused when restarting the dooble.
The problem with the square brackets, seems that when an error occurs in Dooble-QT6, to appear from the XXX error? , the keyboard has failures. But when restarting the dooble.exe, errors are cleaned and the keyboard works correct. Too @ key fail in other chance.

Quote
It is modifying one of the DLL's? Do the square brackets work in Qt5 Dooble?
I do not know that DLL is modifying, the Theseus program shows me how * System *, but the Ktasmgr.exe program in Memory Map, does not show me any of the memory positions shown by the meshell.exe with the errors in Kaistop XXXXXXXXX.
Quote
Do the square brackets work in Qt5 Dooble?
Yes , work ok in Qt5.
saludos

Title: Re: Qt6
Post by: roberto on January 13, 2023, 06:38:09 pm
Hi again,
This last version improves a lot.
But when opening a YouTube, he stops the sound and also the image.
If I leave it open the dooble.exe, and I open the manhjongg.exe, after playing for a while, with the activated sound, the Dooble.exe program, takes up the operation of the video, perfect.
This returns to me the dooble.exe:
Code: [Select]
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://rr5---sn-h5qzen7y.googlevideo.com/generate_204?conn2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
js: The resource https://i.ytimg.com/generate_204 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
[94:9:0112/172145.062000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172145.064000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(2a75dda0) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034
[94:9:0112/172213.787000:ERROR:audio_output_stream_os2.cc(71)] kaiStop(64044140) returned 5034

I assume happens with the audio stream in Qt5 Dooble? This code is unchanged and is way beyond my ability to investigate. Audio sharing has always (IMHO) been an issue on OS/2....
In QT5, something similar happened to some youtuve, but in QT5 I don't look at the console, and I can't confirm it but I would say if the same thing happened.
saludos
Title: Re: Qt6
Post by: roberto on January 13, 2023, 06:57:52 pm

-Martin
Quote
Nothing on POPUPLOG.OS2. I don't know what other log or report I can generate, I'm open to suggestions.
The first window always fails, I see for a photo that you send, that you try in the second, but try it in a third or fourth window. From the third, it always works for me and I can open many.

Put the dooble.exe on the same path of the \qt6\bin\

I am not executing Highmem

-Dave
The failure you comment on the box when opening dooble.exe, does not occur from the Messhell.exe program.

sasludos
Title: Re: Qt6
Post by: Paul Smedley on January 13, 2023, 09:58:04 pm
Nothing on POPUPLOG.OS2. I don't know what other log or report I can generate, I'm open to suggestions.

Unfortunately, there's not much you can do. I'm going to try and track down:
Code: [Select]
[warn] select: Socket operation on non-socket
But the browser disappearing is a PITA....
Title: Re: Qt6
Post by: Paul Smedley on January 14, 2023, 01:35:26 am
https://smedley.id.au/tmp/dooble-2023.01.13-os2-qt6-20230114.zip is built with the dooble patches from the bww repo
Title: Re: Qt6
Post by: Mike Kölling on January 14, 2023, 12:01:27 pm
Hey Mike,

Thanks for trying! If the app starts - that's a pretty good sign that you have all the requisite DLLs. I have seen some symptoms like this in my testing, have you recently rebooted? Qt6 is pretty memory hungry.

Also, what's your VIRTUALADDRESSLIMIT set to? if it's only 1536, try increasing it to 2048 or 2560.

Dear Paul,

Thanks for your speedy reply. I will apply your recommendations and do another test. However, due to tight schedule for today, I can do it at earliest over the weekend. I will keep you updated.
Wish you a great weekend.

Mike

Dear Paul,

as recommended I checked the virtualadresslimit. It was set to 2048 already, however changing it to 2560 didn't helped.
Trying to start Dooble after a fresh reboot didn't help either.
Also using your latest Dobble from 20230113 doesn't improved behavior.
But deleting the .dooble profile in my Userhome folder did the trick. Now Dooble(QT6) ist starting much faster and is able to load web pages. I tried first "www.os2.org".
I can even start Dooble with the Firefox already open and it is working  :), which is how I actually write this answer.
Thanks again for your great work.

Greetings from Potsdam / Germany,
Mike
Title: Re: Qt6
Post by: roberto on January 14, 2023, 06:56:51 pm
https://smedley.id.au/tmp/dooble-2023.01.13-os2-qt6-20230114.zip is built with the dooble patches from the bww repo
This version has been a small disaster for me.
I start the first screen very well, closed in the second, and then returning to previous versions, they all failed, erase the entire directory \ qt6 \ and return to the versions that worked best to me:
8/01/23  5:59      3.886.850  6.001 a---  dooble.exe
13/01/23  8:41    257.356.880     43 a---  Qt6WebEe.dll
Even erasing the folder. Doble everything continued to fail me.
I think that in QT6 it is not necessary to delete the folder .dooble
Cupsd.exe It does not start.
The rest of the system seems to go well. But I have to restore it.
saludos


Title: Re: Qt6
Post by: Paul Smedley on January 14, 2023, 09:32:10 pm
I still need to commit all of the changes, but want to do some more testing first, but https://smedley.id.au/tmp/qt6webee-20230115.zip is now available.

I fixed a misapplied diff in https://github.com/psmedley/qt6-webengine-os2/commit/493e896f725a306487a32fad7417c5c6a2190011

and also implemented socketpair() instead of pipe() in a few places to try fix the 'socket operation on non-socket' errors that are periodically seen....
Title: Re: Qt6
Post by: David McKenna on January 14, 2023, 10:29:46 pm
 Thanks again Paul! This new (20230115) version of qt6webengine isn't working right here - when I open QT6 Dooble using it, it just show 'Loading....' in the lower left corner and the circle spins on the page tab, but nothing comes up no matter what web address I try to use. No errors in the console though (besides the usual Opengl warning)...

Regards,
Title: Re: Qt6
Post by: Paul Smedley on January 14, 2023, 10:43:55 pm
Hi Dave, I saw that too, but after resetting the dooble profile it seemed to work fine...
Title: Re: Qt6
Post by: David McKenna on January 14, 2023, 11:03:10 pm
 Yep, you're right, I should have done that first. QT5 Dooble was working fine, so I didn't even think of it. I guess there are slight differences in the QT5 and QT6 versions of Dooble that don't play well together... Wonder if there is a way to have different profiles for each?

Regards,

EDIT: I requested a Dooble enhancement to allow multiple profiles at the Dooble github site....
Title: Re: Qt6
Post by: Dave Yeo on January 15, 2023, 01:34:43 am
Yep, you're right, I should have done that first. QT5 Dooble was working fine, so I didn't even think of it. I guess there are slight differences in the QT5 and QT6 versions of Dooble that don't play well together... Wonder if there is a way to have different profiles for each?

Regards,

EDIT: I requested a Dooble enhancement to allow multiple profiles at the Dooble github site....

Set a different home, here with temp on the ramdisk,
set HOME=%TMP%
only in the session your testing with.
Title: Re: Qt6
Post by: Andy Willis on January 15, 2023, 03:11:01 am
Posting using the latest qt6 dooble and webengine.  I have to stop os2world from completely loading by hitting esc or it crashes.
lowes.com starts to load then crashes
homedepot.com crashes before rendering any of the page.
Nothing in the terminal window nor popuplog when they crash.
Nice progress though.
Title: Re: Qt6
Post by: Martin Iturbide on January 15, 2023, 04:07:00 am
Code: [Select]
Tried:
- Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0
- Qt6Webee - https://smedley.id.au/tmp/qt6webee-20230115.zip
- Dooble   - https://smedley.id.au/tmp/dooble-2023.01.13-os2-qt6-20230114.zip
Procedure
- VIRTUALADDRESSLIMIT=2560 on Config.sys
First:
 highmem -c qt6*dll
Then:
 set PATH=C:\qt6\bin;%PATH%
 set BEGINLIBPATH=c:\qt6\lib
 dooble

Dooble loads with the reported issues:
- Menus are not located correctly.
- log on dooble loading:
Quote
[C:\HOME\DESKTOP\DOOBLE-2023.01.13-OS2-QT6-20230114]dooble
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.

In my case now pages remains on "loading" and stay there forever. Pages does not render.

Regards
Title: Re: Qt6
Post by: Paul Smedley on January 15, 2023, 04:17:46 am
Hey Andy,

Posting using the latest qt6 dooble and webengine.  I have to stop os2world from completely loading by hitting esc or it crashes.
lowes.com starts to load then crashes
homedepot.com crashes before rendering any of the page.
Nothing in the terminal window nor popuplog when they crash.
Nice progress though.

The pages closing with no popuplog/exceptq/console output is REALLY annoying - makes it kinda hard to debug....
Title: Re: Qt6
Post by: Paul Smedley on January 15, 2023, 04:18:42 am
In my case now pages remains on "loading" and stay there forever. Pages does not render.

Clear your dooble profile....
Title: Re: Qt6
Post by: Dave Yeo on January 15, 2023, 04:34:17 am
In my case now pages remains on "loading" and stay there forever. Pages does not render.

Clear your dooble profile....

I have to click the URL bar and press enter as well otherwise the first page doesn't load. IIRC, opening another tab and entering a URL there also works.
Title: Re: Qt6
Post by: Dave Yeo on January 15, 2023, 04:41:51 am
Been looking at https://doc.qt.io/qt-6/qtwebengine-debugging.html (https://doc.qt.io/qt-6/qtwebengine-debugging.html).
First, might be a good idea to launch dooble with --disable-gpu.
Second, trying to copy something from a web page fails with lots of interesting errors in the console, much in UTF8 unluckily.
Third, trying
Code: [Select]
set QTWEBENGINE_REMOTE_DEBUGGING=5000
Before launching Dooble gives some response in SeaMonkey at http://127.0.0.1:5000 but not enough. I saw a console message suggesting using a Chromium based browser, so I also tried with the Qt5 Dooble (use different HOME to use a different profile) and got all sorts of weird errors in the console, much once again in UTF8 I think.
More stuff to consider, the remote debugging could point to a different IP:PORT so someone could try using Chrome on a different OS. See the top link.
Title: Re: Qt6
Post by: Paul Smedley on January 15, 2023, 07:48:51 am
So a small request.... the crashes seem to be javascript related.... for this with URL's that they know crash Dooble..

1) right mouse button on the open tab - deselect JavaScript
2) try the URL again

For me, with javascript disabled, I can load os2world fine :)

I know this isn't a long term solution, but it gives me some ideas on code to check.
Title: Re: Qt6
Post by: Paul Smedley on January 15, 2023, 09:27:14 am
Started looking at the patches for V8... here'sone hack that probably isn't right...
https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc#L83
Title: Re: Qt6
Post by: David McKenna on January 15, 2023, 03:06:16 pm
 Hey Paul,

  I don't have trouble anymore with OS2World in the QT6 Dooble (possibly because I use an anti-ad HOSTS file), but https://html5test.com always causes QT6 Dooble to instantly disappear (works with QT5). Turning off Javascript, HTML5Test.com displays a message that I need to turn on Javascript, and does not disappear. So it does seem the Javascript may be where the disappearing act comes from...

Regards,
Title: Re: Qt6
Post by: Martin Iturbide on January 15, 2023, 05:11:09 pm
Hi. I'm trying it again with the recently provided tips.

Quote
Tried:
- Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0
- Qt6Webee - https://smedley.id.au/tmp/qt6webee-20230115.zip
- Dooble   - https://smedley.id.au/tmp/dooble-2023.01.13-os2-qt6-20230114.zip
Procedure
- VIRTUALADDRESSLIMIT=2560 on Config.sys
- Deleted .doodle on Home
First:
 highmem -c qt6*dll
Then:
 set PATH=C:\qt6\bin;%PATH%
 set BEGINLIBPATH=c:\qt6\lib
 dooble --disable-gpu

Dooble loads and console shows:
Quote
[C:\HOME\DESKTOP\DOOBLE-2023.01.13-OS2-QT6-20230114]dooble --disable-gpu
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.

1) Load www.os2world.com and it stays on loading.

Closed and restarted Dooble
2) Disabled JavaScrip on the tab, Load www.os2world.com and it stays on loading.
3) Load www.google.com  and it stays on loading.
4) Downloaded a file with a direct file on hobbes, it worked.

dooble --disable-gpu and disabling Javascript didn't improved my results.
The pages did not load anymore, but it haven't crashed. I was not able to load any webpage (not even something simple as http://rpm.netlabs.org/test/QT6/)

Regards
Title: Re: Qt6
Post by: Martin Iturbide on January 15, 2023, 05:17:39 pm
simsu-1.4.2-qt6.7z
peg-e-1.3.2-qt6.7z
novprog-3.2.2-qt6.7z
kapow-1.6.1-qt6.7z
hexalate-1.2.2-qt6.7z
gottet-1.2.2-qt6.7z
cutemaze-1.3.2-qt6.7z
tanglet-1.6.3-qt6.7z
connectagram-1.3.3-qt6.7z
focuswriter-1.8.4-qt6.7z
You can download from : http://rpm.netlabs.org/test/QT6/

Hi Tellie.
I tried some of you software, simsu to cutemaze and it works with the known issue of the shift menus.
Thanks

Regards
Title: Re: Qt6
Post by: Gregg Young on January 15, 2023, 09:18:21 pm
simsu-1.4.2-qt6.7z
peg-e-1.3.2-qt6.7z
novprog-3.2.2-qt6.7z
kapow-1.6.1-qt6.7z
hexalate-1.2.2-qt6.7z
gottet-1.2.2-qt6.7z
cutemaze-1.3.2-qt6.7z
tanglet-1.6.3-qt6.7z
connectagram-1.3.3-qt6.7z
focuswriter-1.8.4-qt6.7z
You can download from : http://rpm.netlabs.org/test/QT6/

Hi Tellie

I tried them all and they all seem to work. I did find that running them full screen greatly improves the menu problems.

Hi Paul
I also tried the latest dooble drop and it rendered every page I tried. The splash screen is crop at the top and on the right.   

Thanks
Gregg
Title: Re: Qt6
Post by: Paul Smedley on January 15, 2023, 10:05:39 pm
Hey Gregg,

I also tried the latest dooble drop and it rendered every page I tried. The splash screen is crop at the top and on the right.   

yeah I think the splash screen issue is related to the menus also being out of position. I seem to remember the way PM does coordinates is opposite to most other OS - so I wonder if there is something missing here for OS2.

Current focus is trying to find what's causing the crashes with Javascript.

PS - I committed your changes to add platform services to qtbase lsat night - https://github.com/psmedley/qt6-base-os2/commit/e33cfa74f044b0b0816ef998dc075857033891be
Title: Re: Qt6
Post by: Paul Smedley on January 16, 2023, 12:24:14 am
In regard to the silent exits.... I've been reminded that setting 'set EXCEPTQ=Z' may help generate an exceptq report for the silent exits.

I won't be able to try this until this evening, but if someone can set this, start dooble, go to a site like https://html5test.com that is known to crash and upload a report here (if generated) it would be useful (and save me some time tonight) :)
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 01:14:28 am
Nothing, do see an interesting NSS error after setting HOME to an empty directory,
Code: [Select]
[H:\qt6\bin]set HOME=h:\home

[H:\qt6\bin]set EXCEPTQ=Z

[H:\qt6\bin]dooble
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.

This vanished while loading os2world.

Edit: can't find anything in the NSS or Mozilla source about -8174 or 1FEE errors besides some unicode/uconv stuff dealing with Greek.
Edit: SEC_ERROR_BAD_DATABASE -8174    Security library: bad database.
Title: Re: Qt6
Post by: Paul Smedley on January 16, 2023, 01:20:43 am
Nothing, do see an interesting NSS error after setting HOME to an empty directory,
Code: [Select]
[H:\qt6\bin]set HOME=h:\home

[H:\qt6\bin]set EXCEPTQ=Z

[H:\qt6\bin]dooble
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
js: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.

This vanished while loading os2world.

Can you try with 'set EXCEPTQ=ZZ' as well?
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 01:38:56 am
Still nothing, at least the NSS error is now gone.
It is surprising as testing when Firefox was vanishing, it would generate an exceptq report with Z, which looked like a normal exit.
I guess the exception handler is getting broken somewhere
Title: Re: Qt6
Post by: Paul Smedley on January 16, 2023, 01:56:40 am
Bugger... I'll need to think about how to attack this - most likely will run a diff between the V8 code in 5.15.x and 6.2.x to see what's changed - on the assumption that the issue is within the V8 code...
Title: Re: Qt6
Post by: Rich Walsh on January 16, 2023, 02:42:51 am
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 02:57:14 am
OK, I set this in my environment,
Code: [Select]
set QTWEBENGINE_CHROMIUM_FLAGS="ignore-certificate-errors -ignore-ssl-errors -log-level=1"

Loaded os2world, which succeeded for the first time with JavaScript enabled and got this in the log,
Code: [Select]
QFont::fromString: Invalid description '(empty)'
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to override the default.
[123:1:0115/174014.231000:ERROR:validation_errors.cc(115)] Invalid message: VALIDATION_ERROR_DESERIALIZATION_FAILED
[123:14:0115/174014.233000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -3
js: Uncaught (in promise) undefined
[123:14:0115/174056.016000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -3
js: Uncaught (in promise) undefined
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to override the default.

So one of the scripts that OS2World calls causes SSL errors. Other pages as well spit out similar errors

Have to test Rich's idea for getting rid of the NSS error, hmm, actually the files eventually get created.
Title: Re: Qt6 - Works for me!
Post by: Rich Walsh on January 16, 2023, 03:34:18 am
Thanks to Martin's concise listing of required files 'n stuff, I was able to get Dooble/QT6 up and running quickly. The installation is isolated from the rest of the system in its own QT6 tree and has its own 'home' directory.

Like others, I had a rough time until I realized the problems weren't with QT6 (vs QT5), they were the same old Dooble problems I'd already learned to work-around. Once my fixes were in place, the whole thing was remarkably stable - even on a javascript-infested site like politico.com. WFM!

1) import the attached block list into Dooble - the difference in performance and CPU load can be astounding on a site like politico. It appears that all of the banners and ads and whatever load their own JS that keeps running in the background. On many sites, you may not have to disable JS if you can prevent the scripts from getting loaded in the first place.

2) do not save cookies. This may be painful if you log into a lot of sites, but again, performance and stability are noticably improved. Plus, this fixes the "first tab doesn't work" problem.

3) if your CPU meter is far more active than it should be, right-click on the current tab and uncheck "Javascript". IMHO, this is Dooble's single-best feature :)
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 03:45:00 am
Politico works fine here without your blocklist, likely as I have a 6MB host file that routes all those addresses to 0.0.0.0
Code: [Select]
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
Title: Re: Qt6
Post by: Paul Smedley on January 16, 2023, 03:47:23 am
Thanks Rich and Dave - there's some good clues in there. I appreciate you taking the time to hunt down things like the settings for QTWEBENGINE_CHROMIUM_FLAGS as I'm pretty time poor, so this is really helpful!!

Rich the words 'remarkably stable' put a real smile on my face - I'm pleasantly surprised at the progress - given the size of the beast when I first started looking at this in November :)

I probably need to investigate some better way of packaging this all - without including headers, libs, etc which most people will never need...
Title: Re: Qt6
Post by: Rich Walsh on January 16, 2023, 04:04:57 am
Politico works fine here without your blocklist, likely as I have a 6MB host file that routes all those addresses to 0.0.0.0
Code: [Select]
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

I was never willing to weigh my system down with a 6mb text lookup file. This 59kb listing seems to serve my single-browser needs: I don't recall ever seeing an ad after installing it.

BTW... the blocklist I attached above comes from a site recommended in the Dooble docs. I generated it a few minutes before the posting:

https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 04:26:44 am
Yes, the hosts file has grown, tripled in size last time I updated it a week or so back. For Dooble the blocklist is better, though really it shouldn't crash from ads though they do have a tendency of being JavaScript heavy to say the least.
Had a hard time importing the block list. Tried to import it from %TMP% where SM put it and Dooble wouldn't navigate that drive (the ram disk) possibly as it is currently running from that drive along with HOME being there. The file picker showed three H:'s. Copied it to another drive and it loaded fine.
Title: Re: Qt6
Post by: Paul Smedley on January 16, 2023, 05:05:46 am
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).

Does the creation of these files work correctly in Qt5? This is potentially a bug in the Qt6 port of Webengine...
Title: Re: Qt6
Post by: Dave Yeo on January 16, 2023, 05:28:17 am
Code: [Select]
[115:6:0115/161115.645000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:h:\home\.pki\nssdb): NSS error code: -8174

This one is easy to fix. If you create a new home directory, dooble will create a '.pki\nssdb' directory with an empty 'cert9.db', no 'key4.db', and a *valid* 'pkcs11.txt'. Go to your primary home directory, find the cert9 and key4 files, then copy them over (do _not_ replace pkcs11).

Does the creation of these files work correctly in Qt5? This is potentially a bug in the Qt6 port of Webengine...

They did eventually get built here with Qt6. Qt5 seems to act the same, need to load a few pages, close and reopen Dooble and .pki slowly populates
Title: Re: Qt6
Post by: Paul Smedley on January 17, 2023, 09:42:50 am
Some clues about positioning in https://github.com/psmedley/qt6-base-os2/issues/6 and the attached tst_qwindow report...
Title: Re: Qt6
Post by: roberto on January 17, 2023, 03:47:34 pm
-Paul
After restoring my system, I have verified that days it worked quite well with Dooble qt6, now it does not work as before. And remiriting some captures of the console find this:
Code: [Select]
[111:40:0112/183305.693000:ERROR:audio_thread_hang_monitor.cc(150)] Audio thread hang has been detected. You may need to restart your browser. Please file a bug at https://crbug.com/new
It makes me think that bug, they have it in Chrome. And they have put themselves defensive. Now I don't get anything about JS: when before if I got many messages.
saludos
Title: Re: Qt6
Post by: roberto on January 17, 2023, 03:55:44 pm
-Tellie
Making your examples in QT6, I have observed that Hexalate is very interesting, the screen corrupts me. This occurs when I move an object from one position to another. And it is the framework of the object that produces corruption. But if the same click object to turn, it does not spoil the screen.
saludos
Title: Re: Qt6
Post by: Paul Smedley on January 21, 2023, 06:43:18 am
Quick update.... whilst soaking on how to move forward with debugging QtWebEngine 6.2.4, and fixing the position issues with Qt Base 6.2.4; I started playing around with QtWebEngine 6.3.2; and nodejs 12.x (needed for QtWebEngine 6.3.2).

I'm close (I think) to having nodejs 12 built, and meanwhile have patched QtWebEngine 6.3.2.

Currently stuck with a python error with QtWebEngine - I'm thinking this might be a problem with our python3 port...
Code: [Select]
Traceback (most recent call last):
  File "U:/DEV/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/parser/make_atrule_names.py", line 64, in <module>
    json5_generator.Maker(AtRuleNamesWriter).main()
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/json5_generator.py", line 339, in main
    writer.write_files(args.output_dir)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/json5_generator.py", line 304, in write_files
    self._write_file_if_changed(output_dir, generator(), file_name)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py", line 72, in generator_internal
    return generate_gperf(gperf_path, gperf_input, gperf_args)
  File "U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py", line 31, in generate_gperf
    gperf_output = gperf.communicate(gperf_input)[0]
  File "C:/USR/lib/python3.9/subprocess.py", line 1152, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "C:/USR/lib/python3.9/subprocess.py", line 2109, in _communicate
    stdout = b''.join(stdout)
TypeError: sequence item 0: expected a bytes-like object, str found
Title: Re: Qt6
Post by: Paul Smedley on January 21, 2023, 09:18:17 am
I hacked around the above error - but had to undo the hack a bit later in the build - seems running some commands is OK with that subprocess.py, others aren't - weird..

Anyhow, got a bit further, but now get:
Code: [Select]
[1163/16527] ACTION //third_party/devtools-frontend/src/inspector_overlay:build_inspector_overlay(//build/toolchain/os2:x86)
FAILED: resources/inspector_overlay/main.js
C:/USR/BIN/python3 ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py main.js 67000 --input_path gen/third_party/devtools-frontend/src/inspector_overlay --output_path resources/inspector_overlay --rollup_plugin ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/inspector_overlay/loadCSS.rollup.js
Usage: ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py filename_1 max_size_1 filename_2 max_size_2 ... filename_N max_size_N --input_path <input_path> --output_path <output_path>
Traceback (most recent call last):
  File "U:/dev/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 92, in <module>
    sys.exit(main(sys.argv))
  File "U:/dev/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 77, in main
    rollup(input_path, output_path, filename, max_size,
  File "U:/dev/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 52, in rollup
    raise Exception("rollup failed: " + error)
Exception: rollup failed:
gen/third_party/devtools-frontend/src/inspector_overlay/main.js \u2192 stdout...

I'm *hoping* this is because my node.exe is still v10; and the minimum required version is v12 ;)
Title: Re: Qt6
Post by: Paul Smedley on January 21, 2023, 10:00:48 am
Not tested...  but https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip for *qt6*
Title: Re: Qt6
Post by: Mike Kölling on January 21, 2023, 02:05:58 pm
Not tested...  but https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip for *qt6*

Hi Paul,

Dooble-QT6 starts here. I can key in "www.os2world.com", the page is coming up, I can see that some "google" things are loaded in the lower left corner and then Dooble-QT6 disappears. No popup.log or other indication what has gone wrong.

Greetings from Potsdam,
Mike
Title: Re: Qt6
Post by: Martin Iturbide on January 21, 2023, 02:22:10 pm
Hi

I still can not render any page on Dooble Qt6 on my ArcaOS VM. Dooble for Qt5 works as expected.

Quote
Tried:
- Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0
- Qt6Webee - https://smedley.id.au/tmp/qt6webee-20230115.zip
- Dooble   -  https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip
Procedure
- VIRTUALADDRESSLIMIT=2560 on Config.sys
- Deleted .doodle on Home
First:
 highmem -c qt6*dll
Then:
 set HOME=C:\home2
 set EXCEPTQ=ZZ
 set PATH=C:\qt6\bin;%PATH%
 set BEGINLIBPATH=c:\qt6\lib
 dooble --disable-gpu

Dooble loads (with the usual logo shfit and meny shift) and console shows:
Quote
[C:\HOME\DESKTOP\DOOBLE-2023.01.18-OS2-QT6-20230121]dooble --disable-gpu
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
[103:6:0121/081436.106000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:C:\home2\.pki\nssdb): NSS error code: -8174

Regards
Title: Re: Qt6
Post by: Paul Smedley on January 21, 2023, 09:36:45 pm
Hi MIke,
Not tested...  but https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip for *qt6*

Hi Paul,

Dooble-QT6 starts here. I can key in "www.os2world.com", the page is coming up, I can see that some "google" things are loaded in the lower left corner and then Dooble-QT6 disappears. No popup.log or other indication what has gone wrong.

Try:
Code: [Select]
set QTWEBENGINE_CHROMIUM_FLAGS="ignore-certificate-errors -ignore-ssl-errors -log-level=1"
Before starting Dooble....
Title: Re: Qt6
Post by: roberto on January 21, 2023, 10:12:39 pm
-Paul
I find it hard to follow your pace of news, encourage.
This last version of Dooble, in this version the pages are loaded from the first window.
21/01/23  9:54      7.178.338      0 a---  dooble.exe
13/01/23  8:41    257.356.880     43 a---  Qt6WebEe.dll
, seems a bit more stable than the
8/01/23  5:59      3.886.850  6.001 a---  dooble.exe
13/01/23  8:41    257.356.880     43 a---  Qt6WebEe.dll
version. But they work very similar to me, almost the same. Maybe this (21/01/23) last slower, in the opening of the first 4 windows. Then equally speed.
I can open many websites known in OS2, without problems. More that 10.
The Os2world website always closes the browser, and others similar. When this occurs the page shows me the error this 2 times in one web site:
Code: [Select]
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
If this error only occurs once, do not close the dooble.exe

I am running with
set EXCEPTQ=ZZ     
dooble.exe  (without any more)
without:
REM set QTWEBENGINE_CHROMIUM_FLAGS="ignore-certificate-errors -ignore-ssl-errors -log-level=1"

Saludos
Title: Re: Qt6
Post by: roberto on January 21, 2023, 10:32:19 pm
-Martin
I am maintaining my profile /home/.doble, without problems.
But if I have observed that when closing the dooble, the dll qt6webee.dll is still open and requires unlock qt6webee.dll. Especially when copying attention to when you copied a new version on top of the previous one. Restarting the entire system also helps.

In your particular case I think you are under Memori.
Try to do this and tell me how it run:
Virtualaddrreslimit = 1536
Restart the system
Create a Disk RAM with 512MB HPFS, and PUT the swapper in that newly created unit, IN ROOT X:\ SWAPPERXXX.
Restart Again
Now virtualaddresslimit = 3072
Restart and test dooble.
I understand that you have 4GB installed.

And ONLY if you want to experiment
Memlimit.exe to 4095

It is possible that the wpshell made strange things, if you do it, you close it instantaneous and restart, here all good.
saludos
Title: Re: Qt6
Post by: Martin Iturbide on January 21, 2023, 11:02:45 pm
Hi.

Sorry for the "almost" off topic. KO Myung-Hun posted on the Qt5 port Github (https://github.com/bitwiseworks/qt5-os2/issues) that he needs Qt5Quick, Qt5QuickWidgets and Qt5QuickControls2 for the VLC ports. I don't know what are those for, but maybe it will be good to evaluate if they can fit on the Qt6 port on the future, because of the importance of VLC.

Regards
Title: Re: Qt6
Post by: Dave Yeo on January 22, 2023, 12:56:41 am
Hi Paul, latest seems to work much the same as previous. Needed to import the blocklist (new profile) to load os2world.
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 01:27:52 am
Hey Martin,
I still can not render any page on Dooble Qt6 on my ArcaOS VM. Dooble for Qt5 works as expected.

FWIW I see this on one of my VM's - when I get a moment,I'll try work out wtf is going on.

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 01:29:44 am
Hi Martin,

Sorry for the "almost" off topic. KO Myung-Hun posted on the Qt5 port Github (https://github.com/bitwiseworks/qt5-os2/issues) that he needs Qt5Quick, Qt5QuickWidgets and Qt5QuickControls2 for the VLC ports. I don't know what are those for, but maybe it will be good to evaluate if they can fit on the Qt6 port on the future, because of the importance of VLC.

From \qt6\lib:
Qt6QuickControls2_dll.a
Qt6QuickWidgets_dll.a
Qt6Quick_dll.a

These are already present in the Qt6 port.

Cheers,

Paul
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 01:57:18 am
Hi Paul, latest seems to work much the same as previous. Needed to import the blocklist (new profile) to load os2world.

I'd expect that - I only rebuilt as there were a couple of changes requested in the dooble githib by OS/2 users :)
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 03:03:01 am
Hey all,

I'm *hoping* this is because my node.exe is still v10; and the minimum required version is v12 ;)

The good news:
Code: [Select]
{0}[c:\usr\local\bin] node --version
v12.22.12

The bad news:
The rollup error is still the same
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 05:57:39 am
Window geometry is definitely screwed up in Qt6....

Given the example rasterwindow - https://github.com/psmedley/qt6-base-os2/tree/main/examples/gui/rasterwindow

At https://github.com/psmedley/qt6-base-os2/blob/main/examples/gui/rasterwindow/rasterwindow.cpp#L58 it opens a window at coordinate 100,100 - which should be of size 300x200

I added a call:
Code: [Select]
    qInfo() << "Width: " << width() << "Height: " << height(); at https://github.com/psmedley/qt6-base-os2/blob/main/examples/gui/rasterwindow/rasterwindow.cpp#L113 to tell me the current height and width of the window.

On first run, it tells me:
Code: [Select]
Width:  240 Height:  160
Pretty sure the problem is somewhere in https://github.com/psmedley/qt6-base-os2/blob/main/src/plugins/platforms/os2/qos2window.cpp but it's not immediately clear what needs to change between Qt5 and Qt6....

Edit: interesting - qos2window knows the correct resolution, qt doesn't... Example after enabling loggin:
Code: [Select]
qt.qpa.events: QOS2Window(0x20046880,80000181,80000195,QRect(100,100 696x488),RasterWindow(0x12ff20)) QRect(0,0 696x488) isExposed() true window()->isVisible() true
qt.qpa.backingstore: QRegion(0,0 696x488) hasAlpha false
Width:  557 Height:  390

so Qt consistently thinks the window is  20% smaller than it actually is....
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 08:41:52 am
Commit to follow, but a new qos2.dll seems to address the menu issues - https://smedley.id.au/tmp/qt6-6.2.4-qos2-20230122.zip - drop this DLL into \qt6\lib\plugins\platforms

Short story - QScreen on OS/2 reported it was 120dpi; Qt defaults to 96 dpi - so Qt was applying a 'scaling' factor of 120/96 = 1.25 to some things....
Title: Re: Qt6
Post by: Mike Kölling on January 22, 2023, 02:01:18 pm
Hi MIke,
Try:
Code: [Select]
set QTWEBENGINE_CHROMIUM_FLAGS="ignore-certificate-errors -ignore-ssl-errors -log-level=1"Before starting Dooble....

Hi Paul,

Sorry, this set command doesn't help against the crash in loading www.os2worl.com.
However you new qos2.dll solves the menu issue. Now it looks nice with the drop down menus - that's great work.

Greetings, Mike
Title: Re: Qt6
Post by: Mike Kölling on January 22, 2023, 02:05:26 pm
Hi Paul, latest seems to work much the same as previous. Needed to import the blocklist (new profile) to load os2world.

Hi Paul,

This hint from Dave solved the issue with www.os2world.com in Dooble-QT6.
I'm now writing this in your QT6 Dooble version.

Greetings, Mike
Title: Re: Qt6
Post by: Lars on January 22, 2023, 02:09:47 pm
Does this Qt6 version of Dooble (rather: the Qt6 libraries) fix the problem that typing a lot of text into an entry field (like this comment field) slows down the typing more and more until finally you cannot type at all ? That`s what happens with my Dooble based on Qt5.
Title: Re: Qt6
Post by: Martin Iturbide on January 22, 2023, 03:00:57 pm
Hi

I still can not render any page on Dooble Qt6 on my ArcaOS VM. Dooble for Qt5 works as expected.

Quote
Tried:
- Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0
- Qt6Webee - https://smedley.id.au/tmp/qt6webee-20230115.zip
- Dooble   -  https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip
Procedure
- VIRTUALADDRESSLIMIT=2560 on Config.sys
- Deleted .doodle on Home
First:
 highmem -c qt6*dll
Then:
 set HOME=C:\home2
 set EXCEPTQ=ZZ
 set PATH=C:\qt6\bin;%PATH%
 set BEGINLIBPATH=c:\qt6\lib
 dooble --disable-gpu

Dooble loads (with the usual logo shfit and meny shift) and console shows:
Quote
[C:\HOME\DESKTOP\DOOBLE-2023.01.18-OS2-QT6-20230121]dooble --disable-gpu
qt.webenginecontext: WebEngine compiled with no opengl enabled.
QQuickWidget is only supported on OpenGL. Use QQuickWindow::setGraphicsApi() to
override the default.
[103:6:0121/081436.106000:ERROR:nss_util.cc(177)] Error initializing NSS with a
persistent database (sql:C:\home2\.pki\nssdb): NSS error code: -8174

Regards

Hi.

I was able to load OS2World.com on Dooble now. The thing that I was missing was the right click over the tab and "Disable Javascript". I'm replying from Dooble Qt6 now.

How do you add the blocklist on Dooble?

Regards
Title: Re: Qt6
Post by: Mike Kölling on January 22, 2023, 04:12:49 pm
Hi.

I was able to load OS2World.com on Dooble now. The thing that I was missing was the right click over the tab and "Disable Javascript". I'm replying from Dooble Qt6 now.

How do you add the blocklist on Dooble?

Regards

Hi Martin,

I don't need to disable Jacascript to get OS2World loaded. I guess it comes with the blocklist imported.
You need to download the list Dave Yeo has provided earlier in this topic.
Then you go to Tools => Accepted / Blocked Domains. There you select Block Mode and use the button "Import..." to import the text file "blocklist.txt". That's all.

Greetings, Mike

Edit: Just fixed a typo and another one.
Title: Re: Qt6
Post by: Mike Kölling on January 22, 2023, 04:17:31 pm
Does this Qt6 version of Dooble (rather: the Qt6 libraries) fix the problem that typing a lot of text into an entry field (like this comment field) slows down the typing more and more until finally you cannot type at all ? That`s what happens with my Dooble based on Qt5.

Hi Lars,

I haven't experienced such a behaviour. However I used Dooble-QT5 mostly for visiting the bank pages for Online-Banking (to download documents). So not much text typing.
I just answered Martin and I type this also with Dooble-QT6 and don't see any slow down. But maybe it is to less text to write. Do you have a number of characters / words one should test to see a slow down?

Greetings, Mike
Title: Re: Qt6
Post by: David McKenna on January 22, 2023, 04:42:16 pm
 Hey Paul,

  Thanks for the new QT6 Dooble and new qos2.dll!. Window scaling and menu dropdowns now look great. It seems the fonts on the menu bar, tab, address bar and in settings are smaller than in the QT5 version though (I'm using the new DOOBLE_HOME environment variable to keep separate profiles), even though both are using Warpsans 9. Could there be a similar issue with font scaling as with window scaling?

Regards,

 EDIT: attached a screen shot, QT6 on left, QT5 on right, both using Warpsans 9.
Title: Re: Qt6
Post by: Lars on January 22, 2023, 05:15:33 pm
Does this Qt6 version of Dooble (rather: the Qt6 libraries) fix the problem that typing a lot of text into an entry field (like this comment field) slows down the typing more and more until finally you cannot type at all ? That`s what happens with my Dooble based on Qt5.

Hi Lars,

I haven't experienced such a behaviour. However I used Dooble-QT5 mostly for visiting the bank pages for Online-Banking (to download documents). So not much text typing.
I just answered Martin and I type this also with Dooble-QT6 and don't see any slow down. But maybe it is to less text to write. Do you have a number of characters / words one should test to see a slow down?

Greetings, Mike

Say after 50 or so characters. When it happens I can barely continue typing and the "back" key will also cease to work.
Initially, I suspected a problem with the USB mouse driver (I am using my driver set) but I have no problem typing in Firefox 45 (which is what I am doing right now).
I have a fully updated set of Qt5 files. I am really out of ideas of where it is going wrong.
Title: Re: Qt6
Post by: Mike Kölling on January 22, 2023, 05:24:24 pm
Say after 50 or so characters. When it happens I can barely continue typing and the "back" key will also cease to work.
Initially, I suspected a problem with the USB mouse driver (I am using my driver set) but I have no problem typing in Firefox 45 (which is what I am doing right now).
I have a fully updated set of Qt5 files. I am really out of ideas of where it is going wrong.

Hi Lars,

First off all, the <BACKSPACE> is the only way to delete a character within Dooble (QT5 and QT6). So this keystroke is important because of the non-functioning <DELETE>-key and it is working normally for me. By now these are more then 100 characters and I don't experience any slowdown. So it might be something on your OS/2 setup causing the problems you see. This ist still Dooble-QT6 version 2023.0.18 - the latest release - I am using for this post.
FYI: bare metal - Thinkpad T430

Greetings, Mike
Title: Re: Qt6
Post by: roberto on January 22, 2023, 05:59:17 pm
, even though both are using Warpsans 9. Could there be a similar issue with font scaling as with window scaling?

...Warpsans 9.
You can change the dooble sources, in Settings, it works perfect.
Once you have a created profile you can keep it without problems. Only when the dooble is unexpectedly closed, you can execute this Rexx script to run the dooble again with the same profile. Adjusting it to your path.
Code: [Select]
/*/qtunlock.cmd*/

unlock "C:\var\tmp\qt6\qml\Qt\labs\animation\*.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\folderlistmodel\*.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\platform\*.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\qmlmodels\*.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\settings\qmlsettn.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\sharedimage\*.dll"
unlock "C:\var\tmp\qt6\qml\Qt\labs\wavefrontmesh\qmlwaven.dll"
unlock "C:\var\tmp\qt6\qml\QtCharts\*.dll"
unlock "C:\var\tmp\qt6\qml\QtCore\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQml\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQml\Models\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQml\WorkerScript\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQml\XmlListModel\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Basic\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Basic\impl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Fusion\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Fusion\impl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Imagine\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Imagine\impl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\impl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Material\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Material\impl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Controls\Universal\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Dialogs\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Dialogs\quickimpl\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Layouts\qquickln.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\LocalStorage\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\NativeStyle\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Particles\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Shapes\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Templates\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\tooling\*.dll"
unlock "C:\var\tmp\qt6\qml\QtQuick\Window\*.dll"
unlock "C:\var\tmp\qt6\qml\QtTest\*.dll"
unlock "C:\var\tmp\qt6\qml\QtWebChannel\*.dll"
unlock "C:\var\tmp\qt6\qml\QtWebEngine\*.dll"
unlock "C:\var\tmp\qt6\qml\QtWebEngine\ControlsDelegates\*.dll"
unlock "C:\var\tmp\qt6\lib\*.dll"
unlock "C:\var\tmp\qt6\plugins\designer\*.dll"
unlock "C:\var\tmp\qt6\plugins\generic\*.dll"
unlock "C:\var\tmp\qt6\plugins\iconengines\*.dll"
unlock "C:\var\tmp\qt6\plugins\imageformats\*.dll"
unlock "C:\var\tmp\qt6\plugins\printsupport\*.dll"
unlock "C:\var\tmp\qt6\plugins\qmltooling\*.dll"
unlock "C:\var\tmp\qt6\plugins\sqldrivers\*.dll"
unlock "C:\var\tmp\qt6\plugins\tls\*.dll"
unlock "C:\var\tmp\qt6\plugins\platforms\*.dll"
unlock "C:\var\tmp\qt6\plugins\printsupport\*.dll"
unlock "C:\var\tmp\qt6\plugins\qmltooling\*.dll"
unlock "C:\var\tmp\qt6\plugins\sqldrivers\*.dll"
unlock "C:\var\tmp\qt6\plugins\tls\*.dll"

If you can do many more reliable tests with your home/.DOOble profile

saludos
Title: Re: Qt6
Post by: Dave Yeo on January 22, 2023, 07:08:22 pm
Hi Paul, the menus are much better but seem to be the wrong DPI here, small and hard to read, see screenshot compared to SeaMonkey.
Still can't navigate to H:\tmp, H: is where qt6 and the HOME I'm using are. Other drives seem ok.
Another minor nit I noticed is that Dooble (Qt6 probably) uses the wrong mouse button for drag'n'drop, at least when it comes to rearranging the tabs.
Lars, no keyboard slowdown here, though I'm using a PS2 keyboard.
Title: Re: Qt6
Post by: Alex Taylor on January 22, 2023, 08:55:34 pm
From the screenshots, it definitely looks like Qt6 is trying to draw the fonts at 96dpi, when they should be 120dpi.
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 10:49:48 pm
Hey guys,

From the screenshots, it definitely looks like Qt6 is trying to draw the fonts at 96dpi, when they should be 120dpi.

Interesting - so it looks like the dpi setting is also used to scale fonts, as well as screen resolution. I'll dig into this some more - I still think this is a step forward - I'd rather small fonts/menus in the correct location, than larger fonts that are offset in position :)

Cheers,

Paul.

Edit: https://forum.qt.io/topic/125521/how-to-understand-logical-dpi-and-physical-dpi-in-qscreen/4 probably explains what's happening....
Title: Re: Qt6
Post by: Paul Smedley on January 22, 2023, 10:51:44 pm
Hey Dave,

Still can't navigate to H:\tmp, H: is where qt6 and the HOME I'm using are. Other drives seem ok.
Another minor nit I noticed is that Dooble (Qt6 probably) uses the wrong mouse button for drag'n'drop, at least when it comes to rearranging the tabs.

Can you raise issues on these against qt6-base-os2 on github?
Title: Re: Qt6
Post by: Doug Clark on January 24, 2023, 12:29:58 am
Anyone know where to get AVUTIL56?

Downloaded the packages Martin listed
- Qt6 libs - https://www.dropbox.com/s/j8ybbujncktdf22/qt6-6.2.4-os2-20230108.zip?dl=0
- Qt6Webee - https://smedley.id.au/tmp/qt6webee-20230115.zip
- Dooble   -  https://smedley.id.au/tmp/dooble-2023.01.18-os2-qt6-20230121.zip

Tried to run Dooble and got an error message - missing KAI1 - which I found in libkai with ANPM

Now I get an error missing AVUTIL56.

Is there something I can YUM to get the required DLLs?
Title: Re: Qt6
Post by: Dave Yeo on January 24, 2023, 01:21:55 am
Code: [Select]
[W:\]yum provides avutil56.dll
ffmpeg-libs-4.2.2-4.oc00.i686 : Libraries for ffmpeg
Repo        : netlabs-rel
Matched from:
Other       : avutil56.dll



ffmpeg-libs-4.2.2-4.oc00.pentium4 : Libraries for ffmpeg
Repo        : netlabs-rel
Matched from:
Other       : avutil56.dll



ffmpeg-libs-4.2.2-4.oc00.i686 : Libraries for ffmpeg
Repo        : installed
Matched from:
Other       : avutil56.dll
Title: Re: Qt6
Post by: Doug Clark on January 24, 2023, 05:05:42 pm
Thanks Dave.

The ffmpeg library, plus libkai, pcre2-utf16 and nss libraries got dooble to at least start.

It won't load any web pages and the menus do strange things (submenus appear in random locations), but I will go back through previous posts and make sure I have all my settings correct.

Thanks again.
Title: Re: Qt6
Post by: Paul Smedley on January 24, 2023, 11:09:19 pm
Doug, looks through the last few pages and there's a block list to import into Dooble that seems to help with the pages not loading. For menus out of position, look for the link to a qt6core fix.

@Martin - I'm wondering if we need a new thread 'Testing Qt6' with a 'sticky' first post that has the latest links/tips for testing Qt6?  This thread (in the programming section) could then be for anyone suggesting fixes, wanting to build, etc.
Title: Re: Qt6
Post by: Martin Iturbide on January 24, 2023, 11:12:07 pm
@Martin - I'm wondering if we need a new thread 'Testing Qt6' with a 'sticky' first post that has the latest links/tips for testing Qt6?  This thread (in the programming section) could then be for anyone suggesting fixes, wanting to build, etc.

Hi Paul. I agree with you.  I created a new thread called "Qt6 Application Testing (https://www.os2world.com/forum/index.php/topic,3252.0.html)".

Regards
Title: Re: Qt6
Post by: Paul Smedley on January 25, 2023, 03:21:41 am
@Martin - I'm wondering if we need a new thread 'Testing Qt6' with a 'sticky' first post that has the latest links/tips for testing Qt6?  This thread (in the programming section) could then be for anyone suggesting fixes, wanting to build, etc.

Hi Paul. I agree with you.  I created a new thread called "Qt6 Application Testing (https://www.os2world.com/forum/index.php/topic,3252.0.html)".

Thanks Martin - can I ask that you edit the 1st post as required to include latest builds?
Title: Re: Qt6
Post by: Martin Iturbide on January 26, 2023, 02:16:01 am
@Martin - I'm wondering if we need a new thread 'Testing Qt6' with a 'sticky' first post that has the latest links/tips for testing Qt6?  This thread (in the programming section) could then be for anyone suggesting fixes, wanting to build, etc.

Hi Paul. I agree with you.  I created a new thread called "Qt6 Application Testing (https://www.os2world.com/forum/index.php/topic,3252.0.html)".

Thanks Martin - can I ask that you edit the 1st post as required to include latest builds?

Sure, let me know the links and I will change it.

Regards
Title: Re: Qt6 Development
Post by: Paul Smedley on January 26, 2023, 09:52:34 pm
Hopefully a full rebuild coming today.... I think I've corrected all the duplicate DLL names in QtDeclarative. Ninja makefiles are pretty simple,  so I've developed a patch for the auto-generated file to avoid the name clashes.
Title: Re: Qt6 Development
Post by: Paul Smedley on January 27, 2023, 07:12:32 am
Find some missing patches today - some source files moved paths, so my diffs didn't apply - and I didn't notice they'd moved :( I did a grep of the code for Q_OS_DOSLIKE - and found some stuff that fixes the gui drive letter issues...
Title: Re: Qt6 Development
Post by: Paul Smedley on January 29, 2023, 10:18:17 am
See the testing thread, but there's a new qt6 package at https://www.dropbox.com/s/qax8lg7txx04s81/qt6-6.2.4-os2-20230129.zip?dl=0

- already had highmem run on the main DLLs (ie \qt6\lib & \qt6\plugins)
- All modules now built with ninja
- I've tried to eliminate the DLL name clashes that existed in qtdeclarative
- single package that includes all updates up to 29JAN23
- I also just discovered that qtwebengine has a build\tests folder - so I plan to explore those.

For eg - tst_certificateerrors:
Code: [Select]
********* Start testing of tst_CertificateError *********
Config: Using QtTest library 6.2.4, Qt 6.2.4 (i386-little_endian-ilp32 shared (dynamic) release build; by GCC 9.2.0 20190812 (OS/2 RPM build 9.2.0-5.oc00)), os2 Warp 4.5
PASS   : tst_CertificateError::initTestCase()
FAIL!  : tst_CertificateError::handleError(Reject) '(page.error)' returned FALSE. ()
   Loc: [../tests/auto/core/certificateerror/tst_certificateerror.cpp(112)]
[2737:14:0129/202319.184000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -100
FAIL!  : tst_CertificateError::handleError(DeferReject) '(page.error)' returned FALSE. ()
   Loc: [../tests/auto/core/certificateerror/tst_certificateerror.cpp(112)]
[2737:14:0129/202334.728000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -100
[2737:14:0129/202339.066000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -202
QWARN  : tst_CertificateError::handleError(DeferAccept) ! Socket Error: QAbstractSocket::SocketError(13)
QWARN  : tst_CertificateError::handleError(DeferAccept) HttpServer:   unexpected disconnect
QWARN  : tst_CertificateError::handleError(DeferAccept) ! Socket Error: QAbstractSocket::RemoteHostClosedError
QWARN  : tst_CertificateError::handleError(DeferAccept) HttpServer:   unexpected disconnect
QINFO  : tst_CertificateError::handleError(DeferAccept) HttpServer: GET / 200 30
PASS   : tst_CertificateError::handleError(DeferAccept)
[2737:5:0129/202354.114000:ERROR:cert_verify_proc_builtin.cc(637)] CertVerifyProcBuiltin for revoked.badssl.com failed:
----- Certificate i=0 (CN=revoked.badssl.com) -----
ERROR: Time is after notAfter


[2737:14:0129/202354.162000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -201
FAIL!  : tst_CertificateError::fatalError() '!page.error->isOverridable()' returned FALSE. ()
   Loc: [../tests/auto/core/certificateerror/tst_certificateerror.cpp(151)]
PASS   : tst_CertificateError::cleanupTestCase()
Totals: 3 passed, 3 failed, 0 skipped, 0 blacklisted, 57733ms
********* Finished testing of tst_CertificateError *********
[2737:14:0129/202354.235000:ERROR:ssl_client_socket_impl.cc(947)] handshake failed; returned -1, SSL error code 1, net_error -201

I also really need to resolve issues with QProcess.... that would probably be enough to allow QtCreator to work...

One PITA with the webengine is not only the time to rebuild the chromium code (every now and then it decides to rebuild 10,000 objects) but just linking qt6webee.dll takes ~ 15 minutes
Title: Re: Qt6
Post by: Alex Taylor on January 29, 2023, 07:02:11 pm
Hey guys,

From the screenshots, it definitely looks like Qt6 is trying to draw the fonts at 96dpi, when they should be 120dpi.

Interesting - so it looks like the dpi setting is also used to scale fonts, as well as screen resolution. I'll dig into this some more - I still think this is a step forward - I'd rather small fonts/menus in the correct location, than larger fonts that are offset in position :)

Cheers,

Paul.

Edit: https://forum.qt.io/topic/125521/how-to-understand-logical-dpi-and-physical-dpi-in-qscreen/4 probably explains what's happening....


It sounds like you've figured out the conversion for window scaling, it's just font scaling that's off.

This stuff can be a bit hard to keep straight, even for someone like me who's studied it at length... I'll include some background info here because it makes it easier for me to articulate things.  It doesn't mean I assume you don't know much of this already.

A font's point size is a fixed unit of measure where 1 pt == 1/72 of an inch.  So when a font is 12pt, that means its "em height" (a measure which means the bounding height of unaccented characters) is 12 points (or 1/8 inch) high.

On a computers, we measure things in pixels instead of inches.  So font scaling is all about figuring out the conversion factor of points to pixels.  To do this, we use the DPI resolution of the output device (the screen or printer). 

OS/2 Presentation Manager supports two DPI settings: 96 (which is the default at 800x600 and below), and 120 (which is the default at 1024x768 and up). 

So when a font is rendered on screen, its em height is scaled down to a number of pixels equal to pts * (DPI / 72). For example, a 12-point font on a 120 DPI screen would be drawn at 12 * 1.666666 == 20 pixels high.

Conversely, if you have a specific pixel height and you want to know the correct point size that will fit it, you flip the equation: points = pixels / (DPI / 72).  So to render an unaccented character (without padding) in a 30-pixel high box at 120 DPI, you need 30 / 1.666666 == 18pt.  (To allow space for accents and line spacing, you'd normally pad this a bit, probably by querying some of the font-specific metrics like lMaxAscender.)

Things get a bit more complicated because some programs like the Mozilla apps (and probably also Qt), define their own DPI setting separately from what PM thinks it should be. 

I assume you need to adjust Qt's DPI to match the current PM value, or else apply a conversion factor between the two.  (I'm not sure how Qt represents this internally.  The documentation I found is not very informative.)

You can query the current PM DPI setting using DevQueryCaps. 

Code: [Select]
HDC hdc
LONG lCap, lDPI = 0;

hdc = WinOpenWindowDC( hwnd )
if ( DevQueryCaps( hdc, CAPS_VERTICAL_FONT_RES, 1, &lCap ))
    lDPI = lCap;
if ( !lDPI )
    lDPI = 120;
Title: Re: Qt6 Development
Post by: Paul Smedley on January 29, 2023, 09:33:22 pm
Hi Alex - this is all very helpful, and confirms that my current 'fix' is indeed a workaround. Qt already uses DevQueryCaps (https://github.com/psmedley/qt6-base-os2/blob/main/src/plugins/platforms/os2/qos2screen.cpp#L69), but seems something changed between Qt5 and Qt6 in that that DPI value is now also used for screen scaling, which was causing the menus to be out of position.

So at some point, I need to find the window scaling code, and put in place a better fix for OS/2 so that we don't scale the window, but we do scale the fonts!
Title: Re: Qt6 Development
Post by: Paul Smedley on January 30, 2023, 08:45:36 am
Font scaling should be fixed with https://github.com/psmedley/qt6-base-os2/commit/e54d5f1f160f9d5798f2e483ea8f8e7e9014df77 - new qos2.dll link is in the testing thread.

I got lucky with browsing github during my lunch break today, and found https://github.com/psmedley/qt6-base-os2/blob/main/src/gui/kernel/qhighdpiscaling.cpp - searching for references to this led me to a commit which added logicalBaseDPI on other platforms - and voila ;) seems logicalBaseDPI defaulted to 96,96 is not set - which was different to the screen/font dpi of 120,120 - so windows got scaled (which we didn't wnat/need).
Title: Re: Qt6 Development
Post by: Lars on January 30, 2023, 12:48:03 pm
Font scaling should be fixed with https://github.com/psmedley/qt6-base-os2/commit/e54d5f1f160f9d5798f2e483ea8f8e7e9014df77 - new qos2.dll link is in the testing thread.

I got lucky with browsing github during my lunch break today, and found https://github.com/psmedley/qt6-base-os2/blob/main/src/gui/kernel/qhighdpiscaling.cpp - searching for references to this led me to a commit which added logicalBaseDPI on other platforms - and voila ;) seems logicalBaseDPI defaulted to 96,96 is not set - which was different to the screen/font dpi of 120,120 - so windows got scaled (which we didn't wnat/need).

I don't get your explanation. From what I can see, QPlatformScreen::logicalDpi is not properly implemented in your github repo. It just returns QPlatfromScreen::logicalBaseDpi and therefore a 1:1 scaling between "logical" and "physical" for x and also y coordinates.
The BWW repo has an implementation for QPlatformScreen::logicalDpi that is more complex and will lead to a different scaling, at least under certain conditions.
Additionally: Looks like you can fumble around with environment var: QT_FONT_DPI to set your logical DPI. Maybe you can try "set QT_FONT_DPI=120" and see if that makes a difference. At least you can experiment with it ...

And I think it seconds what Alex said: QScreen:: is about Windows scaling and QPlatformScreen:: seems to center around font scaling, at least according to the comments in file qplatformscreen.cpp, at least the BWW repo has this:

Code: [Select]
/*!
    Reimplement this function in subclass to return the logical horizontal
    and vertical dots per inch metrics of the screen.
    The logical dots per inch metrics are used by QFont to convert point sizes
    to pixel sizes.
    The default implementation uses the screen pixel size and physical size to
    compute the metrics.
    \sa physicalSize
*/
QDpi QPlatformScreen::logicalDpi() const
{
    QSizeF ps = physicalSize();
    QSize s = geometry().size();

    if (qFuzzyIsNull(ps.width()) || qFuzzyIsNull(ps.height()))
        return QDpi(96, 96);
    return QDpi(25.4 * s.width() / ps.width(),
                25.4 * s.height() / ps.height());
}
Title: Re: Qt6 Development
Post by: Paul Smedley on January 30, 2023, 08:53:19 pm
This commit is what have me the idea... https://codereview.qt-project.org/c/qt/qtbase/+/157174/

This bug report also pretty much reflects what we were seeing  https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-87035
Title: Re: Qt6 Development
Post by: Lars on January 31, 2023, 07:18:21 am
But does the change go against QScreen or against QPlatformscreen?
I have to admit that I got lost. They are inventing 2 different functions "logicalBaseDPI" and "logicalDPI" that return the exact same value (and sorry, yes, that seemingly changed from QT5 to QT6) and then they introduce them in two different classes. It's also unclear what is now physical and what is virtual. How could you compute a physical DPI value without the ability to query the screen size as physical horizontal and vertical lengths?
Title: Re: Qt6 Development
Post by: Paul Smedley on January 31, 2023, 09:59:31 am
Agree its confusing..... the platform specific stuff went into the respective *screen.cpp functions - for now it works... will revisit at a later date - for now there's bigger fish to fry like broken qprocess_os2.cpp and certificate errors in chromium...
Title: Re: Qt6 Development
Post by: Martin Iturbide on February 02, 2023, 08:36:16 pm
Guys

Do you think this news will impact us in a negative way? "Google To Allow Rust Code In The Chromium Browser (https://www.phoronix.com/news/Google-Rust-In-Chromium)" (12 January 2023)
Is it only the Chromiun browser or will affect the engine that is getting ported to OS/2 ?

Regards
Title: Re: Qt6 Development
Post by: Paul Smedley on February 02, 2023, 09:29:56 pm
Hey Martin,
Do you think this news will impact us in a negative way? "Google To Allow Rust Code In The Chromium Browser (https://www.phoronix.com/news/Google-Rust-In-Chromium)" (12 January 2023)
Is it only the Chromiun browser or will affect the engine that is getting ported to OS/2 ?

In the fullness of time, I believe this will impact us. The current plan (https://chromium.googlesource.com/chromium/src/+/main/docs/adding_to_third_party.md#Rust) is to only allow it in 3rd party libraries, and only in certain situations.

Given the memory usage of this beast, at some point, it's going to get extremely challenging to run a modern browser in <= 4gb of RAM -  which seems insane when I used to run OS/2 Warp with 8mb or 16mb of RAM.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 04, 2023, 09:02:57 am
I might try look at implementing an OS2 backend for Qt Multimedia - based on the OS/2 audio code from Chromium at https://github.com/psmedley/qt6-webengine-os2/tree/main/src/3rdparty/chromium/media/audio/os2

But I should fix qprocess first :)
Title: Re: Qt6 Development
Post by: Paul Smedley on February 05, 2023, 01:39:00 am
Fixed the noise of the 'Broken filename passed to function' errors.

Created a new ticket to document the Qprocess issues - https://github.com/psmedley/qt6-base-os2/issues/12
Title: Re: Qt6 Development
Post by: Paul Smedley on February 05, 2023, 09:50:51 am
Has anyone else tried building QtWebEngine from git? (Qt6 version of course)
Title: Re: Qt6 Development
Post by: Dave Yeo on February 05, 2023, 05:28:54 pm
Has anyone else tried building QtWebEngine from git? (Qt6 version of course)

Not yet. I do finally have the git tree checked out. How is your tree setup? I'm not sure which other Qt6 libs are needed.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 05, 2023, 09:13:43 pm
Hey Dave,

Has anyone else tried building QtWebEngine from git? (Qt6 version of course)

Not yet. I do finally have the git tree checked out. How is your tree setup? I'm not sure which other Qt6 libs are needed.

Cool. I basically have all the pre-built Qt6 stuff in /qt6 and to configure the webengine run:
Code: [Select]
dash /qt6/bin/qt-configure-module .. 2>&1 | tee configure.log
from u:/dev/qt6-webengine-os2/build

Note that for some of the larger c++ files, you'll likely need VIRTUALADDRESSLIMIT set to 3072 to avoid out of memory errors. Running ninja with the default settings for jobs can also lead to memory exhaustion, so I tend to manually run 'ninja -j1'  from build/src/core/Release/i386
Title: Re: Qt6 Development
Post by: Dave Yeo on February 05, 2023, 10:20:56 pm
Ok, which prebuilt Qt6 stuff did you need?
Guess the last package you uploaded is complete?
Title: Re: Qt6 Development
Post by: Paul Smedley on February 06, 2023, 01:29:28 am
Just the contents of the qt6 distro that is posted here. Assuming you've unzipped that somewhere, and bit removed anything, it's all in there.
Title: Re: Qt6 Development
Post by: Dave Yeo on February 06, 2023, 01:48:53 am
OK, what environment to target? eg, configure died looking for /bin/pwd, I quickly changed it to pwd but could have created a /bin directory or changed it to /@unixroot/usr/bin/pwd.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 06, 2023, 02:05:37 am
I'm just using rpm - although I may have managed to have a copy of PWD in /bin from my own Dev environment
Title: Re: Qt6 Development
Post by: Dave Yeo on February 06, 2023, 03:11:00 am
Guess I'm going to have to install Python3, after backing up:)
What is unclear is what to run after the configure step. Tried Cmake, it did a bunch of stuff and then exited and ninja seems to be missing something.
Code: [Select]
[1/464] Generating .rcc/qmlcache/WebEngineQuickDelegatesQml_qmlcache_loader.cpp
FAILED: src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_qmlcache_loader.cpp
cd L:/work/qt6/qt6-webengine-os2/build/src/webenginequick/ui && L:/qt6/bin/qmlcachegen.exe --resource-name qmlcache_WebEngineQuickDelegatesQml --resource L:/work/qt6/qt6-webengine-os2/build/src/webenginequick/ui/.rcc/qmake_QtWebEngine_ControlsDelegates.qrc --resource L:/work/qt6/qt6-webengine-os2/build/src/webenginequick/ui/.rcc/WebEngineQuickDelegatesQml_raw_qml_0.qrc -o L:/work/qt6/qt6-webengine-os2/build/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_qmlcache_loader.cpp @L:/work/qt6/qt6-webengine-os2/build/src/webenginequick/ui/.rcc/qmlcache/WebEngineQuickDelegatesQml_qml_loader_file_list.rsp
/@unixroot/usr/bin/sh: 1: L:/qt6/bin/qmlcachegen.exe: not found
ninja: build stopped: subcommand failed.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 06, 2023, 04:50:00 am
Hey Dave,

You definitely don't need python3 for Qt 6.2.4. For 6.3.x it's a different story - python3 is required.

The way I read that ninja error, L:/qt6/bin/qmlcachegen.exe is not found

Does it exist and can it be run?

Cheers,

Paul.
Title: Re: Qt6 Development
Post by: Dave Yeo on February 06, 2023, 06:26:44 pm
OK, Python3 does not want to install here, stupid RPM. I forget to set BEGINLIBPATH.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 06, 2023, 09:14:50 pm
For Python3 -install - see https://www.os2world.com/forum/index.php/topic,3203.msg37251.html#msg37251
Title: Re: Qt6 Development
Post by: Tom on February 06, 2023, 10:34:03 pm
For Python3 -install - see https://www.os2world.com/forum/index.php/topic,3203.msg37251.html#msg37251

Maybe https://www.os2world.com/forum/index.php/topic,3203.msg37146.html#msg37146 is more to the point ?
Title: Re: Qt6 Development
Post by: Dave Yeo on February 07, 2023, 03:32:32 am
Disabling netlabs-rel worked to install Python3. Seems every time I've installed it, the procedure has changed.
Building with your configure line and ninja, the build dies here,
Code: [Select]
[1114/23544] COPY gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js
FAILED: resources/inspector/third_party/acorn/acorn.js
ln -f gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js
 resources/inspector/third_party/acorn/acorn.js 2>/dev/null || (rm -rf resources/inspector/third_party/acorn/acorn.js && cp -af gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js)
cp: cannot stat 'gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js': No such file or directory

I find 3 acorn.js in my tree, at 204KB,
Code: [Select]
L:/work/qt6/qt6-webengine-os2/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/acorn/package/dist/acorn.js
at 200KB,
Code: [Select]
L:/work/qt6/qt6-webengine-os2/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/acorn/dist/acorn.js
and a 993 byte one at,
Code: [Select]
L:/work/qt6/qt6-webengine-os2/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/recast/parsers/acorn.js

Not sure where it is supposed to copy, no res/ that I see here.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 07, 2023, 04:47:29 am
Hey Dave,

I saw something similar - if you wade back far enough in this thread, you'll seen me talking about it. My theory is that something isn't quite right in our nodejs port, so these files aren't getting created.

I ended up creating stubs of the missing files (which was very tedious) - I should go back and copy them over from a linux build of qtwebengine 6.2.4.

Try unzipping https://smedley.id.au/tmp/tmp/gen.zip into build/src/core/release/i386

Cheers,

Paul
Title: Re: Qt6 Development
Post by: Dave Yeo on February 07, 2023, 05:08:46 am
Didn't like the 0 byte acorn.js. Guess try to do the unzip earlier in the build, unless your zip didn't capture the symlinks.
Code: [Select]
[11/22435] COPY gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js
FAILED: resources/inspector/third_party/acorn/acorn.js
ln -f gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js 2>/dev/null || (rm -rf resources/inspector/third_party/acorn/acorn.js && cp -af gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js)
cp: cannot stat 'gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js': No such file or directory
Title: Re: Qt6 Development
Post by: Paul Smedley on February 07, 2023, 09:05:49 am
that's weird... I was able to unzip gen.zip to an empty dir, and execute 'cp -af gen/third_party/devtools-frontend/src/front_end/third_party/acorn/acorn.js resources/inspector/third_party/acorn/acorn.js'' and provided I had an already created resources/inspector/third_party/acorn - it worked ok....
Title: Re: Qt6 Development
Post by: Paul Smedley on February 08, 2023, 09:23:36 pm
Hey all, Steven suggested that the reason we don't get dumps when the browser exits, is that some code within the webengine is calling exit(). Thanks to another suggestion from him, I've built a custom libcn0.dll that should generate a dump file whenever exit() or _exit() are called. I'm hoping that some time today I can see if this works, and generates some useful information about where in the code the exit() is coming from, and what may be causing it. This approach may even work for Qt5 (assuming the silent exits are for a similar reason), but I won't be investigating those...

Not really planning on sharing the special libcn0.dll (as it's really only suitable for investigating silent exits, and I'll only be testing with LIBPATHSTRICT set), but if anyone has a burning desire to try and generate .TRP files, let me know :)

More here once I've done some testing.
Title: Re: Qt6 Development
Post by: roberto on February 09, 2023, 05:19:45 pm
, but if anyone has a burning desire to try and generate .TRP files, let me know :)

I attach a zip with several Sigtrap, from 01-22-2023 and 01-24-2023 with two DLLs:
13/01/23  8:41    257.356.880      0 a---  Qt6WebEe-stop.dll
14/01/23 19:56    257.357.263      0 a---  Qt6WebEe.dll
saludos
Title: Re: Qt6 Development
Post by: Paul Smedley on February 09, 2023, 09:32:33 pm
, but if anyone has a burning desire to try and generate .TRP files, let me know :)

I attach a zip with several Sigtrap, from 01-22-2023 and 01-24-2023 with two DLLs:
13/01/23  8:41    257.356.880      0 a---  Qt6WebEe-stop.dll
14/01/23 19:56    257.357.263      0 a---  Qt6WebEe.dll
saludos

Thanks, but these are probably the same as https://github.com/psmedley/qt6-webengine-os2/issues/7
Title: Re: Qt6 Development
Post by: Paul Smedley on February 10, 2023, 09:51:35 am
Not really planning on sharing the special libcn0.dll (as it's really only suitable for investigating silent exits, and I'll only be testing with LIBPATHSTRICT set), but if anyone has a burning desire to try
and generate .TRP files, let me know :)

More here once I've done some testing.

Unfortunately, my self built libcn0.dll isn't working with dooble - it does work with other apps, but with dooble, it's giving:
Code: [Select]
PID 0045 TID 01: LIBCx Assertion failed at shared.c:898:get_file_desc_ex: path

===== LIBCx resource usage =====
Reserved memory size:  2097152 bytes
Committed memory size: 65536 bytes
Heap size total:       65120 bytes
Heap size used now:    1760 bytes
ProcDesc structs used now:       3
FileDesc structs used now:       0
SharedFileDesc structs used now: 0
===== LIBCx global mutex info =====
mutex handle: 800100c9
owner state:  alive
owner PID:    0045 (69) <current>
owner TID:    1 <current>
request #:    1
===== LIBCx stats end =====

Killed by SIGTRAP
pid=0x0045 ppid=0x003f tid=0x0001 slot=0x004a pri=0x0200 mc=0x0001 ps=0x0010
U:\DOOBLE\DOOBLE.EXE
LIBCX0 0:00011d16
cs:eip=0382:1e221d16      ss:esp=0000:00000000      ebp=78300053
 ds=0000      es=0000      fs=0030      gs=0000     efl=1e4e4bec
eax=00baf0a8 ebx=1ffc9d7c ecx=00baf0bc edx=00baf0e0 edi=00000000 esi=00baff8c
Creating 0045_01.TRP
Moved 0045_01.TRP to C:\var\log\app\63e52181-0045_01-DOOBLE-exceptq.txt

<sigh>
Title: Re: Qt6 Development
Post by: Rich Walsh on February 10, 2023, 06:43:20 pm
I've built a custom libcn0.dll that should generate a dump file whenever exit() or _exit() are called.

Wouldn't it be far easier to find an appropriate top-level '.h' file where you could redefine 'exit()'?.
For example, this will create an Exceptq report in the current directory, then exit:

Code: [Select]
#define exit(x) { \
EXCEPTIONREPORTRECORD err = { EXCEPTQ_DEBUG_EXCEPTION, EH_NONCONTINUABLE, 0, 0, 0, {0,0,0,0}}; \
DosRaiseException(&err); }

Title: Re: Qt6 Development
Post by: Paul Smedley on February 10, 2023, 11:55:38 pm
Hi Rich,

The downside to your approach is that I'd 1st have to identify a common header, and 2nd that a rebuild of QtWebEngine takes a LONG time - 12+ hours.

I found the problem - the combination of dooble + libcn0 + libcx0 don't like LIBPATHSTRICT=T

Once I added u:\dooble to the front of libpath and rebooted - the modified DLL does what it was asked to do and generated the attached for a website known to cause Dooble to exit (https://www.netbank.com.au)

I'll try analyse it today, but frankly not feeling like doing too much. I caught my toe on the edge of a door almost 3 weeks ago - and it hurt a lot - hobbled around for 10 days then thought I should go see a Doctor - turns out I busted two bones in my left foot - the 5th toe, and the metacarpil bone of the 4th toe, so I'm in a moon boot until at least 2nd March. It's still quite sore, so minimal time has been spent on anything OS/2 related in the last couple of weeks.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 11, 2023, 06:34:35 am
OK, the above TRP (with some decoding from Steven) has given me some ideas... unfortunately, I ended up modifying a .gn file, which triggered a bit of a rebuild, so it will be a few hours before I know if it really helped.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 11, 2023, 10:06:52 am
Seems to help - going to https://www.netbank.com.au doesn't result in an immediate crash now :) New DLL at https://smedley.id.au/tmp/qt6webee-20230211.zip

I'll commit the fix shortly.
Title: Re: Qt6 Development
Post by: David McKenna on February 11, 2023, 01:47:56 pm
 Thanks, Paul... https://html5test.com works now - Nice detective work! Oddly, the QT6 version of Dooble gives a slightly lower score than the QT5 one...

Regards,
Title: Re: Qt6 Development
Post by: Paul Smedley on February 11, 2023, 09:07:53 pm
Thanks, Paul... https://html5test.com works now - Nice detective work! Oddly, the QT6 version of Dooble gives a slightly lower score than the QT5 one...

It was comparatively easy once I knew which function was crashing!

I have Dooble installed on linux which is also using Qt 6.2.4 - and am getting 472 points of 555 - on both OS/2 and linux.... What does dooble score on Qt5?

FWIW
Dooble on Qt 6.2.4 under OS/2 - http://html5te.st/affa3a605cef5c6d
Dooble on Qt 6.2.4 under linux - http://html5te.st/d58d0b605d64a0ad
Title: Re: Qt6 Development
Post by: David McKenna on February 11, 2023, 10:44:45 pm
Paul,

  I'm proud to say that here Dooble on OS/2 using QT5 gets a score of 522! Dooble using QT6 gets 519... those Linux guys need to step up their game :-)

Regards,
Title: Re: Qt6 Development
Post by: Paul Smedley on February 11, 2023, 11:33:42 pm
Hey Dave - are you able to click the 'Save' button and post the URL for your Qt5 result? I'm guessing the difference is due to some codecs that a) I don't have installed on my linux partition, and b) may not yet be working quite right in out Qt6 port.

Edit: actually if you can save both results, and I'll work out how to get my Dooble/2 to your level :P
Title: Re: Qt6 Development
Post by: Eugene Tucker on February 11, 2023, 11:53:49 pm
Dave not fair they don't have Paul Smedly developing for them.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 12, 2023, 01:18:20 am
Dave not fair they don't have Paul Smedly developing for them.
Whilst I appreciate the compliment, in reality, I'm developing very little, I'm just hacking around to get things working. If it wasn't for the efforts of LOTS of people working on Qt and Chromium for other platforms, we'd have nothing.
Title: Re: Qt6 Development
Post by: Dave Yeo on February 12, 2023, 04:08:42 am
I get 519 when using https, and 472 when using http at html5test.com with the security improving from 21/32 to 29/32. I guess the problem with Dooble is it is happy with a HTTP address instead of aggressively trying for https
Title: Re: Qt6 Development
Post by: Paul Smedley on February 12, 2023, 04:47:48 am
I didn't even notice the URL - I'm so used to chrome trying https first..

Dooble under linux Qt 6.2.4 - https - https://html5te.st/ab2700605eccae48 - 519 / 555
Dooble under OS/2 Qt 6.2.4 - https://html5te.st/584092605e962288 - 519 / 555

Dooble under OS/2 Qt 5.15.x - https://html5te.st/903da8605ebf9a6d - 522/555 - the +3 is from 'Web Applications' which is interesting
Title: Re: Qt6 Development
Post by: TeLLie on February 12, 2023, 07:06:56 pm
Hi all,
What i try i dont get any output out off the html5test site""

Even with Qt5 dooble it dont give any output
Title: Re: Qt6 Development
Post by: David McKenna on February 12, 2023, 08:01:08 pm
Hi Tellie,

  Does it just show a blank page? Are you sure Javascript is enabled? The site needs Javascript to run, but at least here, if not enabled I get a message saying to enable it. Might want to try a new profile too.

Regards,
Title: Re: Qt6 Development
Post by: TeLLie on February 12, 2023, 09:07:32 pm
Hi David

I see the this...
And then Notting happens
Also tried a new profile, also JavaScript is enabled.
Title: Re: Qt6 Development
Post by: David McKenna on February 12, 2023, 09:38:20 pm
 OK - I see that too briefly, then the score comes up. Are you using any kind of blocker or HOSTS file that might interfere, or proxy? If so, maybe disable temporarily to test...

Regards,
Title: Re: Qt6 Development
Post by: roberto on February 12, 2023, 09:59:33 pm
I see the this...
Hi Tellie
You are run http and is https
Saludos
Title: Re: Qt6 Development
Post by: Paul Smedley on February 12, 2023, 10:44:02 pm
I see the this...
Hi Tellie
You are run http and is https
Saludos

Both should work - but https will give a better score...
Title: Re: Qt6 Development
Post by: Paul Smedley on February 21, 2023, 09:32:11 am
Started work to enable assembly for openh264 - got the following - not the error I was expecting :P
Code: [Select]
FAILED: obj/third_party/openh264/openh264_processing_asm/downsample_bilinear.obj
C:/USR/BIN/python2.7.exe ../../../../../src/3rdparty/chromium/build/gn_run_binary.py nasm.exe -DPREFIX -fobj -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/api/svc/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/common/arm/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/common/inc/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/common/src/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/common/x86/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/interface/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/adaptivequantization/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/backgrounddetection/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/common/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/complexityanalysis/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/denoise/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/downsample/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/imagerotate/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/scenechangedetection/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/scrolldetection/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/vaacalc/ -I../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/common/x86/ -I./ -I../../../../../src/3rdparty/chromium/ -Igen/ -DX86_32 -DX86_32_PICASM -MD obj/third_party/openh264/openh264_processing_asm/downsample_bilinear.obj.d -o obj/third_party/openh264/openh264_processing_asm/downsample_bilinear.obj ../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/x86/downsample_bilinear.asm
../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/x86/downsample_bilinear.asm:754: error: short jump is out of range
../../../../../src/3rdparty/chromium/third_party/openh264/src/codec/processing/src/x86/downsample_bilinear.asm:754: warning: byte data exceeds bounds [-w+number-overflow]
nasm.exe failed with exit code 1
ninja: build stopped: subcommand failed.

Note: I haven't even tried modifying "asm_inc.asm" yet to add support for the obj object format - I thought I'd just patch openh264\BUILD.gn to add is_os2 to the conditions to enable assembly and see what happens. Will try spend some time on this later this week...
Title: Re: Qt6 Development
Post by: Dave Yeo on February 21, 2023, 04:38:37 pm
Short jump is a 16 bit thing, staying in the same segment. Need USE32
Title: Re: Qt6 Development
Post by: Paul Smedley on February 21, 2023, 08:57:07 pm
As I understand it, stating 'BITS 32' should be equivalent to USE32.

BITS 32 is set at https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/openh264/src/codec/common/x86/asm_inc.asm#L201 (I think)
Title: Re: Qt6 Development
Post by: Dave Yeo on February 21, 2023, 10:37:51 pm
Not sure if it will mean a 32 bit flat, aligned segment, rather then 32 bit code in a 16 bit segment. Guess could ask the nasm people, or experiment.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 21, 2023, 10:56:37 pm
OK - I now see how USE32 was used in other areas...

Initial commit in https://github.com/psmedley/qt6-webengine-os2/commit/37131634cd23b9b73408d15b17e8d347b389134d gets it building.. will see what changes...
Title: Re: Qt6 Development
Post by: Dave Yeo on February 21, 2023, 11:23:52 pm
Not sure about your align statement, see https://www.nasm.us/xdoc/2.16.01/html/nasmdoc8.html#section-8.4.1 (https://www.nasm.us/xdoc/2.16.01/html/nasmdoc8.html#section-8.4.1), 32 align will end up as 256. I thought 16 is good enough for SSE*, though they are using 32. Maybe once again experimentation is in order. At least a misaligned SSE* instruction should cause an obvious trp.
There's also a section .rodata in mc_chroma.asm
Mostly looks good to me.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 22, 2023, 01:22:44 am
Few more changes in https://github.com/psmedley/qt6-webengine-os2/commit/4c70325abdb7e6c9abd9c96286d0dc08724236d0

https://smedley.id.au/tmp/qt6webee-20230222.zip has the above changes - but still locks up with youtube here :( Not sure what's changed to make this worse...
Title: Re: Qt6 Development
Post by: Dave Yeo on February 22, 2023, 05:27:11 am
It's weird, just tried Youtube with the latest Qt5 Dooble, it didn't actually play anything for more then a few seconds with the CPU peaked, exited fine, others are reporting it works fine. My I5 is old, but still an I5
Feel stupid as Dmik ported Dav1d for Qt5 and I never noticed, you might want to review his changes, they look basically the same as yours quickly looking, there's other differences even though they're the same version. Perhaps just drop in the Qt5 version, or maybe just libdav1d, and update the BUILD.gn etc if needed.
 
Title: Re: Qt6 Development
Post by: Dave Yeo on February 22, 2023, 06:27:41 am
After testing your latest and having to reboot :) I found the Qt5 Dooble played YouTube videos not too badly, especially the VP9 ones, AV1 played but a bit laggy.
It then occurred to me to try the Qt6 simplebrowser. Youtube almost loaded and then the tab froze, other tabs continued to work, system was responsive, top reported the qtwebprocess was using about 80% CPU, the Xcentre CPU meter agreed. There were a lot of complaints about sqlite. Simplebrowser also shut down cleanly.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 22, 2023, 08:04:03 am
Hey Dave,

Feel stupid as Dmik ported Dav1d for Qt5 and I never noticed, you might want to review his changes, they look basically the same as yours quickly looking, there's other differences even though they're the same version. Perhaps just drop in the Qt5 version, or maybe just libdav1d, and update the BUILD.gn etc if needed.

Thats interesting.... I'd forgotten this - but indeed I had the initial patches for dav1d in https://github.com/psmedley/qt6-webengine-os2/commit/a70bb96c96df634e5472441d695be5eedfc7bbc8 based on the qt5 work.

Looks like the main differences are the xhanges to xf86inc.asm in https://github.com/psmedley/qt6-webengine-os2/commit/805bf77f6685a414b4688534b440b001a7c6252c#diff-a620cf88d9f41455099357472777f199beaf4683454fd86b6312f7149b1da6c3 &  https://github.com/psmedley/qt6-webengine-os2/commit/167babc8243d00b067de3c35b4cfdb8829f6974a

I'll revert xf86inc.asm to the one from qt5... and see what happens...
Title: Re: Qt6 Development
Post by: Paul Smedley on February 22, 2023, 08:29:54 am
Seems to have helped a bit.... https://www.abc.net.au/news/newschannel/ has been playing for a few minutes now without pausing...

https://smedley.id.au/tmp/qt6webee-20230222.zip has been refreshed - changes not checked in yet...

Youtube also played a few clips without locking up the system... not declaring victory yet, but seeming like progress...
Title: Re: Qt6 Development
Post by: KO Myung-Hun on February 23, 2023, 05:16:56 pm
Hi/2.

Hey Dave,

Feel stupid as Dmik ported Dav1d for Qt5 and I never noticed, you might want to review his changes, they look basically the same as yours quickly looking, there's other differences even though they're the same version. Perhaps just drop in the Qt5 version, or maybe just libdav1d, and update the BUILD.gn etc if needed.

Thats interesting.... I'd forgotten this - but indeed I had the initial patches for dav1d in https://github.com/psmedley/qt6-webengine-os2/commit/a70bb96c96df634e5472441d695be5eedfc7bbc8 based on the qt5 work.

Looks like the main differences are the xhanges to xf86inc.asm in https://github.com/psmedley/qt6-webengine-os2/commit/805bf77f6685a414b4688534b440b001a7c6252c#diff-a620cf88d9f41455099357472777f199beaf4683454fd86b6312f7149b1da6c3 &  https://github.com/psmedley/qt6-webengine-os2/commit/167babc8243d00b067de3c35b4cfdb8829f6974a

I'll revert xf86inc.asm to the one from qt5... and see what happens...

I can see the following codes in your commits:

Quote
; Needed on OS/2 where it is 16-bit by default.
%macro SECTION_TEXT 0
    %ifidn __OUTPUT_FORMAT__,obj
        SEGMENT TEXT32 CLASS=CODE USE32
    %else
        SECTION .text
    %endif
%endmacro

BTW, why 16-bit not 16-byte? And the default alignment of SEGMENT/SECTION of NASM for obj is 1-byte unlike any other file format which is 16-byte in general. See https://www.nasm.us/xdoc/2.16rc12/html/nasmdoc8.html#section-8.4.1.

So if you want to declare segment with 16-bit alignment, you should add align=2. if 16-byte alignment, add align=16.

KO Myung-Hun
Title: Re: Qt6 Development
Post by: Rich Walsh on February 23, 2023, 08:33:16 pm
Quote
; Needed on OS/2 where it is 16-bit by default.
%macro SECTION_TEXT 0
    %ifidn __OUTPUT_FORMAT__,obj
        SEGMENT TEXT32 CLASS=CODE USE32
    %else
        SECTION .text
    %endif
%endmacro

BTW, why 16-bit not 16-byte? And the default alignment of SEGMENT/SECTION of NASM for obj is 1-byte unlike any other file format which is 16-byte in general. See https://www.nasm.us/xdoc/2.16rc12/html/nasmdoc8.html#section-8.4.1.
So if you want to declare segment with 16-bit alignment, you should add align=2. if 16-byte alignment, add align=16.

This was added to fix code generation -not alignment- after Paul encountered these errors:
Quote
src/x86/downsample_bilinear.asm:754: error: short jump is out of range
src/x86/downsample_bilinear.asm:754: warning: byte data exceeds bounds [-w+number-overflow]

At line 754 is a LOOP instruction whose target was more than 128 bytes away (bigger than a short jump allows). With the assembler assuming 16-bit code, it was adding a 32-bit-operand prefix before all 32-bit code, causing it to swell in size. Adding USE32 eliminated the prefixes and shrunk the loop to <= 128 bytes.

BTW... using this to also set alignment sounds like a good idea - the more stuff you have nailed down in one place, the better.
Title: Re: Qt6 Development
Post by: Paul Smedley on February 23, 2023, 09:24:29 pm
Thanks guys - ASM voodoo puts me way out of my comfort zone.

I made the changes to dav1d based on what was used in qt5:
https://github.com/bitwiseworks/qtwebengine-chromium-os2/blob/master/chromium/third_party/dav1d/libdav1d/src/ext/x86/x86inc.asm#L88

The current code (which I've replicated in other instances of x86inc.asm is at:
https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/dav1d/libdav1d/src/ext/x86/x86inc.asm#L88

@KO - appears you may have looked just before I checked in the latest code :) as there is now an ALIGN statement
Title: Re: Qt6 Development
Post by: KO Myung-Hun on February 24, 2023, 06:38:16 am
Hi/2.

@Paul What I meant is https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/dav1d/libdav1d/src/ext/x86/x86inc.asm#L97.

Title: Re: Qt6 Development
Post by: Paul Smedley on February 24, 2023, 09:08:46 am
Sorry - senior moment - wasn't reading properly - happy to do whatever you suggest here....
Title: Re: Qt6 Development
Post by: Paul Smedley on February 25, 2023, 05:32:17 am
FYI - I just raised https://github.com/bitwiseworks/python-os2/issues/9 around an issue with python 3.x and building QtWebEngine 6.3.x (the build system in 6.2.x used python2, they now use python3). Fix is in the Issue..
Title: Re: Qt6 Development
Post by: Paul Smedley on February 25, 2023, 07:31:24 am
FYI - I just raised https://github.com/bitwiseworks/python-os2/issues/9 around an issue with python 3.x and building QtWebEngine 6.3.x (the build system in 6.2.x used python2, they now use python3). Fix is in the Issue..

Got another breakage later on, so have made a further change to subprocess.py - will see if that resolves things.

Currently at: [1519/20019] - started with ~25000 items to build so in reality 6500/25000 (ish) or 26%
Title: Re: Qt6 Development
Post by: Paul Smedley on February 25, 2023, 09:00:16 am
Stuck for the time being with 6.3.2 at ~40% built (against the 6.2.4 base libraries)
Code: [Select]
[31/15740] ACTION //third_party/devtools-frontend/src/inspector_overlay:build_inspector_overlay(//build/toolchain/os2:x86)
FAILED: resources/inspector_overlay/main.js
C:/USR/BIN/python3 ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py main.js 67000 --input_path gen/third_party/devtools-frontend/src/inspector_overlay --output_path resources/inspector_overlay --rollup_plugin ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/inspector_overlay/loadCSS.rollup.js
Usage: ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py filename_1 max_size_1 filename_2 max_size_2 ... filename_N max_size_N --input_path <input_path> --output_path <output_path>
Traceback (most recent call last):
  File "U:/DEV/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 92, in <module>
    sys.exit(main(sys.argv))
  File "U:/DEV/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 77, in main
    rollup(input_path, output_path, filename, max_size,
  File "U:/DEV/qt6-webengine-os2-6.3.x/build/src/core/Release/i386/../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py", line 52, in rollup
    raise Exception("rollup failed: " + error)
Exception: rollup failed:
gen/third_party/devtools-frontend/src/inspector_overlay/main.js \u2192 stdout...
Title: Re: Qt6 Development
Post by: Paul Smedley on February 25, 2023, 09:29:08 am
Looks to be a problem calling python's popen.... adding some print() statements to work out the parameters to node.exe - the command runs to completion. Will have a play in the morning and try work out what's broken....
Title: Re: Qt6 Development
Post by: Paul Smedley on February 26, 2023, 01:45:21 am
OK the issue is that node.exe isn't sending output to stdout, so it thinks that popen has failed....

Edit:
Interesting, the command line that is run is:
Code: [Select]
node.exe U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup --format iife -n InspectorOverlay --input gen/third_party/devtools-frontend/src/inspector_overlay/main.js --plugin ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/inspector_overlay/loadCSS.rollup.js --plugin terser

Which produces no output. However, if I run:
Code: [Select]
node.exe U:/DEV/qt6-webengine-os2-6.3.x/src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup --format iife -n InspectorOverlay --input gen/third_party/devtools-frontend/src/inspector_overlay/main.js --plugin ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/inspector_overlay/loadCSS.rollup.js
Then I get output...

If I then run terser on the generated js - then this works.... so it's something about running multiple plugins that's failing...

Edit2: hacked around this for now, by not running terser, and not checking the size of the generated js (terser is there to reduce the file size of the generated js)
Title: Re: Qt6 Development
Post by: Paul Smedley on February 28, 2023, 10:59:28 pm
Got an interesting build error this morning...
Code: [Select]
In file included from gen/third_party/blink/renderer/modules/canvas/canvas_jumbo_1.cc:11:
./../../../../../src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_image_source_util.cc:7:10: fatal error: ./../../../../../src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/third_party/blink/renderer/bindings/modules/v8/v8_union_cssimagevalue_htmlcanvaselement_htmli
mageelement_htmlvideoelement_imagebitmap_offscreencanvas_svgimageelement_videoframe.h: Result too large
    7 | #include "third_party/blink/renderer/bindings/modules/v8/v8_union_cssimagevalue_htmlcanvaselement_htmlimageelement_htmlvideoelement_imagebitmap_offscreencanvas_svgimageelement_videoframe.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

I'm assuming 'result too large' means the path is too long?
Title: Re: Qt6 Development
Post by: Mentore on March 01, 2023, 08:11:35 am
Hi Paul, not sure about this but the path showing the problem is long 268 characters. If I remember correctly, there is a 256 character limit in OS/2 CMD for paths, but I may be sorely mistaken...
Title: Re: Qt6 Development
Post by: Lars on March 01, 2023, 08:37:19 am
What's more, there is a systemwide 260 character limit (CCHMAXPATH) on any file path.

   /*************************************************************************\
   * CCHMAXPATH is the maximum fully qualified path name length including  *
   * the drive letter, colon, backslashes and terminating NULL.            *
   \*************************************************************************/
   #define CCHMAXPATH         260

Title: Re: Qt6 Development
Post by: Paul Smedley on March 01, 2023, 09:12:15 am
Thanks, glad my memory was correct - hacked around this for now by shortening the filename and changing the .cc file to use the shortened name. One day I'll work out how to automate this...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 02, 2023, 09:17:41 pm
I do wonder if I should add -mnoavx to https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/build/config/os2/BUILD.gn#L15 ?
Title: Re: Qt6 Development
Post by: Paul Smedley on March 02, 2023, 09:41:28 pm
Also, just noticed https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libyuv/include/libyuv/row.h#L47

GCC_HAS_AVX2 was definitely being set for OS/2

Edit: also in scale_row.h - and there are also 3 copies of these files - third_party/libaom, third_party/libvpx (not used right now) and third_party/libyux
Title: Re: Qt6 Development
Post by: Dave Yeo on March 02, 2023, 09:54:43 pm
I do wonder if I should add -mnoavx to https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/build/config/os2/BUILD.gn#L15 ?

Probably the more places that it is set, the better. If our kernel ever gets AVX support, it can be undone though GCC will still have alignment issues.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 02, 2023, 10:02:44 pm
I'll do a build with the libyuv changes first, then change the os2/build.gn - that will trigger a full rebuild which will take all day....
Title: Re: Qt6 Development
Post by: Dave Yeo on March 02, 2023, 10:56:45 pm
Isn't libyuv for raw video? In which case it is seldom used.
Quote
libyuv is an open source project that includes YUV scaling and conversion functionality. Scale YUV to prepare content for compression, with point, bilinear or box filter. Convert to YUV from webcam formats for compression. Convert to RGB formats for rendering/effects. Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.

Worth trying
Title: Re: Qt6 Development
Post by: Paul Smedley on March 03, 2023, 12:33:22 am
I'll do a build with the libyuv changes first, then change the os2/build.gn - that will trigger a full rebuild which will take all day....

rebuilding with -mno-avx now... [371/18295]
Title: Re: Qt6 Development
Post by: Paul Smedley on March 03, 2023, 04:33:38 am
Didn't get too much further - but confirmation we look to be using avx with libaom...
Code: [Select]
FAILED: obj/third_party/libaom/libaom_intrinsics_avx2/jnt_convolve_avx2.o
gcc -MMD -MF obj/third_party/libaom/libaom_intrinsics_avx2/jnt_convolve_avx2.o.d -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 -I../../../../../src/3rdparty/chromium/third_party/libaom/source/config -I../../../../../src/3rdparty/chromium/third_party/libaom/source/config/linux/ia32 -I../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom -mavx2 -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 -mno-avx -m32 -mfpmath=sse -msse3 -O2 -fomit-frame-pointer -g0 -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/third_party/libaom/source/libaom/av1/common/x86/jnt_convolve_avx2.c -o obj/third_party/libaom/libaom_intrinsics_avx2/jnt_convolve_avx2.o
In file included from C:/usr/lib/gcc/i686-pc-os2-emx/9/include/immintrin.h:53,
                 from ../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/av1/common/x86/jnt_convolve_avx2.c:12:
../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/aom_dsp/x86/convolve_avx2.h: In function 'prepare_coeffs_lowbd':
C:/usr/lib/gcc/i686-pc-os2-emx/9/include/avx2intrin.h:588:1: error: inlining failed in call to always_inline '_mm256_shuffle_epi8': target specific option mismatch
  588 | _mm256_shuffle_epi8 (__m256i __X, __m256i __Y)

Seems avx is enabled for all x86 processors...
https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/libaom/BUILD.gn#L232
Title: Re: Qt6 Development
Post by: Dave Yeo on March 03, 2023, 05:12:34 am
I think libaom is only used for encoding to AV1, as in WebRTC. Still good to fix.
Hopefully it checks for OS support, most libs do.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 03, 2023, 05:15:41 am
I think libaom is only used for encoding to AV1, as in WebRTC. Still good to fix.
Should check if it checks for OS support of fsave.
Similar problem in libvpx - which probably explains why it wasn't working....

(re)build is chugging along nicely now...
[2567/16253]

Some avx usage in webrtc too... stopped at [7136/16253] - resuming now after some more patching at [2/9098]
Title: Re: Qt6 Development
Post by: Paul Smedley on March 03, 2023, 09:28:37 pm
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.
Title: Re: Qt6 Development
Post by: Dave Yeo on March 03, 2023, 10:10:03 pm
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.

Bitwise just ended up limiting it to 2 jobs maximum.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 04, 2023, 12:24:22 am
The system ran out of memory wiht about 3k files to go. At some point I need to implement some logic in ninja to limit the number of processes based on free RAM - with 3 processes and complex c++ files, it's easy to exhaust 3+ GB of available RAM.

Bitwise just ended up limiting it to 2 jobs maximum.
Even 2 jobs can exhaust memory with QtWebEngine 6.2+ - and 3 jobs is much faster in the early part of the builds....

I might look at implementing https://github.com/maxim-kuvyrkov/ninja/commit/4d8acf64657145c1a36bd5eb9fcb502530b6967d for OS/2
Title: Re: Qt6 Development
Post by: Paul Smedley on March 04, 2023, 04:40:29 am
Initial implementation in https://github.com/psmedley/ninja-os2/commits/memload

Uggh dropped it in to start testing in hope of running with -j higher than 1 and got:
Code: [Select]
ninja: warning: bad deps log signature or version; starting over
I guess it recognised that ninja.exe had been rebuilt, so is now regenerating all ninja files, and starting over - hopefully it's smart enough to realise it doesn't need to rebuild most object files :(

Hoping it flies through some stuff.... [17/25039]
Title: Re: Qt6 Development
Post by: Dave Yeo on March 04, 2023, 05:54:46 am
What would be nice is a port of ccache, https://ccache.dev/ (https://ccache.dev/).
Title: Re: Qt6 Development
Post by: Paul Smedley on March 04, 2023, 08:17:43 am
What would be nice is a port of ccache, https://ccache.dev/ (https://ccache.dev/).

Quick n dirty port - https://smedley.id.au/tmp/ccache-4.7.4-os2-20230304.zip (just includes the .exe)
Title: Re: Qt6 Development
Post by: TeLLie on March 04, 2023, 09:52:28 am
Hi Paul,

I test it on vpx and set --enable-ccache

Killed by SIGABRT
pid=0x2b89 ppid=0x2b88 tid=0x0001 slot=0x00be pri=0x0200 mc=0x0001 ps=0x0010
H:\USR\LOCAL1220\BIN\CCACHE.EXE
Moved 2b84_01.TRP to C:\var\log\app\64031451-2b84_01-CCACHE-exceptq.txt
Creating 2B89_01.TRP
    [AR] libvpx_g.a
Moved 2b89_01.TRP to C:\var\log\app\64031451-2b89_01-CCACHE-exceptq.txt
    [LD] libvpx8.dll
    [AR] libvpxrc_g.a
    [AR] libgtest_g.a
    [CP] libvpx.a < libvpx_g.a
    [CP] libvpxrc.a < libvpxrc_g.a
    [CP] libgtest.a < libgtest_g.a
Title: Re: Qt6 Development
Post by: Paul Smedley on March 04, 2023, 09:59:28 am
Not terribly surprised, I only did enough to get ccache.exe -h to work....
Title: Re: Qt6 Development
Post by: Paul Smedley on March 04, 2023, 10:18:25 am
Note to self, got a few of these from ninja whilst processing ASM:
Code: [Select]
../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/aom_dsp/x86/subpel_variance_sse2.asm:43: warning: segment attributes specified on redeclar
ation of segment: ignoring [-w+other]
../../../../../src/3rdparty/chromium/third_party/libaom/source/libaom/aom_dsp/x86/subpel_variance_sse2.asm:141: ... from macro `SECTION_TEXT' defined here
Title: Re: Qt6 Development
Post by: Paul Smedley on March 05, 2023, 06:52:17 am
Thanks, glad my memory was correct - hacked around this for now by shortening the filename and changing the .cc file to use the shortened name. One day I'll work out how to automate this...

I'll raise an issue (https://github.com/psmedley/qt6-webengine-os2/issues/12) to remind me to get around to it, but the long filenames are contained in https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/third_party/blink/renderer/bindings/generated_in_modules.gni#L2523 Need to add some stuff to shorten these on os2, and adapt other source files that look for these extra long filenames.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 05, 2023, 08:58:36 am
Initial implementation in https://github.com/psmedley/ninja-os2/commits/memload

Uggh dropped it in to start testing in hope of running with -j higher than 1 and got:
Code: [Select]
ninja: warning: bad deps log signature or version; starting over
I guess it recognised that ninja.exe had been rebuilt, so is now regenerating all ninja files, and starting over - hopefully it's smart enough to realise it doesn't need to rebuild most object files :(

Hoping it flies through some stuff.... [17/25039]

Almost done.... [1173/1373]
Title: Re: Qt6 Development
Post by: Paul Smedley on March 09, 2023, 09:33:21 am
I love c++.... Whilst I'm waiting on qtwebengine 6.3.2 to build, I started working on getting the base libs of Qt 6.4.2 building...
Code: [Select]
In file included from include/QtCore/qmetacontainer.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qiterable.h:9,
                 from include/QtCore/qiterable.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qmetatype.h:15,
                 from include/QtCore/qmetatype.h:1,
                 from include/QtCore/../../../src/corelib/kernel/qobject.h:18,
                 from include/QtCore/qobject.h:1,
                 from include/QtCore/../../../src/corelib/io/qiodevice.h:10,
                 from include/QtCore/qiodevice.h:1,
                 from include/QtCore/../../../src/corelib/io/qfiledevice.h:7,
                 from include/QtCore/qfiledevice.h:1,
                 from include/QtCore/../../../src/corelib/io/qfile.h:8,
                 from include/QtCore/qfile.h:1,
                 from include/QtCore/../../../src/corelib/io/qfileinfo.h:7,
                 from include/QtCore/qfileinfo.h:1,
                 from ../src/gui/image/qabstractfileiconprovider.h:8,
                 from ../src/gui/image/qabstractfileiconprovider.cpp:4:
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h: In instantiation of 'constexpr const QtMetaContainerPrivate::QMetaSequenceInterface QMetaSequence::MetaSequence<QList<QSize> >::value':
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h:931:30:   required from 'static constexpr QMetaSequence QMetaSequence::fromContainer() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1644:75:   required from 'QIterable<QMetaSequence> QtPrivate::QSequentialIterableConvertFunctor<From>::operator()(const From&) const [with From = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:580:26:   required from 'static bool QMetaType::registerConverter(UnaryFunction) [with From = QList<QSize>; To = QIterable<QMetaSequence>; UnaryFunction = QtPrivate::QSequentialIterableConvertFunctor<QList<QSize> >]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1665:77:   required from 'static bool QtPrivate::SequentialValueTypeIsMetaType<T, true>::registerConverter() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1223:77:   required from 'int qRegisterNormalizedMetaTypeImplementation(const QByteArray&) [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:1252:56:   [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2376:70:   required from 'constexpr const QtPrivate::QMetaTypeInterface QtPrivate::QMetaTypeInterfaceWrapper<QList<QSize> >::metaType'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2468:12:   required from 'constexpr const QtPrivate::QMetaTypeInterface* QtPrivate::qMetaTypeInterfaceForType() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qmetatype.h:2495:61:   required from 'static constexpr QMetaType QMetaType::fromType() [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qvariant.h:593:50:   required from 'T qvariant_cast(const QVariant&) [with T = QList<QSize>]'
include/QtCore/../../../src/corelib/kernel/qvariant.h:350:30:   required from 'T QVariant::value() const [with T = QList<QSize>]'
../src/gui/image/qabstractfileiconprovider.cpp:67:52:   required from here
include/QtCore/../../../src/corelib/kernel/qmetacontainer.h:989:79: error: 'QtMetaContainerPrivate::QMetaSequenceInterface{QtMetaContainerPrivate::QMetaContainerInterface{0, QtMetaContainerPrivate::IteratorCapabilities{15}, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getSizeFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::SizeFn = int (*)(const void*); qsizetype = int]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getClearFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::ClearFn = void (*)(void*)]::<lambda(void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCreateIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CreateIteratorFn = void* (*)(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDestroyIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DestroyIteratorFn = void (*)(const void*)]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCompareIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CompareIteratorFn = bool (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCopyIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CopyIteratorFn = void (*)(void*, const void*)]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getAdvanceIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::AdvanceIteratorFn = void (*)(void*, int); qsizetype = int]::<lambda(void*, qsizetype)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDiffIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DiffIteratorFn = int (*)(const void*, const void*); qsizetype = int]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCreateConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CreateConstIteratorFn = void* (*)(const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDestroyConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DestroyIteratorFn = void (*)(const void*)]::<lambda(const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCompareConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CompareIteratorFn = bool (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getCopyConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::CopyIteratorFn = void (*)(void*, const void*)]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getAdvanceConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::AdvanceIteratorFn = void (*)(void*, int); qsizetype = int]::<lambda(void*, qsizetype)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getDiffConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaContainerInterface::DiffIteratorFn = int (*)(const void*, const void*); qsizetype = int]::<lambda(const void*, const void*)>::_FUN}, (& QtPrivate::QMetaTypeInterfaceWrapper<QSize>::metaType), QtMetaContainerPrivate::AddRemoveCapabilities{15}, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtIndexFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIndexFn = void (*)(const void*, int, void*); qsizetype = int]::<lambda(const void*, qsizetype, void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getSetValueAtIndexFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::SetValueAtIndexFn = void (*)(void*, int, const void*); qsizetype = int]::<lambda(void*, qsizetype, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getAddValueFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::AddValueFn = void (*)(void*, const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, const void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getRemoveValueFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::RemoveValueFn = void (*)(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)]::<lambda(void*, QtMetaContainerPrivate::QMetaContainerInterface::Position)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIteratorFn = void (*)(const void*, void*)]::<lambda(const void*, void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getSetValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::SetValueAtIteratorFn = void (*)(const void*, const void*)]::<lambda(const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getInsertValueAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::InsertValueAtIteratorFn = void (*)(void*, const void*, const void*)]::<lambda(void*, const void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getValueAtConstIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::ValueAtIteratorFn = void (*)(const void*, void*)]::<lambda(const void*, void*)>::_FUN, QtMetaContainerPrivate::QMetaContainerForContainer<C>::getEraseAtIteratorFn() [with EraseFn = void (*)(void*, const void*); C = QList<QSize>]::<lambda(void*, const void*)>::_FUN, QtMetaContainerPrivate::QMetaSequenceForContainer<C>::getEraseRangeAtIteratorFn() [with C = QList<QSize>; QtMetaContainerPrivate::QMetaSequenceInterface::EraseRangeAtIteratorFn = void (*)(void*, const void*, const void*)]::<lambda(void*, const void*, const void*)>::_FUN}' is not a constant expression
  989 |         static constexpr const QtMetaContainerPrivate::QMetaSequenceInterface value
      |                                                                               ^~~~~

Same code compiles fine on linux.... I guess something is missing for OS/2 in a header somewhere, but for the life of me, I can't work out what yet,....

Code (minus a few local commits) is at https://github.com/psmedley/qt6-base-os2/tree/6.4.x
Title: Re: Qt6 Development
Post by: Paul Smedley on March 10, 2023, 09:17:40 am
Seems the Qt 6.4.2 issue is somehow related to the use of dllimport....
#ifndef __OS2__
#    define Q_DECL_IMPORT     __declspec(dllimport)
#else
#    define Q_DECL_IMPORT
#endif
 gets past the build break.... g++ bug I guess...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 10, 2023, 11:57:36 pm
qtwebengine 6.3.x update: Might have finally found a way to work around too long filenames, waiting now to see what happens:

Qt 6.4.2 update: qtbase, qtmultimedia, qtshadertools, qtposition, qtsvg, qttools are built (not tested), building qtdeclarative now, then qtwebsockets and qtwebchannel. I won't even start thinking about qtwebengine until I have the webengine from 6.3.x built and in a similar state to the 6.2.4 webengine...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 11, 2023, 08:37:49 am
Qt 6.4.2 libs (excluding QtWebEngine) are built. There are some deprecation warnings compiling some of the OS/2 specific code that I need to take a look at...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 11, 2023, 08:39:08 am
qtwebengine 6.3.x update: Might have finally found a way to work around too long filenames, waiting now to see what happens:

Making progress - but still battling with the super long filenames...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 13, 2023, 09:56:59 am
qtwebengine 6.3.x update: Might have finally found a way to work around too long filenames, waiting now to see what happens:

Making progress - but still battling with the super long filenames...
OK, I fixed these, but I still have the problem where node.exe doesn't save any output.... Need to properly fix this.... This time, terser doesn't seem to be involved.

Testcase is:
Code: [Select]
C:/USR/BIN/python3 ../../../../../src/3rdparty/chromium/third_party/node/node.py ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/rollup/dist/bin/rollup --silent --config ../../../../../src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/rollup.config.js --input gen/third_party/devtools-frontend/src/front_end/core/protocol_client/protocol_client.prebundle.js --file gen/third_party/devtools-frontend/src/front_end/core/protocol_client/protocol_client.js --configDCHECK
Will have to determine if rollup needs patching, or if it's a problem with my nodejs port...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 14, 2023, 09:07:37 am
Seems to be my old friend 'terser' - disabling terser (by commenting out the references at https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/rollup.config.js#L83) seems to create the .js file (they'll just be bigger than they should/need to be).
Title: Re: Qt6 Development
Post by: Paul Smedley on March 14, 2023, 09:46:36 am
QtWebEngine 6.3.x is back to chugging along nicely.

I merged 6.4.2 code over the weekend - and that build is now at:
[59/25759] CXX obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o
FAILED: obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o

LONG way to go, and not planning on tacking it any more this evening, but work has commenced (Yes, before I even finished 6.3.x - I'll cherrypick any remaining fixed over to 6.4.x)
Title: Re: Qt6 Development
Post by: Paul Smedley on March 15, 2023, 09:13:47 am
QtWebEngine 6.3.x is back to chugging along nicely.

I merged 6.4.2 code over the weekend - and that build is now at:
[59/25759] CXX obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o
FAILED: obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o

LONG way to go, and not planning on tacking it any more this evening, but work has commenced (Yes, before I even finished 6.3.x - I'll cherrypick any remaining fixed over to 6.4.x)

Qt 6.4.2 - got about 500 or so files through the build, got a weird one now... the command:
Code: [Select]
C:/USR/BIN/python3 "../../../../../src/3rdparty/chromium/build/toolchain/gcc_link_wrapper.py" --output="./brotli.exe" -- g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"
fails with:
Code: [Select]
[4/25136] LINK ./brotli.exe
FAILED: brotli.exe
C:/USR/BIN/python3 "../../../../../src/3rdparty/chromium/build/toolchain/gcc_link_wrapper.py" --output="./brotli.exe" -- g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"   
g++: internal compiler error: Segmentation fault signal terminated program emxomfld.exe
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/bitwiseworks/gcc-os2/issues> for instructions.

popuplog.os2 has the following:
Code: [Select]
03-15-2023  17:36:32  SYS3175  PID 0dad  TID 0001  Slot 008a
C:\USR\BIN\EMXOMFLD.EXE
c0000005
1e4dcd05
P1=00000002  P2=00141000  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00140fa9  EBX=00000473  ECX=00000107  EDX=00000473
ESI=200cf255  EDI=00140ffd 
DS=0053  DSACC=d0f3  DSLIM=bfffffff 
ES=0053  ESACC=d0f3  ESLIM=bfffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1e4dcd05  CSACC=d0df  CSLIM=bfffffff
SS:ESP=0053:0013eee4  SSACC=d0f3  SSLIM=bfffffff
EBP=0013ef28  FLG=00010203

LIBCN0.DLL 0001:0008cd05

Of course, if I run 'g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"' directly - the command works fine, so perhaps it's an issue with python3's popen command....
Title: Re: Qt6 Development
Post by: Paul Smedley on March 15, 2023, 09:14:13 pm
QtWebEngine 6.3.x is back to chugging along nicely.
The compile completed last night. I now get the fun of working through missing symbols, where the chromium code has evolved and either hasn't been compiled for OS/2, or needs some adaptations for OS/2.

The list is quite long, but many of the symbol names are similar, so the solutions should fix multiple symbols with one change:

Tomorrow (Friday) is my day off, and with my still busted toe, there's not much I can do, so I'll try and work through these.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 16, 2023, 03:16:30 am
OK the initial list of missing symbols was due to the chromium code not being linked.

The current list is much better:
Code: [Select]
Error! E2028: __ZN8printing15PrintingContext6CreateEPNS0_8DelegateE is an undefined reference
Error! E2028: __ZN8printing15PrintedDocument21RenderPrintedDocumentEPNS_15PrintingContextE is an undefined reference
Error! E2028: __ZN5angle14GetCurrentTimeEv is an undefined reference
Error! E2028: _av_stream_get_first_dts is an undefined reference
Error! E2028: __ZN7content8internal26ChildProcessLauncherHelper40CreateNamedPlatformChannelOnClientThreadEv is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL14GetDisplayTypeEv is an undefined reference
Error! E2028: __ZN2gl4init26InitializeStaticGLBindingsENS_21GLImplementationPartsE is an undefined reference
Error! E2028: __ZN2ui23AddNativeCoreColorMixerEPNS_13ColorProviderEbb is an undefined reference
Error! E2028: __ZN2ui21AddNativeUiColorMixerEPNS_13ColorProviderEbb is an undefined reference
Error! E2028: __ZN2ui28AddNativePostprocessingMixerEPNS_13ColorProviderE is an undefined reference
Error! E2021: size of segment text exceeds 64k by 251243 bytes

I'll work through these starting tonight - also seems we have some new assembly code that's using 16bit code...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 16, 2023, 08:45:22 am
I'll hopefully be down to just _av_stream_get_first_dts shortly.

Plan is to build a new libavformat using the patch from https://aur.archlinux.org/cgit/aur.git/tree/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch?h=ffmpeg-intel-full-git

Edit: new plan is to backport the relevant parts of https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/427771
Title: Re: Qt6 Development
Post by: Paul Smedley on March 16, 2023, 10:15:00 am
OK, down to just:
Code: [Select]
weakld: error: Unresolved symbol (UNDEF) '__ZN8printing16GenerateHandlersEv'
Will aim to work it out tomorrow.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 16, 2023, 09:24:31 pm
We got a DLL :) More in the Testing thread and git checkins to come later today...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 18, 2023, 07:22:36 am
QtWebEngine 6.3.x is back to chugging along nicely.

I merged 6.4.2 code over the weekend - and that build is now at:
[59/25759] CXX obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o
FAILED: obj/base/allocator/partition_allocator/partition_alloc/page_allocator.o

LONG way to go, and not planning on tacking it any more this evening, but work has commenced (Yes, before I even finished 6.3.x - I'll cherrypick any remaining fixed over to 6.4.x)

Qt 6.4.2 - got about 500 or so files through the build, got a weird one now... the command:
Code: [Select]
C:/USR/BIN/python3 "../../../../../src/3rdparty/chromium/build/toolchain/gcc_link_wrapper.py" --output="./brotli.exe" -- g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"
fails with:
Code: [Select]
[4/25136] LINK ./brotli.exe
FAILED: brotli.exe
C:/USR/BIN/python3 "../../../../../src/3rdparty/chromium/build/toolchain/gcc_link_wrapper.py" --output="./brotli.exe" -- g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"   
g++: internal compiler error: Segmentation fault signal terminated program emxomfld.exe
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/bitwiseworks/gcc-os2/issues> for instructions.

popuplog.os2 has the following:
Code: [Select]
03-15-2023  17:36:32  SYS3175  PID 0dad  TID 0001  Slot 008a
C:\USR\BIN\EMXOMFLD.EXE
c0000005
1e4dcd05
P1=00000002  P2=00141000  P3=XXXXXXXX  P4=XXXXXXXX 
EAX=00140fa9  EBX=00000473  ECX=00000107  EDX=00000473
ESI=200cf255  EDI=00140ffd 
DS=0053  DSACC=d0f3  DSLIM=bfffffff 
ES=0053  ESACC=d0f3  ESLIM=bfffffff 
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:1e4dcd05  CSACC=d0df  CSLIM=bfffffff
SS:ESP=0053:0013eee4  SSACC=d0f3  SSLIM=bfffffff
EBP=0013ef28  FLG=00010203

LIBCN0.DLL 0001:0008cd05

Of course, if I run 'g++ -fstack-protector -Zomf -Zmap -Zhigh-mem -lcx -lintl -lpthread -m32 -Zstack 0x2000 -o "./brotli.exe"  @"./brotli.exe.rsp"' directly - the command works fine, so perhaps it's an issue with python3's popen command....

OK turns out this is something to do with the generated rsp (response files) - there were some changes to how they were generated in https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/build/toolchain/gcc_toolchain.gni#L671

Testing a fix/workaround/hack (pick 1) now...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 18, 2023, 09:56:41 am
Testing a fix/workaround/hack (pick 1) now...

Seems to be working - started with about 26000 objects - now at [3/16064]
Title: Re: Qt6 Development
Post by: Paul Smedley on March 19, 2023, 08:21:51 am
Testing a fix/workaround/hack (pick 1) now...

Seems to be working - started with about 26000 objects - now at [3/16064]

Further progress today with 6.4.x..... now at [327/10849] - so by my crude maths roughly 60% complete. Most changes in git, I still have a few local changes that need committing.

No time today to investigate 6.3.2

Edit: latest on Qt 6.4.x - [41/8972] - so about 65% complete.
Title: Re: Qt6 Development
Post by: Mentore on March 20, 2023, 08:09:19 am
Hype is killing me.  ;) ;D

Mentore
Title: Re: Qt6 Development
Post by: Paul Smedley on March 20, 2023, 09:02:53 am
Hype is killing me.  ;) ;D

Compilers are so slow ;) QtWebEngine 6.4.3 now at [2943/5834] - so about 2900 to go - or ~88% complete. Just got a build break though as I went to write this, will see how hard it is to fix!

Edit: easy one - just had to update some parts of tts_os2.cc to match the versions from other platforms.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 21, 2023, 03:33:23 am
OK - I'm back in trouble with  generated long filenames - for some reason the changes in https://github.com/psmedley/qt6-webengine-os2/commit/f31b948382714319d10f6e602d170e5198cb98e2 don't seem to be enough any more. Will investigate this evening.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 21, 2023, 06:53:18 am
OK operator error.... when I updated the tweaks to the python files to only run on OS/2 - I used 'os2emx' not 'os2knix' - so each fix....
Title: Re: Qt6 Development
Post by: Paul Smedley on March 21, 2023, 10:01:23 am
Status at PM 21st March - [397/1449] - nearly there :) Had to stub some functions in https://github.com/psmedley/qt6-webengine-os2/commit/4fa6f4bca2df665ddbaebd9aba258623e8bdc0cd#diff-cc2c94e34243ed90f8fb8d01c931f30835818dc27a48275bb911a144f5bbf065 (https://github.com/psmedley/qt6-webengine-os2/commit/4fa6f4bca2df665ddbaebd9aba258623e8bdc0cd#diff-cc2c94e34243ed90f8fb8d01c931f30835818dc27a48275bb911a144f5bbf065)  that I'm sure might cause us issues later :)

Hopefully will get to the point of trying to link a qt6webee.dll tomorrow.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 22, 2023, 04:50:10 am
Not too bad....
Executable Image: lib/Qt6WebEe.dll
creating an OS/2 EMX dynamic link library
Error! E2028: __ZN7content29ObserveKeySystemSupportUpdateEN4base17RepeatingCallbackIFvNS0_8flat_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN4mojo9StructPtrIN5media5mojom19KeySystemCapabilityEEESt4lessIvESt6vectorISt4pairIS8_SE_E!_XOWrf2 is an undefined reference
Error! E2028: __ZN5angle20GetCurrentSystemTimeEv is an undefined reference
Error! E2028: _av_stream_get_first_dts is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL14GetDisplayTypeEv is an undefined reference
Error! E2028: __ZN2gl4init26InitializeGLOneOffPlatformEy is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL15HasEGLExtensionEPKc is an undefined reference
Error! E2028: __ZN3net13TestRootCerts4InitEv is an undefined reference
Error! E2028: __ZN3net13TestRootCerts7AddImplEPNS_15X509CertificateE is an undefined reference
Error! E2028: __ZN3net13TestRootCerts9ClearImplEv is an undefined reference
Error! E2021: size of segment text exceeds 64k by 34299 bytes
Title: Re: Qt6 Development
Post by: Paul Smedley on March 22, 2023, 10:01:32 am
Now just down to...

Error! E2028: __ZN2gl12GLSurfaceEGL14GetDisplayTypeEv is an undefined reference
Error! E2028: __ZN2gl12GLSurfaceEGL15HasEGLExtensionEPKc is an undefined reference
Error! E2021: size of segment text exceeds 64k by 12539 bytes
Title: Re: Qt6 Development
Post by: Paul Smedley on March 22, 2023, 11:19:18 am
Nearly there... Got the main dll built then a build break...
Code: [Select]
{0}[u:\dev\qt6-webengine-os2-6.4.x\build] dir lib\*.dll

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

22/03/23  19:04     285,711,275      0  Qt6WebEe.dll
22/03/23  13:42         183,099      0  Qt6WebEl.dll
22/03/23  19:04         114,206      0  Qt6WebEs.dll
     286,008,580 bytes (272MB) in 3 files and 0 dirs
     286,011,392 bytes (272MB) allocated
  54,042,521,600 bytes (50GB) free

{0}[u:\dev\qt6-webengine-os2-6.4.x\build]

More tomorrow
Title: Re: Qt6 Development
Post by: Paul Smedley on March 22, 2023, 12:57:25 pm
Re: Qt 6.4.x

Code: [Select]
[109:1:0322/222035.678000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:8:0322/222037.341000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.

This is fixed in https://github.com/psmedley/qt6-webengine-os2/commit/991b4368107f343d2f237d6b5b1083cca79c38da

Doesn't fix the later crash in partition_alloc (Updated TRP attached for reference).
Title: Re: Qt6 Development
Post by: Paul Smedley on March 22, 2023, 01:30:35 pm
Attached trp from running maps.exe might be worth investigating - maps.exe still gives the shared memory error, but tries to load the maps...

Some interesting logs about certificates too:
Code: [Select]
[141:1:0322/225951.023000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[141:7:0322/225951.761000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.

Killed by SIGSEGV
pid=0x008e ppid=0x008d tid=0x0001 slot=0x008e pri=0x0200 mc=0x0001 ps=0x0010
U:\QT6\BIN\QTWEBENGINEPROCESS.EXE
cs:eip=17b89aa8:ffffc000      ss:esp=0000:00000000      ebp=00120053
 ds=0000      es=0000      fs=ffffffff      gs=0000     efl=00000000
eax=0012f418 ebx=1ffc9d7c ecx=0012f42c edx=0012f450 edi=0012fd34 esi=0012fd5c
Creating 008E_01.TRP
[141:5:0322/225952.324000:ERROR:cert_verify_proc_builtin.cc(603)] No net_fetcher for performing AIA chasing.
[141:5:0322/225952.326000:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for maps.google.com failed:
----- Certificate i=2 (CN=GTS Root R1,O=Google Trust Services LLC,C=US) -----
ERROR: No matching issuer found


[141:15:0322/225952.335000:ERROR:ssl_client_socket_impl.cc(999)] handshake failed; returned -1, SSL error code 1, net_error -202
[141:15:0322/225952.335000:ERROR:ssl_client_socket_impl.cc(999)] handshake failed; returned -1, SSL error code 1, net_error -202
Moved 008e_01.TRP to C:\var\log\app\641b8868-008e_01-QTWEBENGINEPROCESS-exceptq.txt

Killed by SIGSEGV
pid=0x008f ppid=0x008d tid=0x0001 slot=0x0090 pri=0x0200 mc=0x0001 ps=0x0010
U:\QT6\BIN\QTWEBENGINEPROCESS.EXE
cs:eip=17b89aa8:ffffc000      ss:esp=0000:00000000      ebp=00120053
 ds=0000      es=0000      fs=ffffffff      gs=0000     efl=00000000
eax=0012f418 ebx=1ffc9d7c ecx=0012f42c edx=0012f450 edi=0012fd34 esi=0012fd5c
Creating 008F_01.TRP
Moved 008f_01.TRP to C:\var\log\app\641b8869-008f_01-QTWEBENGINEPROCESS-exceptq.txt
Creating 008D_01.TRP
Creating 008D_01.TRP
Title: Re: Qt6 Development
Post by: Andy Willis on March 23, 2023, 12:53:30 am
OK, we now have DLLs but it's not working yet:
Code: [Select]
[109:1:0322/222035.678000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:8:0322/222037.341000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:1:0322/222037.875000:ERROR:system_network_context_manager.cpp(274)] Cannot use V8 Proxy resolver in single process mode.
[109:1:0322/222037.892000:ERROR:system_network_context_manager.cpp(274)] Cannot use V8 Proxy resolver in single process mode.

I get the second pair with the current code.  I find that if I disable single process mode that I then have a better chance of loading pages but the system _will_ lock up much faster.

I'm not too worried about the second pair of messages, but the former sounds more serious. I'll have to go look at the code at https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/mojo/core/shared_buffer_dispatcher.cc#L298

Edit: Seems like due to my copy of posix code in https://github.com/psmedley/qt6-webengine-os2/commit/fe6e0638c422e146cb2379bf6a275d668b144edd#diff-0b0cccfdd90d1b8b3e0eced8a42e148326a514e6b73c3eea1435b488abe39e9b
Title: Re: Qt6 Development
Post by: Paul Smedley on March 23, 2023, 01:10:55 am
Yeah there is a reason dmitry make single process mode the default ;) I assume my current code you mean 6.3.2?

I may have found the problem causing the trap - the changes in https://github.com/psmedley/qt6-webengine-os2/commit/feb87f70dac13bb5b805fbd271e1ac98568ec062#diff-6d3616171ce7881cc8d3a757c2f9b476d645e4c61df77cdf47a5bf7a423bf56c - specifically the implementation of DecommitAndZeroSystemPagesInternal() is clearly wrong. I should have actually read the original code and the fix (I think) is pretty obvious and much simpler using   PA_CHECK(MyDosSetMem(reinterpret_cast<void*>(address), length, PAG_DECOMMIT));

Linking a new DLL now.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 23, 2023, 09:42:05 am
This didn't fix it. I also remembered today about https://github.com/psmedley/qt6-webengine-os2/issues/9 - this may be the cause of issues with Qt >= 6.3 - will need to do some research on what the equivalent code on OS/2 might look like.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 23, 2023, 09:47:12 am
This didn't fix it. I also remembered today about https://github.com/psmedley/qt6-webengine-os2/issues/9 - this may be the cause of issues with Qt >= 6.3 - will need to do some research on what the equivalent code on OS/2 might look like.

Gotta love google - I searched for 'NtCurrentTeb())->StackBase)' (ie the windows code) and found https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc#L163 - I'll steal the os2 code and add it to https://github.com/psmedley/qt6-webengine-os2/blob/6.3.x/src/3rdparty/chromium/base/allocator/partition_allocator/starscan/stack/stack.cc#L55
Title: Re: Qt6 Development
Post by: Paul Smedley on March 23, 2023, 09:45:17 pm
OK, fixing that didn't change the Trap in QtWebEngine 6.3.x, rebuilding a new 6.4.x DLL to see if it makes any difference there.

Edit: Nope, it didn't, but at least it's one less thing to implement later.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 24, 2023, 02:21:47 am
Interesting, just realised that qt 6.4.x isn't detecting/using NSS - which is why I'm seeing SSL errors, as there is no other code path to utilise. I wonder what's changed? Perhaps the rpm nss is too old?
Title: Re: Qt6 Development
Post by: Dave Yeo on March 24, 2023, 02:39:43 am
Probably does need an up to date NSS.
I tried building the RPM, for some reason my environment was rejecting the directive to use the git repository.
Last time I tried doing the proper build, I ran into problems which I now forget. It was a weird build method, build NSPR4, then use that build system to build NSS.
I believe the OS/2 code hasn't been removed from NSPR4 and NSS yet, but Bitwise patched it quite a bit. NSPR4 is sort of a universal libc.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 24, 2023, 03:06:15 am
Easier fix than that - see https://github.com/psmedley/qt6-webengine-os2/commit/bad7d9af5f7aa34d3cd985d4143c90f2832c1665
Title: Re: Qt6 Development
Post by: Dave Yeo on March 24, 2023, 03:55:04 am
Easier fix than that - see https://github.com/psmedley/qt6-webengine-os2/commit/bad7d9af5f7aa34d3cd985d4143c90f2832c1665

Yes, much simpler
Title: Re: Qt6 Development
Post by: Paul Smedley on March 24, 2023, 05:40:27 am
I cant believe I missed the fact that file moved and needed to be updated. Oh well. Now I have the fun of waiting for almost 11000 files to rebuild!
Title: Re: Qt6 Development
Post by: Paul Smedley on March 25, 2023, 08:34:04 am
Re: Qt 6.4.x

Code: [Select]
[109:1:0322/222035.678000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
[109:8:0322/222037.341000:ERROR:shared_buffer_dispatcher.cc(298)] Failed to map shared memory region.
This is fixed in https://github.com/psmedley/qt6-webengine-os2/commit/991b4368107f343d2f237d6b5b1083cca79c38da

Doesn't fix the later crash in partition_alloc (Updated TRP attached for reference).
Title: Re: Qt6 Development
Post by: Paul Smedley on March 26, 2023, 09:23:13 am
Not sure it's the problem, but came across a hack in https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/hash_table.h#L612 that I'd forgotten about. Turns out this is a bug in GCC that corrected in 9.3.0

Currently building 9.5.0 based on the bww patches and will see how it goes...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 26, 2023, 10:19:22 am
OK 9.5.0 is built and the source builds without the kludge now - whether it will help with the crash I was seeing is another matter.

I also need to workout how I can easily distribute the build - 'make install' put it into my %unixroot% but I've always struggled with how to package anything that installs in /usr

Edit: something is janky with this build - causes the system to run out of ram. wonder if -Zhigh-mem wasn't used as a link option?

Will rebuild with manually forcing LDFLAGS to include -Zhigh-mem....
Title: Re: Qt6 Development
Post by: Dave Yeo on March 26, 2023, 09:08:11 pm
Can you build with a prefix of qt6 or /qt6? For now, that seems the best way to keep it separate from @unixroot
Title: Re: Qt6 Development
Post by: Paul Smedley on March 26, 2023, 09:58:42 pm
Can you build with a prefix of qt6 or /qt6? For now, that seems the best way to keep it separate from @unixroot

I'm actually now not so certain it was the gcc version causing the issues - I reset GCC to the rpm version, and still got errors. I'd also been messing around yesterday on that box wih replacing the i686 versions of libs with the pentium4 ones - so maybe something go screwed up there too.

Perhaps I'll install to @unixroot/usr950 or something to keep it seperate - or just to @unixroot/usr/local ?
Title: Re: Qt6 Development
Post by: Dave Yeo on March 26, 2023, 11:56:30 pm
Can you build with a prefix of qt6 or /qt6? For now, that seems the best way to keep it separate from @unixroot

I'm actually now not so certain it was the gcc version causing the issues - I reset GCC to the rpm version, and still got errors. I'd also been messing around yesterday on that box wih replacing the i686 versions of libs with the pentium4 ones - so maybe something go screwed up there too.

Perhaps I'll install to @unixroot/usr950 or something to keep it seperate - or just to @unixroot/usr/local ?

Sorry, got confused between Qt and GCC. @unixroot/usr950 or back to @unixroot/local950, nice to have co-existence between different versions as well as the choice of what is on the PATH, @unixroot/usr/local is usually on the PATH, LIBPATH and ahead of @unixroot/usr.
Title: Re: Qt6 Development
Post by: KO Myung-Hun on March 27, 2023, 03:26:09 am
Can you build with a prefix of qt6 or /qt6? For now, that seems the best way to keep it separate from @unixroot

I'm actually now not so certain it was the gcc version causing the issues - I reset GCC to the rpm version, and still got errors. I'd also been messing around yesterday on that box wih replacing the i686 versions of libs with the pentium4 ones - so maybe something go screwed up there too.

Perhaps I'll install to @unixroot/usr950 or something to keep it seperate - or just to @unixroot/usr/local ?

I want to vote to /usr/local950 as you did usually or @unixroot/usr/local950.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 27, 2023, 10:45:27 am
https://smedley.id.au/tmp/gcc-9.5.0-os2-20230327.zip - install on same drive as rpm is installed - all files in usr/local950

To use this GCC (9.5.0) in place of rpm version (9.2.0) - should just need to add %UNIXROOT%\usr\local950\bin to the front of the path....

Be interesting to see if others see the SYS0147 error I was seeing - or if that's something peculiar to the AOS install I'm testing on.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 27, 2023, 12:16:47 pm
OK - got the SYS error on another box - pretty sure something isn't using high-mem, so it's exhausting the 512mb ram.... will investigate tomorrow...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 27, 2023, 10:02:27 pm
Weird.... - Zhigh-mem is definitely being used....
Code: [Select]
g++ -no-pie -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Zomf -Zstack 8192 -Zhigh-mem -o cc1plus.exe \
      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/method.o cp/name-lookup.o cp/optimize.o cp/parser.o cp/pt.o cp/ptree.o cp/repo.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o emx-cxx.o default-c.o cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl  ../libbacktrace/.libs/backtrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp   -lz
&
Code: [Select]
g++ -fno-PIE -c -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Ic-family -I../.././gcc -I../.././gcc/c-family -I../.././gcc/../include -I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace   -o c-family/cppspec.o -MT c-family/cppspec.o -MMD -MP -MF c-family/.deps/cppspec.TPo ../.././gcc/c-family/cppspec.c
g++ -no-pie -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Zomf -Zstack 8192 -Zhigh-mem -o cpp.exe gcc.o gcc-main.o ggc-none.o \
  c-family/cppspec.o driver-i386.o emx-driver.o libcommon-target.a \
   libcommon.a ../libcpp/libcpp.a -lintl  ../libbacktrace/.libs/backtrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
Title: Re: Qt6 Development
Post by: KO Myung-Hun on March 28, 2023, 02:16:49 am
Weird.... - Zhigh-mem is definitely being used....
Code: [Select]
g++ -no-pie -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Zomf -Zstack 8192 -Zhigh-mem -o cc1plus.exe \
      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o cp/constraint.o cp/cp-gimplify.o cp/cp-objcp-common.o cp/cp-ubsan.o cp/cvt.o cp/cxx-pretty-print.o cp/decl.o cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/method.o cp/name-lookup.o cp/optimize.o cp/parser.o cp/pt.o cp/ptree.o cp/repo.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o emx-cxx.o default-c.o cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl  ../libbacktrace/.libs/backtrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp   -lz
&
Code: [Select]
g++ -fno-PIE -c -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Ic-family -I../.././gcc -I../.././gcc/c-family -I../.././gcc/../include -I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace   -o c-family/cppspec.o -MT c-family/cppspec.o -MMD -MP -MF c-family/.deps/cppspec.TPo ../.././gcc/c-family/cppspec.c
g++ -no-pie -Zstack 8192 -Zhigh-mem  -g  -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Zomf -Zstack 8192 -Zhigh-mem -o cpp.exe gcc.o gcc-main.o ggc-none.o \
  c-family/cppspec.o driver-i386.o emx-driver.o libcommon-target.a \
   libcommon.a ../libcpp/libcpp.a -lintl  ../libbacktrace/.libs/backtrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a

I encountered the similar problem. And it was because of the DLLs which are not linked with -Zhigh-mem. Check DLL dependencies of your gcc and ensure that they are linked with -Zhigh-mem.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 28, 2023, 04:28:39 am
Thanks for the tip, will investigate tonight.
Title: Re: Qt6 Development
Post by: Paul Smedley on March 28, 2023, 11:47:30 pm
Looks like the libtool generated DLL's didn't have -Zhigh-mem - testing now...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 28, 2023, 11:52:53 pm
Early indications are that this build is good... https://smedley.id.au/tmp/gcc-9.5.0-os2-20230329.zip

Couple of notes on using with this an existing rpm setup:
Code: [Select]
set LIBPATHSTRICT=T
set path=c:\usr\local950\bin;%path%
set beginlibpath=c:\usr\local950\lib

LIBPATHSTRICT and beginlibpath are required due to additional exports in STDCPP6.DLL that aren't present in the 9.2.0 version
Title: Re: Qt6 Development
Post by: Paul Smedley on March 29, 2023, 11:27:01 am
Confirming that this one works nicely with an rpm environment. Building a 12.2.0 build now that installs into /@unixroot/usr/local1220 for better compatability with an rpm env
Title: Re: Qt6 Development
Post by: Paul Smedley on March 29, 2023, 08:59:10 pm
https://smedley.id.au/tmp/gcc-12.2.0-os2-20230330.zip - testing now with building qt6 base with it...
Title: Re: Qt6 Development
Post by: Paul Smedley on March 30, 2023, 10:57:28 pm
https://smedley.id.au/tmp/gcc-12.2.0-os2-20230330.zip - testing now with building qt6 base with it...
FWIW - all of Qt 6.4.3 has been rebuilt with this build except for the webengine. webengine is at [10054/24001]

Updating the compiler probably won't fix anything,  but you never know :)
Title: Re: Qt6 Development
Post by: Paul Smedley on April 01, 2023, 01:18:52 am
OK qtwebengine is rebuilt with gcc 12.2.0 and the crash is very similar.. (see attached)
Title: Re: Qt6 Development
Post by: Paul Smedley on April 01, 2023, 03:42:29 am
I have some clues on what's wrong with the webengine on 6.4.3, more later

I tried running qtwebengineprocess from a command line with --help and got an error about no OpenGL implementation being available. That reminded me of some hack I made in some of the OpenGL code. I've now reverted those hacks and will attempt to fix another way.

Depending how sore my foot is this afternoon, I hope to have more updates in a few hours.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 01, 2023, 06:05:07 am
OK cleaned some things up, but it didn't help the TRP :(
Title: Re: Qt6 Development
Post by: Paul Smedley on April 02, 2023, 12:32:48 am
Whilst I seek inspiration to resolve the issues with QtWebEngine - I'm back to trying to resolve issues with the 'workerscriptplugin'.

You'll note that some of the examples give an error:
Code: [Select]
QQmlApplicationEngine failed to load component
qrc:/qml/Main.qml:7:1: module "QtQml.WorkerScript" plugin "workerscriptplugin" not found

With some hacks, this error is now:
Code: [Select]
"qrc:/window/window.qml:4 module \"QtQml.WorkerScript\" plugin \"workersnplugin\" not found\n"

So I just need to find where "plugin" is being appended and this may then work.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 02, 2023, 06:34:51 am
Sorta progress...
Code: [Select]
"qrc:/window/window.qml:4 module \"QtQml.WorkerScript\" plugin \"workersn\" not found\n"

So now the DLL name is correct but it's still not found!
Title: Re: Qt6 Development
Post by: Paul Smedley on April 04, 2023, 10:02:52 am
Updated GCC 12.2.0 build, which is compatible with rpm. https://smedley.id.au/tmp/gcc-12.2.0-os2-20230404.zip

Only changes are to cxx11::filesystem support to better support drive letters. This avoids errors like:
Code: [Select]
  syncqt.cpp failed for module QtCore:
  terminate called after throwing an instance of
  'std::filesystem::__cxx11::filesystem_error'
    what():  filesystem error: cannot make canonical path: No such file or directory [U:/dev/qt6-base-os2-6.5.x/build]

Qt Base 6.5.0 now builds, and at least rasterwindow.exe still works.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 04, 2023, 01:04:52 pm
For interest, https://www.qt.io/blog/qt-6.5-lts-released details the changes in Qt 6.5
Title: Re: Qt6 Development
Post by: Paul Smedley on April 05, 2023, 05:32:21 am
Qt6 6.5 is built, with the exception of the WebEngine. https://smedley.id.au/tmp/qt6-6.5.0-os2-20230405.zip has some binaries. Literally the only .exe I've tested is the raster window example.

Installation is in /qt6-6.5 to make it easier to test multiple versions. Make sure /qt6-6.5/bin is in path; and /qt6-6.5/lib is in libpath.

config.summary from Qt6 6.5 Webengine is attached. Haven't tried to start the compile yet.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 05, 2023, 08:55:53 am
QtWebEngine 6.5 status:
[538/26354] CXX obj/third_party/icu/bundled_icui18n/choicfmt.o

FWIW, this is based on:
Based on Chromium version:                                      108.0.5359.181
Patched with security patches up to Chromium version:           110.0.5481.104
Title: Re: Qt6 Development
Post by: Paul Smedley on April 05, 2023, 11:56:55 am
Quick update.

Reasonable progress this evening, started with 26354 files to build - as of a few minutes ago, after several build breaks and restarts, it's at [504/16606] - so 16102 files to go, or roughly 40% complete.

Depending how I'm feeling, I'll resume work over the weekend. Github is up to date with source for all modules in the respective 6.5.x branches.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 05, 2023, 10:12:15 pm
Morning update, it broke not long after I stopped watching, but the fixes were pretty easy. Resumed now and at: [1351/15183]

Edit: it broke not long after I posted:
Code: [Select]
[1818/15183] ACTION //net/http:generate_transport_security_state(//build/toolchain/os2:x86)
FAILED: gen/net/http/transport_security_state_static.h
C:/USR/BIN/python3 ../../../../../src/3rdparty/chromium/build/gn_run_binary.py transport_security_state_generator.exe ../../../../../src/3rdparty/chromium/net/http/transport_security_state_static.json.gz ../../../../../src/3rdparty/chromium/net/http/transport_security_state_static.pins ../../../../../src/3rdparty/chromium/net/http/transport_security_state_static.template gen/net/http/transport_security_state_static.h
[0406/044316.939000:ERROR:transport_security_state_generator.cc(94)] Pinset swehackCom references pin Swehack which doesn't exist
[0406/044316.939000:ERROR:transport_security_state_generator.cc(296)] Checks failed. Aborting.
transport_security_state_generator.exe failed with exit code 1
Title: Re: Qt6 Development
Post by: David McKenna on April 05, 2023, 10:40:26 pm
 Paul,

  Testing the 6.5 build now... Scribus works, but Dooble doesn't, going thru the examples everything that used to work in previous versions still does (so far) and same with everything that didn't work before.

  Good luck with your surgery!

Regards,
Title: Re: Qt6 Development
Post by: Andy Willis on April 06, 2023, 02:38:17 am
xpdf is working with 6.5
Title: Re: Qt6 Development
Post by: Paul Smedley on April 06, 2023, 02:53:12 am
Out of surgery and in recovery now.
Title: Re: Qt6 Development
Post by: Martin Iturbide on April 06, 2023, 03:06:58 am
xpdf is working with 6.5

Hi Andy.
Please post the binaries to test it out. I don't know where those are.

Regards
Title: Re: Qt6 Development
Post by: Martin Iturbide on April 06, 2023, 03:07:19 am
Out of surgery and in recovery now.
Get well soon Paul !!!
Title: Re: Qt6 Development
Post by: Paul Smedley on April 06, 2023, 09:57:25 am
  Testing the 6.5 build now... Scribus works, but Dooble doesn't, going thru the examples everything that used to work in previous versions still does (so far) and same with everything that didn't work before.

NO real surprise that some stuff built for 6.2 doesn't work with the 6.5 DLLs - when the time is right, I'll rebuild everything against 6.5
Title: Re: Qt6 Development
Post by: Mentore on April 06, 2023, 10:05:41 am
Out of surgery and in recovery now.

Get well soon, Paul!
Mentore
Title: Re: Qt6 Development
Post by: Paul Smedley on April 06, 2023, 11:58:23 am
Fixed/hacked a few things today - now at [21/11254] so about 57% complete
Title: Re: Qt6 Development
Post by: Paul Smedley on April 06, 2023, 11:34:02 pm
[705/7826] - most significant hacks have been for missing EGL code - see https://github.com/psmedley/qt6-webengine-os2/issues/14

I'll expand on that ticket in due course. For now I'll just been wrapping the affected code if #ifdef USE_EGL - but I'm sure that's not the best path forward. The missing code seems to be in one of 4 or five egl.h headers, but I'm not sure which is appropriate for our software GL.

Will revisit this stuff once the rest of the code is built, and compare to the 6.3/6.4 code to better understand what's changed.

Title: Re: Qt6 Development
Post by: Paul Smedley on April 07, 2023, 10:54:49 pm
Saturday morning status: [1/1817]
Title: Re: Qt6 Development
Post by: Paul Smedley on April 08, 2023, 03:02:53 am
About 500 files to go and I get the following:
Code: [Select]
{1}[u:\dev\qt6-webengine-os2-6.5.x\build\src\core\release\i386] mksnapshot --tur
bo_instruction_scheduling --target_os=os2 --target_arch=x86 --embedded_src gen/v
8/embedded.S --embedded_variant Default --random-seed 314159265 --startup_src ge
n/v8/snapshot.cc --no-native-code-counters
Assertion failed: _UM_LUMP_STATUS (olump) == _UMS_FREE, file ./libc-0.1.10/src/emx/src/lib/malloc/ialloc.c, line 116

Killed by SIGABRT
pid=0x33b0 ppid=0x0041 tid=0x0001 slot=0x007d pri=0x0200 mc=0x0001 ps=0x0010
U:\DEV\QT6-WEBENGINE-OS2-6.5.X\BUILD\SRC\CORE\RELEASE\I386\MKSNAPSHOT.EXE
Creating 33B0_01.TRP
Moved 33b0_01.TRP to C:\var\log\app\64313478-33b0_01-MKSNAPSHOT-exceptq.txt

Edit: Cheated for now and replaced mksnapshot with the version from Qt 6.4.x
Title: Re: Qt6 Development
Post by: Paul Smedley on April 08, 2023, 04:28:01 am
OK the chromium code is built (not withstanding the comments above) time to try and make a DLL...

Better than expected....
Code: [Select]
FAILED: lib/Qt6WebEe.dll lib/Qt6WebEngineCore_dll.a
: && echo LIBRARY \"Qt6WebEe\" INITINSTANCE TERMINSTANCE > lib/Qt6WebEe.dll.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 05 Apr 2023 12:17:02\ \ \ \ \ ARCAOS-F0FD356::::0::@@WebEngineCore\" >> lib/Qt6WebEe.dll.def && echo DATA MULTIPLE NONSHARED >> lib/Qt6WebEe.dll.def && c:/usr/local1220/bin/c++.exe -DNDEBUG -O2    -Zomf -Zmap -Zdll -Zlinker DISABLE -Zlinker 1121 -lcx   @src/core/Release/i386/QtWebEngineCore_objects.rsp @src/core/Release/i386/QtWebEngineCore_archives.rsp @src/core/Release/i386/QtWebEngineCore_libs.rsp -shared -o lib/Qt6WebEe.dll  src/core/api/CMakeFiles/WebEngineCore.dir/WebEngineCore_autogen/mocs_compilation.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qtwebenginecoreglobal.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginecertificateerror.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineclientcertificateselection.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineclientcertificatestore.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginecontextmenurequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginecookiestore.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginedownloadrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginefilesystemaccessrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginefindtextresult.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginefullscreenrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginehistory.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginehttprequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineloadinginfo.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginemessagepumpscheduler.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginenavigationrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginenewwindowrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginenotification.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginepage.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineprofile.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginequotarequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineregisterprotocolhandlerrequest.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginescript.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginescriptcollection.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebenginesettings.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineurlrequestinfo.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineurlrequestjob.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineurlscheme.cpp.o src/core/api/CMakeFiles/WebEngineCore.dir/qwebengineurlschemehandler.cpp.o  -lssp -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil c:/usr/local/lib/libvpx.lib  U:/qt6-6.5/lib/Qt6Quick_dll.a  U:/qt6-6.5/lib/Qt6Gui_dll.a  U:/qt6-6.5/lib/Qt6QmlModels_dll.a  U:/qt6-6.5/lib/Qt6WebChannel_dll.a  U:/qt6-6.5/lib/Qt6Qml_dll.a  U:/qt6-6.5/lib/Qt6Network_dll.a  U:/qt6-6.5/lib/Qt6Positioning_dll.a  U:/qt6-6.5/lib/Qt6Core_dll.a  -lpthread lib/Qt6WebEe.dll.def && emximp -o lib/Qt6WebEngineCore_dll.a lib/Qt6WebEe.dll && :
weakld: error: Unresolved symbol (UNDEF) '__ZN2gl13GetDisplayEGLEy'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\ui\gl\init\libgl_init.a(init_jumbo_1.o)
weakld: error: Unresolved symbol (UNDEF) '__ZN2gl4init41InitializeExtensionSettingsOneOffPlatformEPNS_9GLDisplayE'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\ui\gl\init\libgl_init.a(init_jumbo_1.o)
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\gpu\ipc\service\libgpu_ipc_service.a(service_jumbo_1.o)
weakld: error: Unresolved symbol (UNDEF) '__ZN2gl4init34CreateOffscreenGLSurfaceWithFormatEPNS_9GLDisplayERKN3gfx4SizeENS_15GLSurfaceFormatE'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\ui\gl\init\libgl_init.a(init_jumbo_1.o)
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\gpu\ipc\service\libgpu_ipc_service.a(service_jumbo_1.o)
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\components\viz\service\libservice.a(service_jumbo_7.o)
weakld: error: Unresolved symbol (UNDEF) '__ZN2v88internal8Snapshot20ShouldVerifyChecksumEPKNS_11StartupDataE'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\v8\v8_base_without_compiler\v8_base_without_compiler_jumbo_52.o
weakld: error: Unresolved symbol (UNDEF) '__ZN2gl4init18ShutdownGLPlatformEPNS_9GLDisplayE'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\ui\gl\init\libgl_init.a(init_jumbo_1.o)
weakld: error: Unresolved symbol (UNDEF) '__ZN2gl4init19CreateViewGLSurfaceEPNS_9GLDisplayEm'.
weakld: info: The symbol is referenced by:
    U:\dev\qt6-webengine-os2-6.5.x\build\src\core\Release\i386\obj\gpu\ipc\service\libgpu_ipc_service.a(service_jumbo_2.o)
Ignoring unresolved externals reported from weak prelinker.
ninja: build stopped: subcommand failed.

As suspected, mostly related to opengl...
Title: Re: Qt6 Development
Post by: Paul Smedley on April 09, 2023, 12:36:48 am
OK I got a DLL :) and some TRPs to go with it :) (attached)

The maps.exe one seems to be OpenGL related (not surprisingly) the second looks more straightforward
Title: Re: Qt6 Development
Post by: Paul Smedley on April 09, 2023, 04:18:42 am
About 500 files to go and I get the following:
Code: [Select]
{1}[u:\dev\qt6-webengine-os2-6.5.x\build\src\core\release\i386] mksnapshot --tur
bo_instruction_scheduling --target_os=os2 --target_arch=x86 --embedded_src gen/v
8/embedded.S --embedded_variant Default --random-seed 314159265 --startup_src ge
n/v8/snapshot.cc --no-native-code-counters
Assertion failed: _UM_LUMP_STATUS (olump) == _UMS_FREE, file ./libc-0.1.10/src/emx/src/lib/malloc/ialloc.c, line 116

Killed by SIGABRT
pid=0x33b0 ppid=0x0041 tid=0x0001 slot=0x007d pri=0x0200 mc=0x0001 ps=0x0010
U:\DEV\QT6-WEBENGINE-OS2-6.5.X\BUILD\SRC\CORE\RELEASE\I386\MKSNAPSHOT.EXE
Creating 33B0_01.TRP
Moved 33b0_01.TRP to C:\var\log\app\64313478-33b0_01-MKSNAPSHOT-exceptq.txt

Edit: Cheated for now and replaced mksnapshot with the version from Qt 6.4.x

OK so this wasn't the best solution. Worked through a couple of other issues and now get:
Code: [Select]
# Fatal error in , line 0
# Version mismatch between V8 binary and snapshot.
#   V8 binary version: 10.8.168.25
#    Snapshot version: 10.2.154.17
# The snapshot consists of 288000 bytes and contains 1 context(s).
#
#
#
#FailureMessage Object: 0x12f104
Killed by SIGTRAP
Title: Re: Qt6 Development
Post by: Andy Willis on April 09, 2023, 09:29:23 pm
xpdf is working with 6.5

Hi Andy.
Please post the binaries to test it out. I don't know where those are.

Regards

Ha!  I was able to sneak something past you!  :-) :-)
https://www.os2world.com/forum/index.php/topic,3252.msg38877/topicseen.html#msg38877
Title: Re: Qt6 Development
Post by: Paul Smedley on April 13, 2023, 12:30:47 am
Sometimes it pays to not look at something for a few days. Finally, I noticed some differences that needed implementing in page_allocator_internals_os2.h and got past the previous trap (in Qt 6.4.3).

Commits in https://github.com/psmedley/qt6-webengine-os2/commit/f49a4993adc8f58091a7396dfe91dda1252ce874 - the key fix was the first section, adding the additional cases
New TRP attached which I'll investigate shortly.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 13, 2023, 11:05:11 am
Some analysis from Steven on the latest trp that I'm still digesting...
Code: [Select]
>> Is this an alignment problem?
> Not sure yet. The trap appears to be happening at
> https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/parkable_image_manager.cc#L33

> but not sure why yet...

FWIW, the caller is:

  src\3rdparty\chromium\third_party\blink\renderer\platform\exported\platform.cc:251
    base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
        &ParkableImageManager::Instance(), "ParkableImages",
        base::ThreadTaskRunnerHandle::Get());

I think the generated code in the constructor is trying implement a "fast
memset" to clear the instance object.  The PXOR clears the XMM0 and the
MOVAPS instructions zero 16-byte chunks of memory.  This is going to be
faster than the rep movsd we typically see.

The problem here is that 0xfb31248 needs to be 16-byte aligned and it's
not.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 13, 2023, 12:36:20 pm
Not sure where else to post it, but I'm in the midst of changing ISP so the website is currently offline. Will hopefully be back online in the next few hours.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 13, 2023, 05:03:18 pm
Should be back up now, DNS has been updated
Title: Re: Qt6 Development
Post by: Martin Iturbide on April 13, 2023, 05:40:03 pm
Hi Paul

I confirm I see your website: https://os2ports.smedley.id.au/
... and you Mantis page. https://mantis.smedley.id.au

Regards
Title: Re: Qt6 Development
Post by: Paul Smedley on April 14, 2023, 04:42:34 am
Some analysis from Steven on the latest trp that I'm still digesting...
Code: [Select]
>> Is this an alignment problem?
> Not sure yet. The trap appears to be happening at
> https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/third_party/blink/renderer/platform/graphics/parkable_image_manager.cc#L33

> but not sure why yet...

FWIW, the caller is:

  src\3rdparty\chromium\third_party\blink\renderer\platform\exported\platform.cc:251
    base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
        &ParkableImageManager::Instance(), "ParkableImages",
        base::ThreadTaskRunnerHandle::Get());

I think the generated code in the constructor is trying implement a "fast
memset" to clear the instance object.  The PXOR clears the XMM0 and the
MOVAPS instructions zero 16-byte chunks of memory.  This is going to be
faster than the rep movsd we typically see.

The problem here is that 0xfb31248 needs to be 16-byte aligned and it's
not.

OK I got a potential patch for this overnight, unfortunately I'd made a separate change which triggered a partial rebuild which is almost complete and I will test.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 14, 2023, 04:43:08 am
Hi Paul

I confirm I see your website: https://os2ports.smedley.id.au/
... and you Mantis page. https://mantis.smedley.id.au

Regards

Thanks - unfortunately IPv4 only at this stage, but working on getting an IPv6 tunnel setup.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 16, 2023, 12:20:40 am
Not the most exciting screenshot in the world, but this is the first page successfully rendered in QtWebEngine 6.4.3

This is only possibile due to a dirty hack in the code, and any page more complex than this simple HTML only page results in another crash....

Just wanted to show some progress :P
Title: Re: Qt6 Development
Post by: Paul Smedley on April 16, 2023, 09:57:04 am
Actually, with javascript disabled - it's quite stable - not terribly useful, but stable...
Title: Re: Qt6 Development
Post by: Paul Smedley on April 18, 2023, 11:23:47 am
OK, the TRPs with 6.4.3 and 6.5.0 are driving me nuts. I'm going to try and stabilise the qt 6.3.2 webengine and fix and traps there. That might shed some light on stuff I've missed...
Title: Re: Qt6 Development
Post by: Mentore on April 18, 2023, 01:16:22 pm
OK, the TRPs with 6.4.3 and 6.5.0 are driving me nuts. I'm going to try and stabilise the qt 6.3.2 webengine and fix and traps there. That might shed some light on stuff I've missed...

Most probably. I second your idea. Keep letting us know how things are going.
Mentore
Title: Re: Qt6 Development
Post by: Martin Iturbide on April 18, 2023, 09:07:53 pm
OK, the TRPs with 6.4.3 and 6.5.0 are driving me nuts. I'm going to try and stabilise the qt 6.3.2 webengine and fix and traps there. That might shed some light on stuff I've missed...
Hi. Sounds like a great plan to me. Just keep pushing out the 6.3.2 releases and I will try it out.
Regards
Title: Re: Qt6 Development
Post by: Paul Smedley on April 19, 2023, 06:00:30 am
OK, the TRPs with 6.4.3 and 6.5.0 are driving me nuts. I'm going to try and stabilise the qt 6.3.2 webengine and fix and traps there. That might shed some light on stuff I've missed...
Hi. Sounds like a great plan to me. Just keep pushing out the 6.3.2 releases and I will try it out.

Well step 1 was to rebuilt 6.3.x - and install to /qt6-6.3.x to ease the pain of having multiple versions to test.... However - rebuilding with GCC 12 is resulting in a qt6core.dll that is crashing when applications try and use it, for reasons I don't yet understand <sigh>
Title: Re: Qt6 Development
Post by: Dave Yeo on April 19, 2023, 06:23:37 am
Optimization bugs?
Title: Re: Qt6 Development
Post by: Paul Smedley on April 19, 2023, 08:47:25 am
Optimization bugs?
Perhaps - so I tried a rebuild with gcc 9.2.0 - and I'm getting a similar error. Also built on a different box (bare metal vs VM) and got the same error.

Going to go back and look at recent qtbase checkins and see if I inadvertently broke something...

I'm seeing errors like this:
Code: [Select]
{0}[u:\dev\qt6-base-os2-6.3.x\build] chkdll32 bin\uic.exe
Loading DLL 'libcn0' --> C:\USR\LIB\LIBCN0.DLL.
Loading DLL 'libcx0' --> C:\USR\LIB\LIBCX0.DLL.
Loading DLL 'Qt6Core' --> NOT loaded!
Unable to load DLL 'Qt6Core'.  DosLoadModule returned: 87
OS/2 reports '' contributed to the failure.
Loading DLL 'gcc1' --> C:\USR\LIB\GCC1.DLL.
Title: Re: Qt6 Development
Post by: Rich Walsh on April 19, 2023, 05:02:06 pm
I'm seeing errors like this:
Code: [Select]
Loading DLL 'Qt6Core' --> NOT loaded!
Unable to load DLL 'Qt6Core'.  DosLoadModule returned: 87
OS/2 reports '' contributed to the failure.

There's only one reason competent code like chkdll32 would generate an "Invalid parameter" error (rc=87) for this call: the module name it's supplying doesn't point to a valid DLL. IOW, you probably have a linker problem that's generating a dud dll. Run 'exehdr' against Qr6Core to see if it recognizes the file as being a dll.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 19, 2023, 10:30:00 pm
I've attached exehdr output for the 'good'and 'bad' builds.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 20, 2023, 12:07:24 am
The 'good' news is that it's something particular to the 6.3.x  code - I just rebuilt qtbase 6.4.3 and the DLL is fine. Will investigate this afternoon after my specialist appointment.
Title: Re: Qt6 Development
Post by: Rich Walsh on April 20, 2023, 12:15:07 am
I've attached exehdr output for the 'good'and 'bad' builds.

I was expecting some simple-minded cause but it looks like you're in Steven-territory now. Beside the obvious differences in file sizes, I see that some functions differ in size, mostly larger but some smaller  Were these builds created with the same gcc version and the same optimization level? I tried sorting both listings by offset to look for significant size differences (and found some) but if they're built from different codebases then doing so doesn't prove much since intervening non-exported functions may have been added or removed. You may have to ask Steve to trace the load in his trusty kernel debugger to see why it fails.
Title: Re: Qt6 Development
Post by: Paul Smedley on April 20, 2023, 10:13:30 am
Thanks Rich, I've pestered Steven enough recently that I'll do some more local investigation first before I bug him!!

First thing I'll try is using Unix makefiles rather than Ninja.

Edit: OK that didn't help - will example compiler flags between 6.3.x and 6.4.x
Title: Re: Qt6 Development
Post by: Paul Smedley on April 25, 2023, 02:12:13 am
re: javascript issues in 6.4 - pretty sure these are due to the stubs in https://github.com/psmedley/qt6-webengine-os2/blob/6.4.x/src/3rdparty/chromium/v8/src/base/platform/platform-os2.cc#L205 from lines 205 downwards. These may also be the cause of the mksnapshot crash in 6.5
Title: Re: Qt6 Development
Post by: Paul Smedley on May 06, 2023, 03:57:05 am
I know I've been a bit quiet the last couple of weeks, I've needed some time away from Qt6 as it was starting to frustrate me.  I also went away last weekend, and picked up a new car this week. The weather this weekend is pretty miserable (http://www.bom.gov.au/places/sa/henley-beach/) so I might look into some of the webengine issues later today.
Title: Re: Qt6 Development
Post by: Paul Smedley on May 14, 2023, 03:17:06 am
The commit at https://github.com/psmedley/qt6-webengine-os2/commit/55f25c9d40d0f5299839679481892fe3f07469db works around a TRP on OS/2 - in some cases, cache_handler is NULL (no idea why yet). For now, if this is try, we don't try and run the caching code.

After fixing this, I found a TRP in the audio code, which is fixed in https://github.com/psmedley/qt6-webengine-os2/commit/c08132e97ddd6445abb071d0d2ece0bb704aa336

The trp is because on one machine, kaiOpen fails, but then the code further on uses values which are only available if the kaiOpen call succeeds - so we get a SIGFPE.

With the latest commits, I'm able to watch some video in simplebrowser, albeit with no sound on the VM I was using to test.
Title: Re: Qt6 Development
Post by: Paul Smedley on May 30, 2023, 11:22:06 pm
Hey all... I cobbled together a local build of dav1d and am able to generate a DLL that will play AV1 video for me :)

There are some nasm warnings during compilation:
Code: [Select]
../src/x86/msac.asm:29: warning: OBJ format does not support alignment of 64: rounding up to 256 [-w+other]
U:/DEV/dav1d-1.2.0/src/ext/x86/x86inc.asm:93: ... from macro `SECTION_RODATA' defined here [-w+other]
../src/x86/msac.asm:69: warning: segment attributes specified on redeclaration of segment: ignoring [-w+other]
../src/x86/msac.asm:73: warning: segment attributes specified on redeclaration of segment: ignoring [-w+other]
U:/DEV/dav1d-1.2.0/src/ext/x86/x86inc.asm:102: ... from macro `SECTION_TEXT' defined here [-w+other]

x86inc.asm:93 is the obj code from:
Code: [Select]
%macro SECTION_RODATA 0-1 16
    %ifidn __OUTPUT_FORMAT__,win32
        SECTION .rdata align=%1
    %elif WIN64
        SECTION .rdata align=%1
    %elifidn __OUTPUT_FORMAT__,obj
        SEGMENT TEXT32 CLASS=CODE USE32 ALIGN=%1
    %else
        SECTION .rodata align=%1
    %endif
%endmacro
x86inc.asm:102 is the obj code from:
Code: [Select]
%macro SECTION_TEXT 0
    %ifidn __OUTPUT_FORMAT__,obj
        SEGMENT TEXT32 CLASS=CODE USE32
    %else
        SECTION .text
    %endif
%endmacro

Any ideas?
Title: Re: Qt6 Development
Post by: Dave Yeo on May 31, 2023, 12:44:02 am
Wonder about building it in aout mode, -f aout? Nice and simple, x86inc.asm should have the macros and should only take minor patching following whatever Mach does. Should work fine if only LDFLAGS has -Zomf for a standalone DLL.
Which source did you use, I might try
Title: Re: Qt6 Development
Post by: Paul Smedley on May 31, 2023, 01:00:24 am
Hey Dave,

I used meson 0.49.2 and the dav1d 1.2.0 source

the dav1d meson.build knows nothing about OS/2 - so defaults to elf32 and funky ld parameters that our ancient ld doesn't understand, so I manually hacked some bits of ninja.build

I'll try a.out....
Title: Re: Qt6 Development
Post by: Paul Smedley on May 31, 2023, 01:04:51 am
with aout:
Code: [Select]
FAILED: src/25a6634@@dav1d@sha/msac.obj
C:/USR/BIN/nasm.exe -f aout -I U:/DEV/dav1d-1.2.0/src/ -I U:/DEV/dav1d-1.2.0/build/ -MQ src/25a6634@@dav1d@sha/msac.obj -MF src/25a6634@@dav1d@sha/msac.obj.ndep ../src/x86/msac.asm -o src/25a6634@@dav1d@sha/msac.obj
../src/x86/msac.asm:29: error: segment name `.rodata align=64' not recognized
U:/DEV/dav1d-1.2.0/src/ext/x86/x86inc.asm:95: ... from macro `SECTION_RODATA' defined here
../src/x86/msac.asm:69: error: segment name `.rodata align=64' not recognized
Title: Re: Qt6 Development
Post by: Dave Yeo on May 31, 2023, 02:54:50 am
Perhaps something like,
Code: [Select]
--- a/src/ext/x86/x86inc.asm
+++ b/src/ext/x86/x86inc.asm
@@ -85,7 +85,9 @@
 %endif

 %macro SECTION_RODATA 0-1 16
-    %ifidn __OUTPUT_FORMAT__,win32
+    %ifidn __OUTPUT_FORMAT__,aout
+        SECTION .text
+    %elif __OUTPUT_FORMAT__,win32
         SECTION .rdata align=%1
     %elif WIN64
         SECTION .rdata align=%1

Code still might need patching for alignment.
Title: Re: Qt6 Development
Post by: Paul Smedley on June 10, 2023, 02:14:37 am
Started looking at OS/2  audio support for Qtmultimedia -  created a branch at https://github.com/psmedley/qt6-multimedia-os2/tree/os2audio and have created OS/2 equivalents of the ALSA code and got it compiling. Of course, currently all the audio code is wrapped around #if 0 / #endif and needs to be implemented. Hoping to be able to re-use some of the code from https://github.com/psmedley/qt6-webengine-os2/tree/main/src/3rdparty/chromium/media/audio/os2
Title: Re: Qt6 Development
Post by: Paul Smedley on June 18, 2023, 02:20:09 am
You know, compilers/Qt drive me insane at times.

For instance - I built qtdeclarative for Qt 6.5.1 fine a few days ago. Today, I try and rebuild it and get:
Code: [Select]
FAILED: lib/Qt6QuDiU.dll lib/Qt6QuickDialogs2Utils_dll.a
: && echo LIBRARY \"Qt6QuDiU\" INITINSTANCE TERMINSTANCE > lib/Qt6QuDiU.dll.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 17 Jun 2023 17:54:42\ \ \ \ \ ARCAOS-803C4C0::::0::@@QuickDialogs2Utils\" >> lib/Qt6QuDiU.dll.def && echo DATA MULTIPLE NONSHARED >> lib/Qt6QuDiU.dll.def && c:/usr/local1230/bin/c++.exe -DNDEBUG -O2    -Zomf -Zmap -Zdll -Zlinker DISABLE -Zlinker 1121 -lcx -shared -o lib/Qt6QuDiU.dll  src/quickdialogs/quickdialogsutils/CMakeFiles/QuickDialogs2Utils.dir/QuickDialogs2Utils_autogen/mocs_compilation.cpp.o src/quickdialogs/quickdialogsutils/CMakeFiles/QuickDialogs2Utils.dir/qquickfilenamefilter.cpp.o  U:/qt6-6.5/lib/Qt6Gui_dll.a  U:/qt6-6.5/lib/Qt6Core_dll.a  -lpthread lib/Qt6QuDiU.dll.def && emximp -o lib/Qt6QuickDialogs2Utils_dll.a lib/Qt6QuDiU.dll && :
weakld: C:\var\temp\ldconv_qquickfilenamefilter_cpp_o_157648e3cb21dfe08.obj - error: Duplicate symbol '__ZN20QQuickFileNameFilter16staticMetaObjectE' ('__ZN20QQuickFileNameFilter16staticMetaObjectE').
weakld: C:\var\temp\ldconv_qquickfilenamefilter_cpp_o_157648e3cb21dfe08.obj - error: Symbol previosly defined in this module.
weakld: info: fFlags new 0x0001  fFlags old 0x0001 (PUBLIC).
weakld: info: The symbol is referenced by:
    C:\var\temp\ldconv_mocs_compilation_cpp_o_157648e3cb21d0bd8.obj
emxomfld: weak prelinker failed. (rc=-1)

If I examine qquickfilenamefilter.cpp.o (exporting all the symbols with emxexp) I only see one instance of __ZN20QQuickFileNameFilter16staticMetaObjectE'
Title: Re: Qt6 Development
Post by: Mentore on June 19, 2023, 07:58:52 am
You know, compilers/Qt drive me insane at times.

For instance - I built qtdeclarative for Qt 6.5.1 fine a few days ago. Today, I try and rebuild it and get:
Code: [Select]
FAILED: lib/Qt6QuDiU.dll lib/Qt6QuickDialogs2Utils_dll.a
: && echo LIBRARY \"Qt6QuDiU\" INITINSTANCE TERMINSTANCE > lib/Qt6QuDiU.dll.def && echo DESCRIPTION \"@#cmake build system:0.0#@##1## 17 Jun 2023 17:54:42\ \ \ \ \ ARCAOS-803C4C0::::0::@@QuickDialogs2Utils\" >> lib/Qt6QuDiU.dll.def && echo DATA MULTIPLE NONSHARED >> lib/Qt6QuDiU.dll.def && c:/usr/local1230/bin/c++.exe -DNDEBUG -O2    -Zomf -Zmap -Zdll -Zlinker DISABLE -Zlinker 1121 -lcx -shared -o lib/Qt6QuDiU.dll  src/quickdialogs/quickdialogsutils/CMakeFiles/QuickDialogs2Utils.dir/QuickDialogs2Utils_autogen/mocs_compilation.cpp.o src/quickdialogs/quickdialogsutils/CMakeFiles/QuickDialogs2Utils.dir/qquickfilenamefilter.cpp.o  U:/qt6-6.5/lib/Qt6Gui_dll.a  U:/qt6-6.5/lib/Qt6Core_dll.a  -lpthread lib/Qt6QuDiU.dll.def && emximp -o lib/Qt6QuickDialogs2Utils_dll.a lib/Qt6QuDiU.dll && :
weakld: C:\var\temp\ldconv_qquickfilenamefilter_cpp_o_157648e3cb21dfe08.obj - error: Duplicate symbol '__ZN20QQuickFileNameFilter16staticMetaObjectE' ('__ZN20QQuickFileNameFilter16staticMetaObjectE').
weakld: C:\var\temp\ldconv_qquickfilenamefilter_cpp_o_157648e3cb21dfe08.obj - error: Symbol previosly defined in this module.
weakld: info: fFlags new 0x0001  fFlags old 0x0001 (PUBLIC).
weakld: info: The symbol is referenced by:
    C:\var\temp\ldconv_mocs_compilation_cpp_o_157648e3cb21d0bd8.obj
emxomfld: weak prelinker failed. (rc=-1)

If I examine qquickfilenamefilter.cpp.o (exporting all the symbols with emxexp) I only see one instance of __ZN20QQuickFileNameFilter16staticMetaObjectE'

Looks like some "interesting" behaviour of Visual Studio. Here at work everything's ok. Same setup at home, hundreds of errors for missing libs which are perfectly installed. Try and reinstall everything - still errors.
Enough to make one lose his mind - or what remains of it  8) ::)

Mentore
Title: Re: Qt6 Development
Post by: Jochen Schäfer on July 16, 2023, 09:41:11 am
So, I wanted to build Qt6, but I'm stuck with ninja. It will build until at the end some python file gets created or so (not at the OS/2 machine ATM), it will hard hand the PMSHELL, such that I have to turn off the machine.
I also had to comment the parameters in getopt for some test.

@Paul: How did you compile ninja?  Did you post some binaries? I didnt see anything.
Title: Re: Qt6 Development
Post by: Paul Smedley on July 16, 2023, 09:46:45 am
Hi Jochen,

Ninja isn't mandatory for Qt6 base. I use it, but cmake requires some fixes for it to be able to build DLLs.

I'd suggest configuring the unix makefiles... add:
Code: [Select]
-G "Unix Makefiles" to your cmake line.

Meanwhile:
My build of cmake: https://smedley.id.au/tmp/cmake-3.20.6-os2-20230204.zip
My build of ninja: https://smedley.id.au/tmp/ninja.exe

Cheers,

Paul.
Title: Re: Qt6 Development
Post by: TeLLie on July 16, 2023, 10:29:39 am
Hi Paul,

I have build the Qt6.3.2
But now i see that i have build dll like:
D:\QT632-src\qt6-base-os2\build\lib>Dir *.dll
Qt6Conc6.dll  Qt6DBus6.dll  Qt6Netw6.dll  Qt6Sql6.dll   Qt6Widg6.dll
Qt6Core6.dll  Qt6Gui6.dll   Qt6Prin6.dll  Qt6Test6.dll  Qt6Xml6.dll

But you're own build has this:
Qt6Conct.dll  Qt6Netwk.dll  Qt6QuiCo.dll  Qt6UiTos.dll
Qt6Core.dll   Qt6Posig.dll  Qt6QuiD2.dll  Qt6WebCl.dll

Any idea why and how i get same file names as you have?

D:\QT632-src\qt6-base-os2>git checkout
Your branch is up to date with 'origin/6.3.x'.

Title: Re: Qt6 Development
Post by: Paul Smedley on July 16, 2023, 10:39:54 am
Hi Tellie,

This is due to bww cmake vs my cmake. I made changes to increase the probability of getting unique DLL names.

Thanks for confirming the build completes.

Cheers,

Paul.
Title: Re: Qt6 Development
Post by: TeLLie on July 16, 2023, 02:29:58 pm
Hi Paul,

When i use you're cmake build i get:

-- Configuring done
CMake Error at D:/qt632-src/qt6-base-os2/cmake/QtProcessConfigureArgs.cmake:963
(message):
  CMake exited with code Segmentation fault.

Any idea?

A update,
After a reboot I tried again, now it seems to compile further, now on 25%


Next error i see when building tools...

[D:\qt632-src\qt6-tools-os2\build]cmake --build . 2>&1 |tee make.out
[  0%] Built target Tools_timestamp
[  0%] Built target Linguist_lib_pri
[  0%] Built target Linguist_timestamp
[  0%] Automatic MOC for target lconvert
[  0%] Built target lconvert_autogen
Consolidate compiler generated dependencies of target lconvert
[  2%] Built target lconvert
[  2%] Automatic MOC for target lprodump
[  2%] Built target lprodump_autogen
[  2%] Running rcc for resource proparser
make.exe[2]: *** [src/linguist/lprodump/CMakeFiles/lprodump.dir/build.make:76: src/linguist/lprodump/.rcc/qrc_proparser.cpp] Bus error
make.exe[1]: *** [CMakeFiles/Makefile2:1617: src/linguist/lprodump/CMakeFiles/lprodump.dir/all] Error 2
make.exe: *** [Makefile:146: all] Error 2
 
Title: Re: Qt6 Development
Post by: Paul Smedley on July 17, 2023, 06:46:49 am
Next error i see when building tools...

Check popuplog.os2 - my guess is it's finding an incompatible DLL with the same name as one that's being build.

I add my equivalent to D:\qt632-src\qt6-tools-os2\build\lib to the beginlibpath to ensure it's finding the built DLL's not the system ones.

Cheers,

Paul.
Title: Re: Qt6 Development
Post by: Paul Smedley on July 23, 2023, 11:28:33 am
I committed updates to the 6.5.x branch to update the code to 6.5.2. Rebuilding it all now - got it all built except the webengine - nodejs updates are required which I haven't had time to investigate - hoping dmik solves https://github.com/bitwiseworks/node-os2/issues/1 and I *think* it will fix javascript in Qt 6.5.x too. Sponsorship for Dmitry might help too.
Title: Re: Qt6 Development
Post by: David McKenna on July 23, 2023, 01:50:43 pm
 Thanks Paul! I went ahead and made a donation to Bitwiseworks. Hope dmik can fix the issue you linked to...

 There is a new release of Dooble (7/15) - any chance you could build it for QT6?

Regards,
Title: Re: Qt6 Development
Post by: Dave Yeo on July 24, 2023, 05:34:19 am
This patch,
Code: [Select]
From 52aa41d7d4184e3c2c529047e5cddde9a8c553e9 Mon Sep 17 00:00:00 2001
From: textbrowser <textbrowser@gmail.com>
Date: Tue, 11 Jul 2023 22:59:08 -0400
Subject: [PATCH 08/10] Socket access.

---
 Source/dooble.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Source/dooble.cc b/Source/dooble.cc
index 70ddb8d3..39ac8c4e 100644
--- a/Source/dooble.cc
+++ b/Source/dooble.cc
@@ -1371,7 +1371,8 @@ void dooble::prepare_local_server(void)
      "dooble_local_server");
 
   QLocalServer::removeServer(name);
-  m_local_server.listen(name);
+  m_local_server.setSocketOptions(QLocalServer::UserAccessOption);
+  m_local_server.listen(name); // After setSocketOptions().
 }
 
 void dooble::prepare_page_connections(dooble_page *page)
--
2.34.1

Seems to have broke the --attach url functionality here. Also my git repository seems to be broken, even recreating it didn't help and finally did a clone in Linux and copied it to OS/2 to be able to recreate the working dooble --attach that I posted earlier.
Quick check is to run netstat -s and look for an AF_OS2 socket similar to,
Code: [Select]
Type: STREAM   State:    ---
Local Name:    \socket\W:/Home\.dooble\dooble_local_server
Foreign Name:
Curious if Paul has the same issue, along with any idea why it broke it. Thought maybe the parent dooble now needs the --listen option but doesn't help.
And also why I didn't build a RPM yet, along with my mind not working in the heat :)
Title: Re: Qt6 Development
Post by: Paul Smedley on July 24, 2023, 10:18:10 am
There is a new release of Dooble (7/15) - any chance you could build it for QT6?
Not tested, but https://smedley.id.au/tmp/dooble-2023.07.15-os2-qt-6.3.x-20230724.zip
Title: Re: Qt6 Development
Post by: David McKenna on July 24, 2023, 02:02:45 pm
 Thanks Paul! It works well for the most part, but like Dave points out, the --attach function is not working.

 Dave- if you remove that patch, does --attach work again? Maybe just a Linux vs. OS/2 difference...

Regards,
Title: Re: Qt6 Development
Post by: Lars on July 24, 2023, 03:08:57 pm
I have the feeling that that additional socket option creates a local socket name that is not valid under OS/2.
Title: Re: Qt6 Development
Post by: Dave Yeo on July 24, 2023, 04:53:45 pm
Thanks Paul! It works well for the most part, but like Dave points out, the --attach function is not working.

 Dave- if you remove that patch, does --attach work again? Maybe just a Linux vs. OS/2 difference...

Regards,

Yes, reading up on it a bit more, https://doc.qt.io/qt-5/qlocalserver.html (https://doc.qt.io/qt-5/qlocalserver.html), https://stackoverflow.com/questions/35813093/creating-a-local-socket-in-a-custom-location-with-qt (https://stackoverflow.com/questions/35813093/creating-a-local-socket-in-a-custom-location-with-qt)
It does seem to create a socket with limited permissions, likely by binding to an inode and as Lars said, our stack doesn't support that. I note that Windows uses a named pipe in this case, which may be ideal for OS/2 as well.
This patch is perhaps the simplest without knowing how to get qmake to detect the lack of this function.
Code: [Select]
diff --git a/Source/dooble.cc b/Source/dooble.cc
index 39ac8c4e..351b0903 100644
--- a/Source/dooble.cc
+++ b/Source/dooble.cc
@@ -1371,7 +1371,11 @@ void dooble::prepare_local_server(void)
            "dooble_local_server");

   QLocalServer::removeServer(name);
+#ifndef __OS2__
   m_local_server.setSocketOptions(QLocalServer::UserAccessOption);
+#else
+  m_local_server.setSocketOptions(QLocalServer::NoOptions);
+#endif
   m_local_server.listen(name); // After setSocketOptions().
 }

Still need to figure out why my git tree's are broken
Title: Re: Qt6 Development
Post by: Paul Smedley on October 01, 2023, 12:55:16 am
Hey All,

After a bit of a break from OS/2 related stuff (I got a new car; switched electricity provider to one who provided wholesale pricing,  which then necessitated me writing some code to integrate their API into OpenHAB; and other random life factors which causes me to not really do anything OS/2 related for a couple of months,  with the exception of raising a PR to get ninja working in bww cmake).

Anyhow,  the release of Qt 6.5.3 triggered me to update the code in my github repositories, and I'm back to trying to get the webengine building. All modules other than the webengine are built  (but not tested).

Things I know about:
- the issues with QtDeclarative 'Quick' examples remain - I sorta understand why they fail, but need to spend some quality time thinking on how to resolve
- bww cmake  (even with the latest patch) doesn't support TARGET_SHORT with Ninja (need to check it works  with unix make files). Unfortunately,  my own cmake github is a mess, and I wasn't very good at checking in the specific patches that got ninja working correctly, so I'm still trying to identify the specific missing patch
- nodejs  issues  with QtWebEngine 6.5.x  - which are now basically the same as dmik  is seeing in https://github.com/bitwiseworks/node-os2/issues/1#issuecomment-1620655368

More when there is something more to talk about....
Title: Re: Qt6 Development
Post by: David McKenna on October 01, 2023, 01:38:56 pm
 Hey Paul,

  Hope everything worked out during your OS/2 hiatus. Looking forward to testing new builds of QT6 as they appear.

Regards,
Title: Re: Qt6 Development
Post by: Paul Smedley on October 03, 2023, 10:05:17 am
Confirming thqt qtwebengine 6.5.3 build fails with a very similar failed assertion error to that in https://github.com/bitwiseworks/node-os2/issues/1#issuecomment-1620655368
Title: Re: Qt6 Development
Post by: Paul Smedley on November 07, 2023, 09:54:20 am
I'm giving up (for now)  on QT 6.5 webengine.

I've updated the main branch  in github which is the 6.2.x code,  which was last  built against the 6.2.4 source. I've now updated this source to the 6.2.6 opensource code  (Qt 6.2 is a Long Term Support releast, however after the 6.2.4 release, the code was only available for Commercial customers for 12months).

I've built it all bar the webengine, which is building now.  The webengine looks to be based on the same chromium code as 6.3.2 -  but the thought it to try and get a stable-ish release  based on 6.2.x.
Title: Re: Qt6 Development
Post by: Mentore on November 08, 2023, 08:26:26 am
I'm giving up (for now)  on QT 6.5 webengine.

I've updated the main branch  in github which is the 6.2.x code,  which was last  built against the 6.2.4 source. I've now updated this source to the 6.2.6 opensource code  (Qt 6.2 is a Long Term Support releast, however after the 6.2.4 release, the code was only available for Commercial customers for 12months).

Methinks this is a good idea.

Quote
I've built it all bar the webengine, which is building now.  The webengine looks to be based on the same chromium code as 6.3.2 -  but the thought it to try and get a stable-ish release  based on 6.2.x.

Fingers crossed, Paul. Let's see what you can get.
I'm slowly creating an ArcaOS VM and installing things I feel useful - will come to that ASAP and give your Qt port a try.
Mentore
Title: Re: Qt6 Development
Post by: Paul Smedley on November 12, 2023, 03:26:34 am
ok... trying to work out why even though system libraries like libvpx are detected, the bunded versions are compiled in. Finally found a clue.... linux has the following https://github.com/psmedley/qt6-webengine-os2/tree/main/src/3rdparty/chromium/build/linux/unbundle - how to work out how to include something similar on OS/2....
Title: Re: Qt6 Development
Post by: Dave Yeo on November 12, 2023, 04:10:34 am
Most seem to just check for headers, so I'd expect them to just work. Others, not sure of.
Title: Re: Qt6 Development
Post by: Paul Smedley on December 29, 2023, 08:47:10 am
Well I finally got qtcreator building again - it now has fixes  to eliminate duplicate DLL names so it can build out of the box.

However, due to issues with waitForStarted() - ie https://github.com/psmedley/qt6-base-os2/blob/main/src/corelib/io/qprocess_os2.cpp#L1279 it thinks that executables haven't run  so reports an error.

<sigh> it would be nice if someone more knowledgeable could suggest what might need to be changed.

A few clues in the attached....
Title: Re: Qt6 Development
Post by: Paul Smedley on December 29, 2023, 09:36:38 am
OK turns out that was an issue in qtcreator....