Recent

Author Topic: [SOLVED] "Hello World" for qt5 compiles, but runtime throws EAccessViolation  (Read 3315 times)

Hartmut

  • Hero Member
  • *****
  • Posts: 843
I'm trying to make my very 1st program for qt5. I'm on Linux Ubuntu 22.04 64-bit with KDE-Plasma desktop with Lazarus 2.0.10 and FPC 3.2.0. This is my code:

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
  9.  
  10. type
  11.  { TForm1 }
  12.  TForm1 = class(TForm)
  13.   Button1: TButton;
  14.   procedure Button1Click(Sender: TObject);
  15.  private
  16.  public
  17.  end;
  18.  
  19. var
  20.  Form1: TForm1;
  21.  
  22. implementation
  23.  
  24. {$R *.lfm}
  25.  
  26. { TForm1 }
  27.  
  28. procedure TForm1.Button1Click(Sender: TObject);
  29.    begin
  30.    ShowMessage('Hello World');
  31.    end;
  32.  
  33. end.

Since I installed these 2 packages (see packages.png)
 - libqt5pas-dev
 - libqt5pas1
I can compile the program, but when I start it, I get this EAccessViolation:

Code: Text  [Select][+][-]
  1. [FORMS.PP] ExceptionOccurred
  2.   Sender=EAccessViolation
  3.   Exception=Access violation
  4.   Stack trace:
  5.   $0000000000435DE8
  6. ...
  7. Exception at 0000000000435DE8: EAccessViolation:
  8. Access violation.
  9. An unhandled exception occurred at $0000000000435DE8:
  10. EAccessViolation: Access violation
  11.   $0000000000435DE8
  12. ...

When I start the program with debugger, I get an assembler window (see assembler.png) which does not help me. I tried Lazarus 2.2.4 / FPC 3.2.2 with the same results.

I read https://wiki.freepascal.org/Qt5_Interface#Linux but did not understand everything, because I'm a bloody beginner to qt5.

I attached the project, so that you can check my Project Options. Can somebody help? Thanks in advance.
« Last Edit: July 21, 2024, 05:30:24 pm by Hartmut »

Thaddy

  • Hero Member
  • *****
  • Posts: 16145
  • Censorship about opinions does not belong here.
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #1 on: July 19, 2024, 01:03:54 pm »
Qt, any version, is not installed by default on most systems with the -dev packages.
If I smell bad code it usually is bad code and that includes my own code.

Hartmut

  • Hero Member
  • *****
  • Posts: 843
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #2 on: July 19, 2024, 01:11:57 pm »
Thanks Thaddy. As I wrote, I installed:
 - libqt5pas-dev
 - libqt5pas1
Do you think, that more packages are neccessary? Which please?

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #3 on: July 19, 2024, 02:02:08 pm »
If your Qt5 app passes linking stage without problem then you don't need any package. Maybe you should install lazarus 3.0 with fpc-3.2.2 since there was a lot of changes in qt5 ws.

cdbc

  • Hero Member
  • *****
  • Posts: 1645
    • http://www.cdbc.dk
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #4 on: July 19, 2024, 02:10:34 pm »
Hi
I can confirm @zeljko's statement.
I'm running fpc 3.2.2 + laz 2.2.6 + qt5 without a glitch.
...and fpc 3.3.1 + laz 3.0 + qt5 also without a glitch.
see sig.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hartmut

  • Hero Member
  • *****
  • Posts: 843
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #5 on: July 19, 2024, 05:53:47 pm »
Thanks to zeljko and cdbc for your posts.
I installed Lazarus 3.4 with FPC 3.2.2 (because both is the newest release) via fpcupdeluxe. With gtk2 my program runs. But with qt5 I get this compiler messages:

