Forum > Linux

LCL for arm (STM32MP1)

(1/5) > >>

Escain:
Hi!

This is my first message on this forum, so a quick intro: I'am Adrian, software engineer currently working on CNC systems. I am used to C++ language but got recently to work with FreePascal, so I am a total newbie with Lazarus and FPC. Nice to meet you all :-)


Goal:
I am trying to port a project (some 1/2M lines) from Delphi-11 to an ARM Stm32MP1, if you are not familiar with this chip, you may just imagine some Raspberry Pi.
I managed to create simple (working) examples with both Lazarus+LAMW and Firemonkey, but their API is quite different than Delphi-11, consequently, I am trying to make some simple Linux+LCL example to work on that target platform.

Environment:

Host:
+ Windows 10 or Linux (Debian Bullseye)
+ amd64
Target:
+ Android or Linux (custom Yocto distro)
+ Wayland, with Qt5 or GTK3
+ ARM Cortex7

What I achieved so far:
I successfully installed Lazarus and the ARM tool-chain through "FpcUpdDeluxe".

The problem:
The problem that blocks me since few days is that the Linux (created with Yocto) works with Wayland, not X11. And all the LCL framework seems to work with X11, not Wayland. The link stage fails with -lX11 not found

[[See image]]

Note: I copied most .so from the target linux, because installed with FPCUpDeluxe were not of a compatible version. This is probably not 100% correct.

I tried to create a new Linux with X11, but that capability was dropped years ago. Until now, I did not managed to build that image.

Searching how to have LCL working with Wayland was not a success neither.
Could I kindly ask you for guidance on how to have LCL working with Wayland for ARM target?

TLTR;

I am looking for help to make LCL working on a wayland linux distro on ARM architecture.

af0815:
First off all, have you a simple "Hello world" without the LCL running on the Target ? This is a startingpoint to see the compiler itself and the fcl works for the target.

Edit: Alexey-T seem to have some issue with Wayland and XWayland too.
https://github.com/Alexey-T/CudaText/issues/3592 eventaully he have more experience.

 

dbannon:
You might be better to Target gtk2.  Sadly, GTK3 is not really ready yet. Qt5 would be heaps better than GTK3 but it has more problems with Wayland than GTK2.

While most current Linux distros now handle Qt5 and Wayland reasonably well (using a xwayland) my guess is very little work will have gone into doing so on an Arm platform and the things done are quite low level.

But if you are committed to not using gtk2 (because of its age), then qt5 it might have to be. As a extra, Qt5 is only a quarter the size of gtk2. Make sure you have xwayland, maybe xcb too.

Davo

Escain:

--- Quote from: af0815 on January 31, 2023, 11:27:21 am ---First off all, have you a simple "Hello world" without the LCL running on the Target ? This is a starting point to see the compiler itself and the fcl works for the target.

--- End quote ---

Yes, I did a "Hello world" program, 'scp' it to the target and it works :-)
So the tool-chain seems almost working. (Almost because LCL is not working)


--- Quote from: dbannon on January 31, 2023, 12:03:23 pm ---But if you are committed to not using gtk2 (because of its age), then qt5 it might have to be. As a extra, Qt5 is only a quarter the size of gtk2. Make sure you have xwayland, maybe xcb too.

--- End quote ---

I have some preference for Qt5 (because I am familiar with it), but my first goal is to have something working. GTK2 can do it for now, then, I can dig further for Qt5 if necessary. So, if it's easier, I will try it first.

So any hint is welcome.

dbannon:
The beauty of LCL is that you can build something in one particular widget set and with often nothing more that a compile switch switch to another.

So, develop in what ever seems well supported on the platform at the time (and I suggest gtk2 because its been around longest) and switch to another as its support matures.

>I have some preference for Qt5 (because I am familiar with it), ...

Depending on what you are doing (and you are plainly tackling a BIG project), you may find that familiarity of little relevance. LCL is that good at what it sets out to do ! There are, of course, corner cases ....

Davo

Navigation

[0] Message Index

[#] Next page

Go to full version