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


  • Hero Member
  • *****
  • Posts: 2902
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [SOLVED] QT5 with latest Lazarus has undefined references
« Reply #45 on: May 25, 2024, 02:44:35 am »
Sorry about such a long answer, but this is a complicated issue, its annoying and disruptive but thats just how it is !

prof7bit, I think you are missing an important point here. Qt on Lazarus generally requires the version of libqt5pas to match (or exceed) the corresponding Lazarus that the app was built with.  As I said in previous post -
Its simple really, if you use the new code (and its good) then you MUST use a new libqt5pas.

This is NOT a one off situation, it has happened several times in the past as zeljko continues to make the Qt interfaces. Over time, the QT libraries change, new features are introduced and old ones removed, bugs are fixed.  zeljko makes those necessary changes in Lazarus trunk (and they appear quickly in Fixes). At any one time, its possible that the trunk/main/fixes branch will be incompatible with the current release Lazarus. Not at the moment as it turns out but I bet that changes again soon. Been several months...

In the mean time, distributions are released on a "point in time basis". Ubuntu2204 used a Lazarus that was released in March or April 2022. And the libqt5pas in U2204 was built using that Lazarus.

Again I say it, a current Lazarus and a two year old libqt5pas is just not going to work. With Ubuntu extending the time that its LTS products are good for, this problem is only going to get worse. You could use Debian Backports, the Debian maintainers track Lazarus into Backports pretty closely. I believe its also possible to get Ubuntu to look at Debian Backports but I personally has some bad experiences there.

I personally don't use Ubuntu any more, its increasing reliance on SNAPS drives me to distraction.

Can we at least hope that it will be in Ubuntu 24?
I have just confirmed that U2204 does in fact have libqt5pas 2.15. That works fine with Lazarus 3.2 and earlier. Currently, it also works with Lazarus Main but there is absolutely no guarantee that will be the case tomorrow.

* 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.
1) Again, I am afraid, you don't seem to understand what is happening. The process is that the Lazarus Developers release Lazarus, some time AFTER that, a distro will choose to use it and build their libqt5pas using it. Generally they can not/will not use pre-release Lazarus. 2..3) If Lazarus Qt is to track the official Qt releases, nothing here about bleading edge, just keeping up, libqt5pas must change from time to time.

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?
The new feature usually involves things like tracking movements with in the official Qt libraries. If the official Qt libraries are not changing, then why would they be getting new version numbers ?  Also, bug fixes/improvements. For example, one of the really important new things in Qt5 and Qt6 Lazarus 3.0 is use of native dialogs. Before this (fantastic) development, we needed to use Qt dialogs that were ugly, lacked integration with the desktop and in some cases had a 22 second delay on opening. That alone justifies updates (ten times over).


(phew ! what a long post !)

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - and my github -


TinyPortal © 2005-2018