Code: Text  [Select][+][-]
  1. Projekt compiling, Target: /hg/utis/project1: Exit code 1, Errors: 3, Warnings: 2, Hints: 2
  2. Hint: Start of reading config file /opt/lazarus_340/fpc/bin/x86_64-linux/fpc.cfg
  3. Hint: End of reading config file /opt/lazarus_340/fpc/bin/x86_64-linux/fpc.cfg
  4. Verbose: Free Pascal Compiler version 3.2.2-r0d122c49 [2024/07/19] for x86_64
  5. Verbose: Copyright (c) 1993-2021 by Florian Klaempfl and others
  6. Verbose: Target OS: Linux for x86-64
  7. Verbose: Compiling project1.lpr
  8. Verbose: Compiling unit1.pas
  9. unit1.pas(63,26) Verbose: Parameter "Sender" not used
  10. Verbose: Compiling resource /media/H/Progs/Lazarus/work/Experimente/p59_gtk_qt/output/project1.or
  11. Verbose: Linking /hg/utis/project1
  12. Warning: linker: /usr/bin/ld: /opt/lazarus_340/lazarus/lcl/units/x86_64-linux/qt5/qtint.o: in function `CREATE':
  13. qtobject.inc(44,0) Error: linker: undefined reference to `QGuiApplication_setFallbackSessionManagementEnabled'
  14. Warning: linker: /usr/bin/ld: /opt/lazarus_340/lazarus/lcl/units/x86_64-linux/qt5/qtobjects.o: in function `ENDX11SELECTIONLOCK':
  15. qtobjects.pas(3873,0) Error: linker: undefined reference to `QTimer_singleShot3'
  16. project1.lpr(21,1) Error: Error while linking
  17. project1.lpr(21,1) Verbose: There were 1 errors compiling module, stopping
  18. Verbose: Compilation aborted
  19. Verbose: /opt/lazarus_340/fpc/bin/x86_64-linux/ppcx64 returned an error exitcode

What should I do?

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #6 on: July 19, 2024, 07:42:24 pm »
You have old libQt5Pas

cdbc

  • Hero Member
  • *****
  • Posts: 1645
    • http://www.cdbc.dk
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #7 on: July 19, 2024, 07:55:02 pm »
Hi
Adding to what zeljko said.
You can build your own see: "/opt/lazarus_340/lazarus/lcl/interfaces/qt5/cbindings/", or use the unofficial https://github.com/davidbannon/libqt5pas/releases/latest

