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
Davo
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
http://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_4svn checkout
http://svn.freepascal.org/svn/fpcdocs/trunk 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
$!/usr/bin/bash
FPCVER="3.0.4"
# 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 libpangocairo-1.0.so was a broken link. pointed to ~.4 and should have pointed to .14
2. In /usr/lib/i386-linux-gnu there was no libglib-2.0.so, however there was libglib-2.0.so.0 -> libglib-2.0.so.0.5600.1
3. the fpc.cfg section #ifdef cpu386 needed to point to above
eg
-Fl/usr/lib/i386-linux-gnu
-Fl/usr/lib/gcc/x86_64-linux-gnu/7/32
-Fl/usr/lib32
update - Oct 18, apparenly glib was updated, my symlink was red, needed to update, ln -s libglib-2.0.so.0.5600.2 libglib-2.0.so
On 16.04, /lib/i386-linux-gnu/libglib-2.0.so.0