[fpc-pascal] Why can't you cross-compile from x86_64-linux to i386-linux?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Mar 7 10:04:35 CET 2012

On 7 March 2012 10:37, Sven Barth <pascaldragon@*****> wrote:
> Graeme, please. You should be around here long enough to already know that.
> ;)

I hate cross-compiling because it never works for me, or gives very
unstable executable as end result. But I wanted to cross-compile in a
pinch - which clearly is not a good choice.

> Your fpc is compiled for x86_64 which defaults to calling ppcx64 which can
> only compile for x86_64. If you now pass "fpc -i -Pi386" and have a
> ppcross386 compiler available in the location fpc looks for then you'll see

I have a ppc386 symlink in the same 'bin' directory as my 64-bit 'fpc'
executable and this is what Lazarus gives me when I changed linking
Target and CPU settings.... I guess there is a big difference between
ppc386 and ppcross386. ;-)

[ see attached images ]

I guess I'll just have to setup a full blown "native" FPC for each
platform I want to support in separate VM's. This clearly seems the
safest and most reliable option (and what I have used to date - but I
don't have a current 32-bit FPC for FreeBSD 9.0 setup, hence my
attempt at cross compiling).

Thanks for responding though... I'm installing FPC from scratch in my
FreeBSD VM now.

  - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-Error.png
Type: image/png
Size: 4008 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20120307/0c46c6a9/attachment.png>

More information about the fpc-pascal mailing list