[fpc-pascal] Running fpcmake, lazarus and fpc 3.0.0
Tony Whyman
tony.whyman at mccallumwhyman.com
Mon Feb 1 15:48:10 CET 2016
When building release versions of lazarus programs I use build scripts
that build both linux and windows targets on the same system using the
fpcross compiler (from linux x64_86 to win32). To do this I obviously
need to build both x64_86 and win32 versions of the lazarus libraries on
the same linux system. Generally, this is not a problem but you do need
to run fpcmake on the lazarus directory before building each library
version. The script starts off like this:
echo "Building $CPU_TARGET-$OS_TARGET"
mkdir -p $LAZBUILD
echo "rsync: $LAZSRC/* to $LAZBUILD"
rsync -a $LAZSRC/* $LAZBUILD --exclude units --exclude lib
find $LAZBUILD -name 'Makefile' -exec rm '{}' \;
find $LAZBUILD -name 'Makefile.fpc' -exec fpcmake
-T$CPU_TARGET-$OS_TARGET '{}' \;
Basically, it copies the lazarus source to some build location, scrubs
out the Makefiles and runs fpcmake to recreate them for the desired target.
This all works fine with fpc 2.6.4 but fpcmake fails with fpc 3.0.0 with
the error message:
Error: Target "linux", package "regexpr" not found
I am using the standard binary for linux x86_64 installed from
fpc-3.0.0.x86_64-linux.tar and downloaded from Sourceforge.
After some digging the problem seems to be that regexpr/Package.fpc is
missing from the standard distribution. I then download the fpc 3.0.0
sources. "make install" using the sources does not fix then problem. I
thus install it the hard way:
cd ~/fpc-3.0.0/packages/regexpr
sudo make fpc_install INSTALL_CREATEPACKAGEFPC=1 INSTALL_PREFIX=/usr
seems to work.
Back to fpcmake on lazarus and it fails again, but this time the package
"fpmkunit" can't be found. Repeat the above. Next up in "hash" and then
"paszlib", "fcl-process" and finally "libtar". Once these all have there
Package.fpc files installed, lazarus will build!
It looks to me as if fpc-3.0.0 has forgotten to install the Package.fpc
files for all packages breaking lazarus builds amongst others.
More information about the fpc-pascal
mailing list