Author Topic: Qt6 Development  (Read 342232 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4987
  • Karma: +110/-1
    • View Profile
Re: Qt6 Development
« Reply #735 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.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #736 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

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #737 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'

Mentore

  • Full Member
  • ***
  • Posts: 198
  • Karma: +6/-0
    • View Profile
Re: Qt6 Development
« Reply #738 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

Jochen Schäfer

  • Sr. Member
  • ****
  • Posts: 361
  • Karma: +29/-0
    • View Profile
Re: Qt6 Development
« Reply #739 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 hang 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.
« Last Edit: April 15, 2024, 09:45:43 am by Jochen Schäfer »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #740 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.

TeLLie

  • Full Member
  • ***
  • Posts: 238
  • Karma: +12/-0
    • View Profile
Re: Qt6 Development
« Reply #741 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'.


Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #742 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.

TeLLie

  • Full Member
  • ***
  • Posts: 238
  • Karma: +12/-0
    • View Profile
Re: Qt6 Development
« Reply #743 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
 
« Last Edit: July 16, 2023, 09:13:02 pm by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #744 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.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #745 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.

David McKenna

  • Hero Member
  • *****
  • Posts: 806
  • Karma: +25/-0
    • View Profile
Re: Qt6 Development
« Reply #746 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,

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4987
  • Karma: +110/-1
    • View Profile
Re: Qt6 Development
« Reply #747 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 :)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2245
  • Karma: +170/-0
    • View Profile
Re: Qt6 Development
« Reply #748 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

David McKenna

  • Hero Member
  • *****
  • Posts: 806
  • Karma: +25/-0
    • View Profile
Re: Qt6 Development
« Reply #749 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,