Recent

Author Topic: Lazarus for Windows on aarch64 (ARM64) - Native Compiler  (Read 35938 times)

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #90 on: September 16, 2025, 04:17:04 pm »
So happy to see we have precipitated some progress!

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #91 on: September 20, 2025, 05:21:07 pm »
Job is still open and accepting bids for anyone who would like to give it a go!

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #92 on: September 30, 2025, 04:52:15 pm »
Good news, everyone!

My company is now sponsoring CoPilot credits for this repo:

https://github.com/InstallAware-Software/FPCSource

The goal of this repo, forked from the original, is for everyone to contribute - so we can get aarch64 Windows support in FPC/Lazarus working, for once and for all!

- Community effort.
- Anyone can join.
- Free beers upon success!

Join now, get free CoPilot access, and let's ship this thing!!!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1840
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #93 on: September 30, 2025, 05:27:08 pm »
That sounds good and interesting !
I have joined.
Lets see how AI and some people willing to spend some time and effort can reach.
Thanks !!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1840
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #94 on: October 03, 2025, 10:25:38 am »
Success !!!
Fpcupdeluxe is now running native on Win64/ARM64 !!
See included screenshot.
Will follow up with Lazarus.

Thaddy

  • Hero Member
  • *****
  • Posts: 18306
  • Here stood a man who saw the Elbe and jumped it.
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #95 on: October 03, 2025, 11:10:56 am »
Quite some achievement. Congrats!
(Wonder where you got the hardware, though: here it is prohibitly - to me, more  expensive than Apple - expensive for what it  offers. (nl).)
« Last Edit: October 03, 2025, 11:13:26 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #96 on: October 03, 2025, 12:16:11 pm »
Success !!!
Fpcupdeluxe is now running native on Win64/ARM64 !!
See included screenshot.
Will follow up with Lazarus.

Congratulations!!!

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #97 on: October 03, 2025, 12:16:43 pm »
Quite some achievement. Congrats!
(Wonder where you got the hardware, though: here it is prohibitly - to me, more  expensive than Apple - expensive for what it  offers. (nl).)

If you are able to afford Macs, just use a Windows 11 aarch64 VM inside your Mac.

Creating Windows aarch64 VMs (via Hyper-V) inside native Windows 11 aarch64 (running on bare metal aarch64 hardware) is actually substantially harder (and a far worse user experience) than running Windows 11 aarch64 VMs on Mac "Apple Silicon" hardware.
« Last Edit: October 03, 2025, 12:42:05 pm by msintle »

Thaddy

  • Hero Member
  • *****
  • Posts: 18306
  • Here stood a man who saw the Elbe and jumped it.
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #98 on: October 03, 2025, 01:00:21 pm »
;) You know I have M4 hardware...
« Last Edit: October 03, 2025, 02:43:46 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

msintle

  • Sr. Member
  • ****
  • Posts: 358
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #99 on: October 03, 2025, 03:58:21 pm »
;) You know I have M4 hardware...

Then you are good to go!

Just use VMware or Parallels - and your hypervisored Windows 11 will run as competitively fast (even with GPU support) as running Windows 11 on bare metal!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1840
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #100 on: October 03, 2025, 04:21:32 pm »
Update FPC.
I have just build a brand new FPC trunk compiler on windows arm64 itself !!
Used a cross-compiled bootstrapper.
Working flawless.

Update Lazarus.
Lazarus has many many things like this:
Code: Pascal  [Select][+][-]
  1.     {$ifdef cpui386}
  2.     with TDbgWinThread(AThread).FCurrentContext^.def do DebugLn(Format('DS: 0x%x, ES: 0x%x, FS: 0x%x, GS: 0x%x', [SegDs, SegEs, SegFs, SegGs]));
  3.     {$else}
  4.     with TDbgWinThread(AThread).FCurrentContext^.def do DebugLn(Format('SegDS: 0x%4.4x, SegES: 0x%4.4x, SegFS: 0x%4.4x, SegGS: 0x%4.4x', [SegDs, SegEs, SegFs, SegGs]));
  5.     {$endif}
  6.  
So, Lazarus assumes that anything other than win32 (i386) is x86_64 on Windows.
Now that FPC works well on Windows ARM64, this needs change.
Any Lazarus devs out there willing to assist ?
Its a lot of work.
« Last Edit: October 03, 2025, 04:26:54 pm by DonAlfredo »

AlexTP

  • Hero Member
  • *****
  • Posts: 2615
    • UVviewsoft
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #101 on: October 03, 2025, 04:38:54 pm »
Main problem of FPC on win64-aarch64 were non working exceptions, as I understand. Is it fixed?
« Last Edit: October 03, 2025, 04:44:29 pm by AlexTP »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1840
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #102 on: October 03, 2025, 04:46:48 pm »
Nothing fixed. All was there already !!
All gory ARM64-details were already implemented by the FPC devs.
Just a very small alignment issue regarding threadvars.
https://gitlab.com/freepascal.org/fpc/source/-/issues/41428
Not easy to spot and find I must say ... ;-)

AlexTP

  • Hero Member
  • *****
  • Posts: 2615
    • UVviewsoft
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #103 on: October 03, 2025, 04:50:10 pm »
Great findings! Thank you very much, I wait when I can make my text editor for win64-arm64.

Fred vS

  • Hero Member
  • *****
  • Posts: 3715
    • StrumPract is the musicians best friend
Re: Lazarus for Windows on aarch64 (ARM64) - Native Compiler
« Reply #104 on: October 03, 2025, 07:43:31 pm »
Success !!!
Fpcupdeluxe is now running native on Win64/ARM64 !!
See included screenshot.
Will follow up with Lazarus.

Wow congratulation champion!

Has anyone ever been able to install Windows 10/11 on an RPi (3 if possible)? If so, any comments on how to install it are welcome?
Similarly, how to install FPC on RPi/Windows.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018