Lazarus

Installation => macOS / Mac OS X => Topic started by: Trenatos on June 27, 2017, 10:41:48 pm

Title: Cross compile no go
Post by: Trenatos on June 27, 2017, 10:41:48 pm
I'm trying to cross compile from OSX to Linux.

I get the same error from inside Lazarus as when I do it from terminal with fink cross compile command.

Fatal: Cannot find system used by BrookRT of package BrookRT.

I tried creating a new application, just slapped a button on the form, and get a similar error different package.

Fatal: Cannot find system used by fcllaz of package FCL.

I've no clue what's wrong.
Title: Re: Cross compile no go
Post by: marcov on June 27, 2017, 10:44:31 pm
It seems that the FPC OS X to Linux crosscompiler that you installed can't find the RTL that you installed. Check configuration, most notably -Fu (unit path) statements to make the crosscompiler find the crosscompiled units.
Title: Re: Cross compile no go
Post by: Trenatos on June 27, 2017, 10:59:41 pm
The -Fu path is empty in the project options, and works fine when compiling for OSX.

Should it be filled out when cross compiling?
Title: Re: Cross compile no go
Post by: Leledumbo on June 30, 2017, 10:54:39 pm
The -Fu path is empty in the project options, and works fine when compiling for OSX.

Should it be filled out when cross compiling?
Lazarus project settings may be empty, but your fpc.cfg may not be. Depending on how you install the cross compiler chain (that is, compiler + utils + packages), it might require changes (only when you install following the same structure as the host toolchain then it can be reused without changes). Look for -Fu lines in this file, make sure it matches your cross compiler packages path.
Title: Re: Cross compile no go
Post by: Trenatos on September 17, 2017, 05:16:48 am
I've gotten cross compilation working for both linux and windows through fpcupdeluxe, works nicely so far.
TinyPortal © 2005-2018