Recent

Author Topic: QT 6?  (Read 13769 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #15 on: November 12, 2022, 03:48:55 am »
Comparing the header files, stl_relops.h from Debian Testing (fails) and Fedora 36 (OK) there is no code differences, different comments but similar sorts of messages.

the Fedora .h file is slightly newer so, perhaps the underlying code is different ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #16 on: November 12, 2022, 04:17:56 am »
Zeljko, I am puzzled about the version numbering you have used for the library. Seems its called libQt6Pas.so.6.2.3

I assume the '6' is for Qt6, the '2.3' being the version of Qt6 you are using as a reference. By locking you self into that version number, you now have no where to go if you want to increment it (without looking as if it no longer works with Qt6 2.3). Is that intentional ?

And end users will be worried about using libQt6Pas.so.6.2.3 with eg Qt6.3.1 (both Fedora 36 and Debian Testing are already on 3.1).

I suggest you have a separate numbering scheme altogether. Linking the number to Lazarus is not good because you release into main and you don't know, then, which Lazarus Release it will appear in later.

Why not just call it libQt6Pas.so.6.1.0 at this stage ?  You have done so much work on this, it deserves its own version number.

Davo
« Last Edit: November 12, 2022, 12:35:01 pm by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #17 on: November 12, 2022, 05:39:24 am »
Unbelievable ! Seriously, this is amazing !  Here is my app, running Qt6 -

27K lines of code and all I had to do was to add a {ifdef LCLQt6} in one spot.

Absolutely brilliant Zeljko, thank you so much !

Davo

PS - I will get some packaged versions of the library in place as soon as I can.
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #18 on: November 12, 2022, 05:45:16 am »
And a scaled version of that image, yeah, I was getting a bit excited !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dsiders

  • Hero Member
  • *****
  • Posts: 1557
Re: QT 6?
« Reply #19 on: November 12, 2022, 06:11:57 am »
And a scaled version of that image, yeah, I was getting a bit excited !

Davo

So.. which distro is that running in the VM?

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #20 on: November 12, 2022, 10:14:16 am »
The VM is Debian Testing XFCe but with a libQt6Pas built on Fedora 36.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1887
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: QT 6?
« Reply #21 on: November 12, 2022, 11:58:53 am »
I'm building on Fedora 35, seem that your debian does not meet qt6 dependencies about compiler.
This is error from Lazarus CI: Qt screams about C++17 compiler.
g++ -c -pipe -Wfatal-errors -O2 -w -D_REENTRANT -fPIC -DBINUX -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/include/x86_64-linux-gnu/qt6 -I/usr/include/x86_64-linux-gnu/qt6/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt6/QtWidgets -I/usr/include/x86_64-linux-gnu/qt6/QtGui -I/usr/include/x86_64-linux-gnu/qt6/QtCore -Itmp -I/usr/lib/x86_64-linux-gnu/qt6/mkspecs/linux-g++ -o tmp/qobject_hook_c.o src/qobject_hook_c.cpp
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qnamespace.h:44,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs.h:48,
                 from /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:46,
                 from src/qobject_hook.h:17,
                 from src/qobject_hook_c.h:15,
                 from src/qobject_hook_c.cpp:12:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:143:6: error: #error "Qt requires a C++17 compiler"
  143 | #    error "Qt requires a C++17 compiler"
      |      ^~~~~
compilation terminated due to -Wfatal-errors.

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #22 on: November 12, 2022, 12:33:15 pm »
Well, thats pretty cute given they are shipping Qt6 2.3.1 - it does not met Qt spec ??

Anyway, I had no trouble building on Fedora 36, I have made a pair of x86_64 libraries and placed them in my existing libQt5pas repo -

https://github.com/davidbannon/libqt5pas/releases/tag/v1.2.10

For the record, here is how their file names come out -
Code: [Select]
libqt6pas6_2_3-0_amd64.deb
libqt6pas-dev_2_3-0_amd64.deb

If I get a chance tomorrow, I will see if I can make some rpms and maybe even arm versions.

But before people start installing these, it might be nice if you could consider the version numbering system please ?

Davo

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #23 on: November 12, 2022, 12:48:42 pm »
.......
/usr/include/x86_64-linux-gnu/qt6/QtCore/qglobal.h:143:6: error: #error "Qt requires a C++17 compiler"
  143 | #    error "Qt requires a C++17 compiler"
      |      ^~~~~
compilation terminated due to -Wfatal-errors.
OK, Debian Testing, aka bookworm, uses GCC 12.2, according to gcc website, version 11 does have the C++17 features.

C++17 features are available since GCC 5. This mode is the default in GCC 11; it can be explicitly selected with the -std=c++17 command-line flag, or -std=gnu++17 to enable GNU extensions as well.

If they are year 2017 standards, that should not be a problem. You seemed to be getting a much more informative error report than I did, do you know why ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1887
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: QT 6?
« Reply #24 on: November 12, 2022, 12:52:48 pm »
Yes, we must add -std=c++17 on Debian to get it work.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1937
Re: QT 6?
« Reply #25 on: November 12, 2022, 08:08:22 pm »
Here's first screenshoot of Lazarus IDE using qt6 widgetset...just for history books :)

Thank you Željan for your tireless commitment.  :)
I will test as soon as possible.

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #26 on: November 13, 2022, 01:24:22 am »
Yes, we must add -std=c++17 on Debian to get it work.

Yep, that fixed it. Do you want to edit Qt6Pas.pro your self or want me to make a pull request ?

I guess we have to put it down to a Debian-ism, they can be very conservative !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1887
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: QT 6?
« Reply #27 on: November 13, 2022, 10:32:25 am »
Make pull request please ... also, change version to 6.2.0 instead of 6.2.3 (me culpa). Version will be 6.2 (it is based on 6.2), and micro version will be changed for changes in bindings.

EDIT: It's already fixed ! https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/0f6a659df293e09cb63423b8c89f3dc372d23b74
« Last Edit: November 13, 2022, 10:35:44 am by zeljko »

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT 6?
« Reply #28 on: November 14, 2022, 02:59:14 am »

Libraries

Pre made libqt6pas libraries available at https://github.com/davidbannon/libqt6pas

Debs, RPMs and a tarball. Only x86_64 so far but arm and arm64 at some stage.

Compile and Version Numbering
I can confirm that  Maxim has fixed the compile on Debian issue but has not reset the version number. I'll wait a bit and if it happens, great, if not, I'll do you a pull request. For the record, I have used what we have there now, after Maxim's patch, as version 6.2.0.

Simple edit of Qt6Pas.pro starting at line 13 -
Code: C  [Select][+][-]
  1. # Binding Release Version 6.2.0 against Qt6 6.2 LTS release.
  2. # Changes to Binding will trigger updates to the third component in version number
  3. # So, next one will be 6.2.1
  4.  
  5. win32:VERSION = 6.2.0.0
  6. else:VERSION = 6.2.0
  7. VER_MAJ = 6
  8. VER_MIN = 2
  9. VER_PAT = 0
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1887
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: QT 6?
« Reply #29 on: November 14, 2022, 09:38:18 am »
I'll change version later. 6.2 will stay as it is, micro version number will be changed 0..xx.

 

TinyPortal © 2005-2018