Author Topic: Cross compiling instalation issues  (Read 3347 times)


  • Guest
Cross compiling instalation issues
« on: January 14, 2019, 10:07:40 pm »
Following this tutorial:

On Ubuntu 18.10 and with FPC 3.0.4 I have installed Win32 and Win64 cross compilers. Actually, it seems that only Win64 is compiled, while after selecting Win32 In lazarus, IDE started to complain about missing CFG.

With ppc for 64-bit linux executable there are both new executable for Win32 and 64.

Is there anyone with experience in cross compiler installation to point what can be done. Is there any FPC utility which will show which versions of compiler executable  are installed and supported with Lazarus currently?


  • Hero Member
  • *****
  • Posts: 4346
  • My goal: build my own game engine using Lazarus
Re: Cross compiling instalation issues
« Reply #1 on: January 15, 2019, 09:38:15 am »
It does not answer your question, but I think maybe you're interested to read this:,43204.msg302062.html#msg302062


  • Hero Member
  • *****
  • Posts: 1600
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Cross compiling instalation issues
« Reply #2 on: January 15, 2019, 10:54:50 am »
po123, here are my notes from last time I did what you are trying to do. I hope they may be of some use to you ! In particular, note the Ubuntu problems I had in June 18


use (eg) Gdebi to install first the fpc then fpc-src. In this model, described here, I will then build the Lazarus IDE from source so all lazarus files end up in my home directory and I don't need to mess with permissions to to change them. The alt is to use the sourceforge lazarus deb but I found that a bit constricting.

So, in your home directory -

mkdir lazarus; cd lazarus
svn checkout
svn checkout fpcdocs
cd lazarus_1_8_4
make CPU_TARGET=x86_64

mv ~/.lazarus ~/.lazarus-180
./lazarus    // all good ? well done, thats a working Lazarus for this platform.

Setup Linux i386 compiler and Windows compilers

we need libc6-dev-i386 (they are just little bash scripts that call ld and as with specific options) :
which i386-linux-ld
which i386-linux-as

This needs to be done as root as the FPC source files are in /usr/share

# Setup i386 underlying stuff
cd /usr/share/fpcsrc/$FPCVER
make all CPU_TARGET=i386
make crossinstall CPU_TARGET=i386

# Setup 32bit and 64 bit Windows
cd /usr/share/fpcsrc/$FPCVER
make clean all OS_TARGET=win32 CPU_TARGET=i386
make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr
ln -sf /usr/lib/fpc/$FPCVER/ppcross386 /usr/bin/ppcross386

make clean all OS_TARGET=win64 CPU_TARGET=x86_64
make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr
ln -sf /usr/lib/fpc/$FPCVER/ppcrossx64 /usr/bin/ppcrossx64

# Make sure its all there (we should see ppcross386, ppcrossx64)
echo "watch for ppcross386, ppcrossx64"
ls -la /usr/lib/fpc/$FPCVER/ppcross*
ls -la /usr/bin/ppcross*

Test. In June 18 after upgrading desktop to 18.04 I found 32bit linux would fail because of three issues -
1. In /usr/lib/i386-linux-gnu was a broken link. pointed to ~.4 and should have pointed to .14
2. In /usr/lib/i386-linux-gnu there was no, however there was ->
3. the  fpc.cfg section #ifdef cpu386 needed to point to above

update - Oct 18, apparenly glib was updated, my symlink was red, needed to update,  ln -s

On 16.04, /lib/i386-linux-gnu/

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project -


TinyPortal © 2005-2018