Forum > macOS / Mac OS X

Cross compile no go

(1/1)

Trenatos:
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.

marcov:
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.

Trenatos:
The -Fu path is empty in the project options, and works fine when compiling for OSX.

Should it be filled out when cross compiling?

Leledumbo:

--- Quote from: 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?

--- End quote ---
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.

Trenatos:
I've gotten cross compilation working for both linux and windows through fpcupdeluxe, works nicely so far.

Navigation

[0] Message Index

Go to full version