Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-11

Cross-compile on Windows for Linux Raspbian (Raspberry Pi) - what are the requirements?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I have tried to develop my RPi4 application on the RPi4 itself but have problems with Lazarus IDE crashing suddenly and inexplicably when just using the IDE, losing all unsaved changes.

So I have now tried to find a way to develop on Windows 7 (my laptop) and check build for Raspbian there, but not run. Then transfer sources to RPi via subversion and build there for testing.

On Windows 7 Pro x64 I have the native Lazarus 2.0.4 and FPC 3.0.4 both of which are 64 bit. Installed via the official sourceforge installers.
On RPi4 I build the environment entirely from svn sources.

Raspbian on the RPi4 is 32 bit so applications must be built in 32 bit mode.

I use a few hardware dependent things on RPi4 (GPIO I/O) but I think these are handled through files etc in Linux so it should not be a showstopper to at least build on Windows.

Since I never ever created an environment for cross-compiling on Lazarus I really need a simple to follow byt full description on how to accomplish the task. Is it even possible for RPi?

I have read somewhere that you cannot really cross-compile from Windows because of some quirks with floating point support. I can live with having to use a virtual environment (Linux in a VMWare virtual machine on Windows) as long as Lazarus does not crash on me any longer and I can work in the VMWare console.

Currently I work on Lazarus on the RPi4 via VNC....

Any ideas (and links to working how-to pages) welcome!

Bo Berglund Developer in Sweden

Reply by email

Giuliano Colla
to Bo Berglund

Il 24/11/2019 10:08, Bo Berglund via lazarus ha scritto:

Since I never ever created an environment for cross-compiling on Lazarus I really need a simple to follow byt full description on how to accomplish the task. Is it even possible for RPi?

I can't help you as far as Windows is concerned, because we learned from experience to carefully avoid using Windows for any purpose other than testing applications which must run under Windows. But I can provide our experience with RPI3.

We installed Lazarus and fpc on Raspberry by using fpcupdeluxe. A few troubles if not using the latest version of fpcup, but then everything working just fine. We can develop natively; no lockups or whatever annoyance.

We did set up a cross environment on Linux (again taking advantage of fpcupdeluxe) and after a few struggling with the proper setting for the specific ARM flavour, again no troubles.

But as it is an annoyance sending back and forth binaries, we ended up with using a git repository in our server, thus sharing sources between Linux and RPI, and compiling natively on Linux for preliminary testing, and on RPI for final tests and production.

Hope that it helps.

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email