Lazarus FPC notes.
Setup.
  • Download the required [Linux amd64 DEB] packages from
    https://sourceforge.net/projects/lazarus/files/Lazarus
  • Install them from your download directory:
    sudo apt install ./fpc-*.deb ./laz*.deb
    → Lazarus complains in the absence of gdb, so make sure that's installed as well.
  • At this point there's a bug to account for. Open up your launcher menu editor and prepend
    GTK_IM_MODULE=gtk-im-context-simple
    to the "startlazarus %f" entry.
  • Set up for cross-compilation.¹ Mind the path names! WINE does run 64 bit .exe's so technically you could skip the i386 target.
    cd /usr/share/fpcsrc/3.2.0/ # this will vary!
    # i386 (32 bit)
    sudo make -j 4 clean all OS_TARGET=win32 CPU_TARGET=i386
    sudo make -j 4 crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr
    sudo ln -sf /usr/lib/fpc/3.2.0/ppcross386 /usr/bin/ppcross386 # this will vary!
    # x86_64
    sudo make -j 4 clean all OS_TARGET=win64 CPU_TARGET=x86_64
    sudo make -j 4 crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr
    sudo ln -sf /usr/lib/fpc/3.2.0/ppcrossx64 /usr/bin/ppcrossx64 # this will vary!

    ¹ If you try to do it later, when you add a compilation target you'll get spurious error messages like
    The system.ppu for this target was not found in the FPC binary directories.
    Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories.
    Fatal: Cannot find system used by fcllaz. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=/usr/lib/fpc/3.0.4/units/x86_64-linux/rtl/system.ppu.
    There is no system.ppu for win32, so it's never going to be in the wrong place. These messages result from some obsolete data in the .lazarus folder in your home directory — data sufficiently obfuscated or obscure you'll have to delete the whole folder to get rid of it.
In Practice.
Most of Lazarus/FPC is installed to /usr, but 100+ MB of it, including the main executable, resides in the user directory so that components can be compiled into it without requiring administrator/superuser privileges. Some useful additions:
ATSynEdit.
As of 26 Jan 2023, you'll need to open Tools|Configure "Build Lazarus", click the Edit Defines button, add
WITH_GTK2_IM
and then recompile the IDE. See the wiki for more.
RichMemo.
Seems to be in active development; you'll want to visit the relevant message board and the wiki.
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
.
...
Term
Last Definition