I'd like to be able to build my Lazarus app on OSX for a Linux target.
So, I go to Project | Compiler Options | Code and enter under Target Platform, Target OS (-T) the selection Linux. I left the Target CPU family (-P) selection blank and the Target Processor selection as (Default) since the cpu is the same on both computers (i386).
When I click OK I get the error message shown in the attached file.
How do I get the "system.ppu for this target" and put in in the FPC binary directory?
What do I need to do to "make sure fpc is installed correctly for this target" and how do I adjust fpc.cfg so it "contains the right directories?"
You have to download or build cross-compilation binutils (from Mac OS X/i386 to Linux/i386), then compile FPC from source for Linux/i386, and finally install it. See the
build faq for general information about cross-compiling.
Alternatively, you can use fink to install the cross-compilation packages:
http://wiki.freepascal.org/Cross_compiling#To_Windows.2C_Linux_.2832_bit.29_and_otherBut keep in mind that in that case
a) you will get two separate and independent FPC installations on your system (one installed in /sw by fink, and one installed in /usr/local by the freepascal.org installer
b) the default FPC on the command line will become the one from fink
c) you may need to enable the "unstable" packages of fink to get the latest stable FPC release (because "stable" fink packages are fink packages that have been tested by enough people to be considered stable; it does not necessarily refer to the software in those packages)
Since you have to run the programs on Linux anyway afterwards to test them, I would strongly recommend to simply natively compile on Linux if you are unfamiliar with either the details cross-compiling or configuring and installing FPC via Fink for use with Lazarus.