Recent

Author Topic: Lazarus 3.2 on RasberryPi5  (Read 1908 times)

PetrHlozek

  • New Member
  • *
  • Posts: 12
Lazarus 3.2 on RasberryPi5
« on: May 28, 2024, 06:05:47 pm »
Hi,

I just bought RasbperryPi 5 and installed RaspbianOS and Lazarus.
Unfortunately it does not work at all. After start of the Lazarus itself, a small blank window appears that I have to close and Lazarus starts. It's happening even when I try to build simple application with just a form. After every run, a small empty window appears that I have to close or wait for a few seconds and it disappears. Look at the attachment.

I have this simple application: https://github.com/ok2cqr/cqrprop
It compiles fine but after trying to run, again, a small empty window appears and when I close it, the application crashes.

I tried to run the cqrprop in gdb and there is the result:

GNU gdb (Raspbian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from src/cqrprop...
(No debugging symbols found in src/cqrprop)
(gdb) r
Starting program: /home/ok2cqr/projects/cqrprop/src/cqrprop
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xf638a240 (LWP 8098)]
[Thread 0xf638a240 (LWP 8098) exited]
[New Thread 0xf638a240 (LWP 8099)]
[New Thread 0xf59ff240 (LWP 8100)]
[Thread 0xf638a240 (LWP 8099) exited]
[Thread 0xf59ff240 (LWP 8100) exited]

Thread 1 "cqrprop" received signal SIGSEGV, Segmentation fault.
0x0006bf70 in ?? ()
(gdb)


I tried versions 2.2.6, 3.2 and 3.4 with the same error message. The compilation of Lazarus went fine, I used make bigide.

Could you help me, please? Thanks a lot.


zeljko

  • Hero Member
  • *****
  • Posts: 1769
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus 3.2 on RasberryPi5
« Reply #1 on: May 28, 2024, 06:39:54 pm »
Try to start app with cmd line option -disableaccurateframe. eg ./myapp -disableaccurateframe

PetrHlozek

  • New Member
  • *
  • Posts: 12
Re: Lazarus 3.2 on RasberryPi5
« Reply #2 on: May 28, 2024, 06:47:50 pm »
That helped, the application is working! What does it mean? Is there any way how to compile application with this option build in? Thanks a lot!

Thaddy

  • Hero Member
  • *****
  • Posts: 17396
  • Ceterum censeo Trump esse delendam
Re: Lazarus 3.2 on RasberryPi5
« Reply #3 on: May 28, 2024, 07:18:33 pm »
It means that Wayland still has issues. You can also switch to X.
« Last Edit: May 28, 2024, 07:20:11 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

PetrHlozek

  • New Member
  • *
  • Posts: 12
Re: Lazarus 3.2 on RasberryPi5
« Reply #4 on: May 28, 2024, 07:43:06 pm »
You are right, thanks. I didn't even know I'm on Wayland.

There is a small how to move to X11 on Raspberry Pi:

- open a terminal
- enter sudo raspi-config
- go to Advanced options -> Wayland and hit Enter
- there you can choose between X11 and Wayland, choose X11 and hit Enter
- then move to Finish and hit Enter, you'll be asked for a reboot

After the reboot, you'll be using X11 and Lazarus + all Lazarus applications will work.

Thank you for your help.

Thaddy

  • Hero Member
  • *****
  • Posts: 17396
  • Ceterum censeo Trump esse delendam
Re: Lazarus 3.2 on RasberryPi5
« Reply #5 on: May 28, 2024, 08:03:55 pm »
Glad to be of help.
Your write up is excellent and actually I should have done that!

Note that Wayland will still be the way to go in the near future. It is much faster except for remote access. So try every now and then for updates about the issues: they are known and not restricted to Lazarus.

Enjoy your Raspberry 5, I am an addict to those devices.
« Last Edit: May 28, 2024, 08:15:00 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

zeljko

  • Hero Member
  • *****
  • Posts: 1769
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Lazarus 3.2 on RasberryPi5
« Reply #6 on: May 29, 2024, 09:32:19 am »
You are right, thanks. I didn't even know I'm on Wayland.

There is a small how to move to X11 on Raspberry Pi:

- open a terminal
- enter sudo raspi-config
- go to Advanced options -> Wayland and hit Enter
- there you can choose between X11 and Wayland, choose X11 and hit Enter
- then move to Finish and hit Enter, you'll be asked for a reboot

After the reboot, you'll be using X11 and Lazarus + all Lazarus applications will work.

Thank you for your help.

hmmm...accurate frame should not trigger under wayland, that's lcl gtk2 bug. Please open an issue against gtk2 ws.


pik33

  • Jr. Member
  • **
  • Posts: 78
Re: Lazarus 3.2 on RasberryPi5
« Reply #7 on: October 30, 2024, 01:26:44 pm »
I created an issue. It needs to be repaired by detecting Wayland and not calling Gtk2WidgetSet.CreateDummyWidgetFrame while in Wayland. I still don't know whatthis call is for.

Thaddy

  • Hero Member
  • *****
  • Posts: 17396
  • Ceterum censeo Trump esse delendam
Re: Lazarus 3.2 on RasberryPi5
« Reply #8 on: October 30, 2024, 05:22:16 pm »
It is mainly to create a message pump without creating a visible widget. Something similar is used in Windows.
I have to investigate if this is proxied in Wayland...Which I still refuse to use as preference.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018