Recent

Author Topic: [SOLVED] QT5 with latest Lazarus has undefined references  (Read 17213 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: QT5 with latest Lazarus has undefined references
« Reply #30 on: April 14, 2021, 02:37:09 am »
For the record, zeljko has added a define in qtdefines.inc that, by default, disables this set of features.

It would be great if we could make this feature usable long term.

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

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: QT5 with latest Lazarus has undefined references
« Reply #31 on: April 14, 2021, 09:42:21 am »
Trunk revision 64989 builds OK for Qt5 on the same test system that I was using earlier.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

ChrisR

  • Full Member
  • ***
  • Posts: 247
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #32 on: April 14, 2021, 03:11:58 pm »
Thanks dbannon and zeljko for solving this. Thanks to your help, QT5 is my default Lazarus Linux widgetset.

prof7bit

  • Full Member
  • ***
  • Posts: 163
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #33 on: March 02, 2022, 09:01:36 am »
Today I'm getting an undefined reference again:

"lazarus undefined reference to `QGuiApplication_setFallbackSessionManagementEnabled'"


And this time it happens in the 2.2 fixes branch. I could previously build Lazarus release 2.2 and the subsequent 2.2-fixes without any problems until maybe a week or two ago (last time I tried and have not yet bisected the exact revision). In fact this is the first time ever since using Lazarus (since the early 0.9 days) that the distro supplied stable version of libqtpas is not bleeding edge enough to build stable lazarus, and not even with trunk I have ever experienced this.

May I suggest that we finally move libqt5pas into the Lazarus source tree (where the other qt5 widgetset code is living), maintain it ourselves and build it along with Lazarus?

PascalDragon

  • Hero Member
  • *****
  • Posts: 5752
  • Compiler Developer
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #34 on: March 02, 2022, 09:14:58 am »
May I suggest that we finally move libqt5pas into the Lazarus source tree (where the other qt5 widgetset code is living), maintain it ourselves and build it along with Lazarus?

No, because this requires the presence of the Qt build system (GCC, cmake, etc.) as a dependency. Also when installing a Qt-based FPC application that library needs to be installable independent of Lazarus.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

prof7bit

  • Full Member
  • ***
  • Posts: 163
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #36 on: March 02, 2022, 09:35:25 am »
The breaking change happened in revision bd30173

Inside the 2.2 fixes branch!

It was to "fix" some obscure issue happening only on Manjaro-KDE (a bleeding edge experimental distribution that breaks at least once a week on its own because it is riding the bleeding tip of the KDE dev branch)

From the above revision onwards (after sideloading a newer qt5pas on my stable Ubuntu dev machine) I will no longer be able install any of my Lazarus created binaries on any of our 12 production machines downstairs (also Ubuntu LTS).

I'm now stuck at revision 201880a, the last one working on Ubuntu :-(

This should not happen in a fixes branch. I would not say anything if it happened in the main/trunk branch, but not in fixes.

« Last Edit: March 02, 2022, 09:40:19 am by prof7bit »

Templar

  • Newbie
  • Posts: 1
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #37 on: September 19, 2022, 05:33:39 am »
also Ubuntu LTS

I tried .deb packages from https://launchpad.net/ubuntu/+source/libqtpas, version "2.6+2.2.0+dfsg1-3" for The Kinetic Kudu with my Kubuntu 22.04 (LTS), and it worked.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8007
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #38 on: September 19, 2022, 08:51:27 am »
Thanks for the confirmation, and welcome to the forum :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MitjaStachowiak

  • Newbie
  • Posts: 1
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #39 on: October 06, 2022, 04:22:17 pm »
For solving the error with setFallbackSessionManagementEnabled, I just removed this procedure from lazarus/lcl/interfaces/qt5/qt56.pas

It is used in just one place in Lazarus, where it then can be removed, too. I think, this method is somehow deprecated > https://forum.qt.io/topic/125035/what-is-was-qguiapplication-setfallbacksessionmanagementenabled

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #40 on: October 10, 2022, 09:02:36 pm »
It's not deprecated for qt5, only qt6.

prof7bit

  • Full Member
  • ***
  • Posts: 163
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #41 on: May 24, 2024, 12:07:27 pm »
The problem is back with newer fixes branches :-(

My OS is Kubuntu 22.04.4 LTS and my libqt5pas-1 is the newest available version from the ubuntu repo.

Is there really no way to somehow coordinate the releases of qt5pas and Lazarus, so they remain compatible?
« Last Edit: May 24, 2024, 12:17:07 pm by prof7bit »

Zvoni

  • Hero Member
  • *****
  • Posts: 2737
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #42 on: May 24, 2024, 12:58:43 pm »
The problem is back with newer fixes branches :-(

My OS is Kubuntu 22.04.4 LTS and my libqt5pas-1 is the newest available version from the ubuntu repo.

Is there really no way to somehow coordinate the releases of qt5pas and Lazarus, so they remain compatible?
Maybe this can shed some light on it (especially zeljko's and dbannon's posts)
https://forum.lazarus.freepascal.org/index.php/topic,44607.msg313738.html#msg313738
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #43 on: May 24, 2024, 03:25:32 pm »
The problem is back with newer fixes branches :-(

My OS is Kubuntu 22.04.4 LTS and my libqt5pas-1 is the newest available version from the ubuntu repo.

Is there really no way to somehow coordinate the releases of qt5pas and Lazarus, so they remain compatible?

If you are using Lazarus Fixes, then you have the same code (wrt Qt5) as Lazarus 3.0 or 3.2 (from Dec 2023). As such, you cannot use the Ubuntu libqt5pas from U22.04 because, obviously, that dates back to 2022. You must do one of -
  • Build your own libqt5pas based on the new code. A simple but tedious process.
  • Download from https://github.com/davidbannon/libqt5pas/releases where I do the tedious bit for you.
  • Use a linux distro that already has the new code, for example Debian Trixie (aka Testing) or, (and I may be wrong), Ubuntu 24.04
  • If you must use libqt5pas library in U22.04, then use the Lazarus in U22.04 (I don't recommend this one at all).


Its simple really, if you use the new code (and its good) then you MUST use a new libqt5pas.

Davo

edit: Added option 4
« Last Edit: May 24, 2024, 03:48:38 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

prof7bit

  • Full Member
  • ***
  • Posts: 163
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #44 on: May 24, 2024, 04:58:06 pm »
The problem (and this thread) started when Ubuntu 20 was the latest LTS. I stopped updating my Lazarus because all the machines in my company were using Ubuntu LTS and I did not want to sideload extra deb packages into ALL production machines only to get my Lazarus apps working, I was hoping that the updated libqt5pas would make it into Ubuntu 22.

Now it is a few years later and Ubuntu 22 LTS is widely used.

Can we at least hope that it will be in Ubuntu 24?

Suggestions for the future:

* check which dependency lib versions the most common mainstream distros are currently using
* develop the shiny new bleeding edge Lazarus versions only against these existing lib versions
* if you want to implement a new feature that absolutely needs the newest bleeding edge libWhatEver then please keep it in a completely separate experimental branch and only merge it when the required lib version has become mainstream.

BTW: What great new Lazarus feature will it be that requires these new Qt APIs, whose existence justifies it to completely break the build and deploy process for 99% of users for years to come and make all software built with any Lazarus version higher than 2.2.6 (and with that also any compiler version higher than 3.2.2) virtually impossible to use?

</rant>
« Last Edit: May 24, 2024, 05:03:29 pm by prof7bit »

 

TinyPortal © 2005-2018