User avatar
Gavinmc42
Posts: 2059
Joined: Wed Aug 28, 2013 3:31 am

Lazarus/Free Pascal

Mon Apr 16, 2018 10:13 am

Any idea how to install latest Lazarus and Free Pascal?
I have been using Debian, Raspbian and others, Gentoo packages/installs are different ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
sakaki
Posts: 64
Joined: Sun Jul 16, 2017 1:11 pm

Re: Lazarus/Free Pascal

Mon Apr 16, 2018 11:11 am

So, I had a quick look at FPC yesterday, since you'd mentioned it earlier.

The current main-tree FPC ebuild on Gentoo doesn't support aarch64/arm64 at the moment. To write a tweaked one that will work, I'd need an aarch64-linux binary FPC package for the bootstrapping phase of the build (as modern FPC seems to need FPC to build it, essentially, much as rust needs rust to build), or detailed cross-compile instructions.

To be more specific: currently, the 3.0.4 ebuild downloads the generic FPC build and source packages from sourceforge, and then an arch-specific binary package, also from sourceforge. So on a 64-bit Linux PC, for example, it would download (from prefix https://sourceforge.net/projects/freepascal/files/):
  1. Source/3.0.4/fpcbuild-3.0.4.tar.gz/download (OK for all arches)
  2. Source/3.0.4/fpc-3.0.4.source.tar.gz/download (OK for all arches)
  3. Linux/3.0.4/fpc-3.0.4.x86_64-linux.tar/download (for bootstrapping on 64-bit linux PCs only)
Where (3) is the binary package used during bootstrapping (the precompiled/binary FPC compiler therein is used to compile the FPC sources, and the resulting FPC compiler is then used to compile the FPC sources again).

Accordingly, to build on aarch64-linux rather than x86_64, I'd either need an equivalent binary package to (3) for aarch64-linux (which I can't see on sourceforge at a quick glance, although it's entirely possible I've missed it!), or some detailed cross-compilation instructions from x86_64-linux to aarch64-linux (as I don't use FPC day-to-day).

So, if you could point me to either or both of the above, I'd be happy to write the ebuild for FPC. And once FPC is available, we can look at Lazarus.

best, sakaki

User avatar
Gavinmc42
Posts: 2059
Joined: Wed Aug 28, 2013 3:31 am

Re: Lazarus/Free Pascal

Mon Apr 16, 2018 12:13 pm

Yep, bootstrapping compilers, lots of fun, it's only hard the first time ;)

And 64bit Laz/FPC is only one stage, I then want to get this ported.
https://ultibo.org/wiki/Main_Page
This works on Debian and gives clues along the way, however apt-get install is not Gentoo's way
https://ultibo.org/forum/viewtopic.php? ... ller#p5697

I have used this before for Laz/FPC
https://www.getlazarus.org/setup/?download#linux
But cross compiling Aarch64 is new territory for me.

The goal is a 64bit Linux distribution for testing Aarch64/NEON coding before doing it in baremetal with Ultibo.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
sakaki
Posts: 64
Joined: Sun Jul 16, 2017 1:11 pm

Re: Lazarus/Free Pascal

Mon Apr 16, 2018 12:17 pm

If you are plugged into the FPC community / message boards (as unfortunately I am not) perhaps you could ask there, in case there is an obvious answer for the aarch64-linux binary-tarball-for-bootstrapping issue?

User avatar
Gavinmc42
Posts: 2059
Joined: Wed Aug 28, 2013 3:31 am

Re: Lazarus/Free Pascal

Mon Apr 16, 2018 12:29 pm

Buried in here is some efforts so far.
https://ultibo.org/forum/viewtopic.php? ... it=Aarch64

QEMU/Aarch64 is sort of working.
https://ultibo.org/forum/viewtopic.php? ... 4&start=30

Goal is to turn this QEMU version into real baremetal Aarch64/NEON version
https://ultibo.org/forum/viewtopic.php? ... N&start=20

That opens up lots of interesting possibilities then, like doing camera stuff without the VC4 hardware jpeg/h.264.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 2059
Joined: Wed Aug 28, 2013 3:31 am

Re: Lazarus/Free Pascal

Wed Apr 18, 2018 6:42 am

https://github.com/newpascal/fpcupdelux ... ag/v1.6.0o

Had forgotten about fpcupdeluxe.
Compile/crosscompile from/to anything? Maybe.

Laz/FPC is pretty self contained, I have run it from USB sticks on PC's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Gentoo”

Who is online

Users browsing this forum: No registered users and 1 guest