edit: Regarding "undefined reference to `QTimer_singleShot3'", the below code in 'qtobjects.pas' will remedy that:
Code: Pascal  [Select][+][-]
  1. procedure TQtClipboard.EndX11SelectionLock;
  2. begin
  3.   dec(FLockX11Selection);
  4.   if (FLockX11Selection = 0) and not FX11Delay then
  5.   begin
  6.     FX11Delay := True;
  7. //    QTimer_singleShot(10, @X11DelayTimeOut); //bc
  8.     Sleep(10); //<-- add this instead, works //bc
  9.     FX11Delay := False; //<-- add this instead, works //bc
  10.   end;
  11. end;
  12.  
  13. class procedure TQtClipboard.X11DelayTimeOut; cdecl;
  14. begin { this is the timer-event-handler, we commented above //bc }
  15.   FX11Delay := False;
  16. end;
Regards Benny
« Last Edit: July 19, 2024, 08:16:23 pm by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Hartmut

  • Hero Member
  • *****
  • Posts: 843
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #8 on: July 20, 2024, 11:07:32 am »
Thanks a lot to zeljko and cdbc for trying to help me.

You have old libQt5Pas

That seems to be the important point. But which version do I need? And which version do I have? Synaptic says, I have (see attached packages.png):
 - libqt5pas-dev: Installed Version = 2.6+2.0.8+dfsg-2
 - libqt5pas1: Installed Version = 2.6+2.0.8+dfsg-2
I see there 2 different versions: 2.6 and 2.0.8 ???

But when I run these commands:
Code: Text  [Select][+][-]
  1. hg6@i3300:~$ cd /usr/lib/x86_64-linux-gnu
  2. hg6@i3300:/usr/lib/x86_64-linux-gnu$ ls -al libQt5Pas.so*
  3. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so -> libQt5Pas.so.1.2.6
  4. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1 -> libQt5Pas.so.1.2.6
  5. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1.2 -> libQt5Pas.so.1.2.6
  6. -rw-r--r-- 1 root root 2717928 Aug 15  2020 libQt5Pas.so.1.2.6
  7. hg6@i3300:/usr/lib/x86_64-linux-gnu$
I see a 3rd version "1.2.6" ??? Which version do I have really?

And which version would I need? This depends on the used Lazarus version?
 - which version would I need for Lazarus 2.0.10 and FPC 3.2.0?
 - which version would I need for Lazarus 2.2.4 and FPC 3.2.2?
 - which version would I need for Lazarus 3.4 and FPC 3.2.2?



You can build your own see: "/opt/lazarus_340/lazarus/lcl/interfaces/qt5/cbindings/"
I have never done something similar. I read the instructions in "/opt/lazarus_340/lazarus/lcl/interfaces/qt5/cbindings/README.TXT" twice, but did not understand what to do. I want to avoid that direction.

Quote
... or use the unofficial https://github.com/davidbannon/libqt5pas/releases/latest
I read the informations in this link twice. My experience with installing something other than via Synaptic or "sudo apt install <package>" is near zero. But with enough help I can imagine to manage this, if there is no easier way (see "Conclusion" below).

Quote
edit: Regarding "undefined reference to `QTimer_singleShot3'", the below code in 'qtobjects.pas' will remedy that:
Thank you for this patch. But there was a 2nd error with Lazarus 3.4:
   qtobject.inc(44,0) Error: linker: undefined reference to `QGuiApplication_setFallbackSessionManagementEnabled'
and without fixing this too I think I could not use Lazarus version 3.4. I want to avoid that direction too.

Conclusion:
For me as a beginner to all this stuff it would be the easiest, to keep my version of libQt5Pas and to use/install an appropriate Lazarus version. Please which Lazarus version(s) is/are suitable for my version of libQt5Pas? Thanks a lot.

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #9 on: July 20, 2024, 11:40:58 am »
...
... or use the unofficial https://github.com/davidbannon/libqt5pas/releases/latest

I read the informations in this link twice. My experience with installing something other than via Synaptic or "sudo apt install <package>" is near zero. But with enough help I can imagine to manage this, if there is no easier way (see "Conclusion" below).

Easy approach is to stick with the version of FPC/Lazarus/Libqt5pas in you current distro. However, Qt5 has improved remarkably since 2022 and, honestly, you do need those improvements.

You could update your U2204 to the current U2404 and that will get you the current Lazarus and libqt5pas but unless you want to update, maybe its a bit of over kill.

Installing packages from other than synaptic is pretty easy once you have done it.  Just download (assuming 64bit Intel/AMD)-

https://github.com/davidbannon/libqt5pas/releases/download/v1.2.15/libqt5pas-dev_2.15-1_amd64.deb
https://github.com/davidbannon/libqt5pas/releases/download/v1.2.15/libqt5pas1_2.15-1_amd64.deb

Make sure you know where they are saved to, probably ~/Downloads and do -

Code: Pascal  [Select][+][-]
  1. cd ~/Downloads
  2. sudo apt install ./libqt5pas-dev_2.15-1_amd64.deb ./libqt5pas1_2.15-1_amd64.deb

Only "beware" there is the very important "./" in frount of the file names, without that, apt will assume you want the one from the Ubuntu repo. You don't !

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

Lutz Mändle

  • Jr. Member
  • **
  • Posts: 72
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #10 on: July 20, 2024, 01:11:08 pm »
It is easy to compile libQt5Pas yourself, at least on ArchLinux (arm, aarch64, x86_64 architecture), openSuse and Debian. Of course you need make, gcc and its companions installed, also the qt5 development environment from the distro.

My approach to compile libQt5Pas is:

1. in your home directory create a folder called (for example) lazqt5

2. goto the lazarus installation directory (on openSuse /usr/share/lazarus), from there to lcl/interfaces/qt5/
 
3. copy the folder cbindings to the new created directory lazqt5 in the home directory

4. goto the new folder cbindings in the lazqt5 directory

(sidenote: for all steps until here Midnight Commander is your friend)

5. perform the correct qmake command for qt5, on openSuse and ArchLinux it is called qmake-qt5, on Debian11 it is called qmake,
you can check the qmake command with the parameter -v, the output should give you a hint, for which qt version the qmake program works

6. perform make, then you have time for some cups of coffee, to accelerate the build process you can perform make with the j parameter, for example make -j4 on a system with 4 cpu cores

7. if the build process is finished, install the libQt5Pas library with sudo make install

8. now you should have the libQt5Pas installed in the correct system folder, for sureness perform as superuser the command ldconfig, this updates the linker cache to avoid a reboot

Hartmut

  • Hero Member
  • *****
  • Posts: 843
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #11 on: July 20, 2024, 03:42:48 pm »
@Lutz Mändle:
Thank you very much Lutz for this detailed description and your effort. But as I wrote, I want to avoid that direction at this moment. Maybe later, if other ways do not work.

@dbannon:
Thanks a lot Davo for this infos. This sounds manageable to me, if I don't find a suitable Lazarus version for my already installed libQt5Pas. There are still this questions:
 - must these 2 files stay permanently in e.g. ~/Downloads folder after I installed them or can I delete them there after installing them?
 - must I "lock" these 2 packages in Synaptic to prevent that the next OS update will overwrite them?
 - if I want to deinstall these 2 packages one day: how can I do this?
Thanks for your help.

@all:
I still hope to find a suitable Lazarus version for my already installed libQt5Pas. For me as a beginner to all this stuff it would be the easiest, to keep my version of libQt5Pas and to use/install an appropriate Lazarus version. Please which Lazarus version(s) is/are suitable for my version of libQt5Pas?

I'm not sure which version of libQt5Pas I have: Synaptic says, I have (see attached packages.png):
 - libqt5pas-dev: Installed Version = 2.6+2.0.8+dfsg-2
 - libqt5pas1: Installed Version = 2.6+2.0.8+dfsg-2
I see there 2 different versions: 2.6 and 2.0.8 ???

But when I run these commands:
Code: Text  [Select][+][-]
  1. hg6@i3300:~$ cd /usr/lib/x86_64-linux-gnu
  2. hg6@i3300:/usr/lib/x86_64-linux-gnu$ ls -al libQt5Pas.so*
  3. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so -> libQt5Pas.so.1.2.6
  4. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1 -> libQt5Pas.so.1.2.6
  5. lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1.2 -> libQt5Pas.so.1.2.6
  6. -rw-r--r-- 1 root root 2717928 Aug 15  2020 libQt5Pas.so.1.2.6
  7. hg6@i3300:/usr/lib/x86_64-linux-gnu$
I see a 3rd version "1.2.6" ???

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #12 on: July 20, 2024, 04:33:39 pm »
I see a 3rd version "1.2.6" ???
There is only one version: 1.2.6 (or shorthand for first version release 2.6)

The part 2.0.8 seem to suggest Lazarus 2.0.8 (my package manager says: libqt5pas1/stable 2.6+2.2.0+dfsg1-3 amd64)

Do note that this doesn't mean exactly 2.0.8 but that it at least works with/for 2.0.8 (as well as for higher versions). Maybe someone else more versed with libqt5 knows about the details.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Hartmut

  • Hero Member
  • *****
  • Posts: 843
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #13 on: July 20, 2024, 07:25:06 pm »
Thank you TRon for your post. Now we know that I have libQt5Pas version 1.2.6.

...
The part 2.0.8 seem to suggest Lazarus 2.0.8
...
Do note that this doesn't mean exactly 2.0.8 but that it at least works with/for 2.0.8 (as well as for higher versions).
...

That let's me think, that my Lazarus 2.0.10 (which is only a bug-fix-version of 2.0.8) should work with my libQt5Pas. The wiki in https://wiki.freepascal.org/Qt5_Interface#Do_I_have_a_problem_with_the_version_? says the same:
Quote
Current LTS distributions like Ubuntu 20.04, 22.04, Debian Bullseye etc will have libQt5Pas earlier than 1.2.10 (1.2.6) and thats a problem if you use a Lazarus version later than 2.0.12.

So what else can be the reason, that my libQt5Pas 1.2.6 and my Lazarus 2.0.10 result in an EAccessViolation (please see my 1st post for details)?

Maybe this info helps:
Code: Text  [Select][+][-]
  1. hg6@i3300:~$ dpkg-query -W libqt5*:amd64
  2. libqt5concurrent5:amd64 5.15.3+dfsg-2ubuntu0.2
  3. libqt5core5a:amd64      5.15.3+dfsg-2ubuntu0.2
  4. libqt5dbus5:amd64       5.15.3+dfsg-2ubuntu0.2
  5. libqt5designer5:amd64   5.15.3-1
  6. libqt5designercomponents5:amd64 5.15.3-1
  7. libqt5gui5:amd64        5.15.3+dfsg-2ubuntu0.2
  8. libqt5help5:amd64       5.15.3-1
  9. libqt5hunspellinputmethod5:amd64        5.15.3+dfsg-1
  10. libqt5multimedia5:amd64 5.15.3-1
  11. libqt5multimedia5-plugins:amd64 5.15.3-1
  12. libqt5multimediagsttools5:amd64 5.15.3-1
  13. libqt5multimediaquick5:amd64    5.15.3-1
  14. libqt5multimediawidgets5:amd64  5.15.3-1
  15. libqt5network5:amd64    5.15.3+dfsg-2ubuntu0.2
  16. libqt5opengl5:amd64     5.15.3+dfsg-2ubuntu0.2
  17. libqt5opengl5-dev:amd64 5.15.3+dfsg-2ubuntu0.2
  18. libqt5pas-dev:amd64     2.6+2.0.8+dfsg-2
  19. libqt5pas1:amd64        2.6+2.0.8+dfsg-2
  20. libqt5positioning5:amd64        5.15.3+dfsg-3
  21. libqt5printsupport5:amd64       5.15.3+dfsg-2ubuntu0.2
  22. libqt5qml5:amd64        5.15.3+dfsg-1
  23. libqt5qmlmodels5:amd64  5.15.3+dfsg-1
  24. libqt5qmlworkerscript5:amd64    5.15.3+dfsg-1
  25. libqt5quick5:amd64      5.15.3+dfsg-1
  26. libqt5quickcontrols2-5:amd64    5.15.3+dfsg-1
  27. libqt5quickparticles5:amd64     5.15.3+dfsg-1
  28. libqt5quickshapes5:amd64        5.15.3+dfsg-1
  29. libqt5quicktemplates2-5:amd64   5.15.3+dfsg-1
  30. libqt5quickwidgets5:amd64       5.15.3+dfsg-1
  31. libqt5script5:amd64     5.15.3+dfsg-1
  32. libqt5sensors5:amd64    5.15.3-1
  33. libqt5sql5:amd64        5.15.3+dfsg-2ubuntu0.2
  34. libqt5sql5-mysql:amd64  5.15.3+dfsg-2ubuntu0.2
  35. libqt5sql5-sqlite:amd64 5.15.3+dfsg-2ubuntu0.2
  36. libqt5svg5:amd64        5.15.3-1
  37. libqt5test5:amd64       5.15.3+dfsg-2ubuntu0.2
  38. libqt5texttospeech5:amd64       5.15.3-1
  39. libqt5virtualkeyboard5:amd64    5.15.3+dfsg-1
  40. libqt5waylandclient5:amd64      5.15.3-1
  41. libqt5waylandcompositor5:amd64  5.15.3-1
  42. libqt5webchannel5:amd64 5.15.3-1
  43. libqt5webengine5:amd64  5.15.9+dfsg-1
  44. libqt5webenginecore5:amd64      5.15.9+dfsg-1
  45. libqt5webenginewidgets5:amd64   5.15.9+dfsg-1
  46. libqt5webkit5:amd64     5.212.0~alpha4-15ubuntu1
  47. libqt5widgets5:amd64    5.15.3+dfsg-2ubuntu0.2
  48. libqt5x11extras5:amd64  5.15.3-1
  49. libqt5xml5:amd64        5.15.3+dfsg-2ubuntu0.2
  50. libqt5xmlpatterns5:amd64        5.15.3-1
  51. hg6@i3300:~$

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: "Hello World" for qt5 compiles, but runtime throws EAccessViolation
« Reply #14 on: July 21, 2024, 06:56:54 am »
Code: [Select]
[quote author=Hartmut link=topic=67946.msg524325#msg524325 date=1721482968]
....
I'm not sure which version of libQt5Pas I have: Synaptic says, I have (see attached packages.png):
 - libqt5pas-dev: Installed Version = 2.6+2.0.8+dfsg-2
 - libqt5pas1: Installed Version = 2.6+2.0.8+dfsg-2
I see there 2 different versions: 2.6 and 2.0.8 ???

lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so -> libQt5Pas.so.1.2.6
lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1 -> libQt5Pas.so.1.2.6
lrwxrwxrwx 1 root root      18 Aug 15  2020 libQt5Pas.so.1.2 -> libQt5Pas.so.1.2.6
-rw-r--r-- 1 root root 2717928 Aug 15  2020 libQt5Pas.so.1.2.6
hg6@i3300:/usr/lib/x86_64-linux-gnu$
I see a 3rd version "1.2.6" ???
[/quote]

No, only playing with one version here H.
libqt5pas1: Installed Version = 2.6+2.0.8+dfsg-2 is a debian (who Ubuntu get it from) package number.  It has a file, libQt5Pas.so.1.2.6 (and a few symlinks) installed, and it is, in lazarus speak, 1.2.6.  The "+2.0.8+dfsg-2" is added by debian to indicate it was found in Lazarus 2.0.8 and is not a debian native package. The '2' indicates its the second (by debian) attempt to package that particular file.

So, its safe to say it should work with lazarus 2.0.8 and that, in turn, works with FPC322.

As I mentioned earlier, qt5 had some problems back then. You would probably be ok with gtk2 but I suggest Qt5 needs a later Lazarus, and, of course, a later libqt5pas.

All you need do is click each of those two files I posted links to, then run that short command line.  After the install, you can remove the two files from ~/Downloads. Those files, the libraries, will work with all older versions of Lazarus but that won't solve the problems that exist in early Lazarus Qt5. I am pretty sure Ubuntu will not replace you newer libs with older official ones, the version number on the libaries is now being incremented with every significant change.

The Ubuntu provided FPC (322) will be fine to build a new and sparkling Lazarus 3.4 from source, just use apt (or synaptic) to remove your old Lazarus, download the current lazarus source into a clean directory somewhere and type "make bigide" in that directory. Step by step instructions https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_Source

Join us, do not be afraid. You will be assimilated ....

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

 

TinyPortal © 2005-2018