Recent

Author Topic: Cross compiling  (Read 5623 times)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Cross compiling
« Reply #15 on: February 22, 2022, 01:01:58 pm »
Short instruction.

Download fpcupdeluxe suitable for your system.
Run fpcupdeluxe.
Select an install directory. Give it an appropriate name.
Click install/update FPC + Lazarus.
While enjoying the output screen, drink a coffee and eat a sandwich.
When finished, you have an isolated FPC + Lazarus install.
Close fpcupdeluxe.
Check the FPC + Lazarus install.
Run fpcupdeluxe.
Select the cross tab.
Select the desired CPU and OS.
Click install cross-compiler.
In most cases, after a while, you will get an error due to missing tools and libs.
Let fpcupdeluxe handle the install of both.
When all is finished, crossing to selected CPU/OS should be possible.

Sidenote.
During use of fpcupdeluxe, many things can go wrong.
Search the forum or github for similar issues.
Not found: use github to create an issue.

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Cross compiling
« Reply #16 on: February 22, 2022, 01:33:36 pm »
Sounds ideal - do I need to uninstall my current Lazarus/FPC install first, or just go for it?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Cross compiling
« Reply #17 on: February 22, 2022, 01:40:55 pm »
Go for it ... ;-)

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Cross compiling
« Reply #18 on: February 22, 2022, 02:44:12 pm »
I downloaded the FPC updeluxe for x86_64 cocoa, and ran it. First thing was an Access Violation.
Clicked OK to continue and got the attached screen.
I selected a directory (on the Desktop, for now), then clicked on Install/Update FPC+Laz and got told to select a version first...but from where?
So, I went to the Cross tab - ah, there are options. Selected i386 and Linux, then clicked on Install Compiler...Access violation, and nothing happened.

This is running from both the Downloads directory and moving into the same Applications directory as Lazarus itself - same result both times. I even tried the qt5 version, which gave even more Access violation errors.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Cross compiling
« Reply #19 on: February 22, 2022, 03:30:45 pm »
This seems to be a permission error on your system. Has been reported before.
My advice. Please create a dedicated directory for fpcupdeluxe. And run fpcupdeluxe from this directory. And install FPC + Lazarus into this directory. This keeps fpcupdeluxe and your install together.
But again: please check your permissions. Fpcupdeluxe need to create some files and this is not working for you [yet].

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Cross compiling
« Reply #20 on: February 22, 2022, 03:41:46 pm »
Created a directory on the Desktop, copied the app into it, changed the permissions to Read&Write for all (on the directory), then ran it...looking promising so far.

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Cross compiling
« Reply #21 on: February 22, 2022, 05:08:08 pm »
All works - at least on the project I was using as test. So thank you.

I can now compile to 8 different systems. I did notice that my cross-compile to 32 bit macOS, on my main Lazarus install, started working after I'd installed the compiler in FPC Deluxe...but the Linux ones still didn't, after I'd done those.

So, next job - setup the new Lazarus install with my preferences (or maybe just find a way to migrate them from the main install). And then maybe remove the main install - bit nervous about that, in case it removes some of the FPC installed version...I suppose I can always re-do it!

Oh, and I need to work out how to uninstall fink...don't need that anymore (sorry).

mischi

  • Full Member
  • ***
  • Posts: 170
Re: Cross compiling
« Reply #22 on: February 23, 2022, 02:44:09 pm »
Removing fink is pretty simply, since as much as possible it is contained in a separate folder. On older systems it is /sw, on newer ones /opt/sw. Then there is the folder "Fink" in /Applications. Delete them from the command line or by moving them to the trash can and empty it.

All the best - Michael.

geraldholdsworth

  • Full Member
  • ***
  • Posts: 195
Re: Cross compiling
« Reply #23 on: February 23, 2022, 02:48:42 pm »
Cool - thank you Michael.

I did find the /opt/sw folder but was nervous to delete the whole thing, just in case.

I have no fink folder in /Applications though.

mischi

  • Full Member
  • ***
  • Posts: 170
Re: Cross compiling
« Reply #24 on: February 23, 2022, 06:14:34 pm »
I have no fink folder in /Applications though.
The folder /Applications/Fink is only created and filled, if a package requires it.

 

TinyPortal © 2005-2018