[Pkg-pascal-devel] Castle Game Engine 6.4 "fixes" branch for FPC 3.2.0

Michalis Kamburelis michalis.kambi at gmail.com
Sun Aug 9 22:33:53 BST 2020


Hi Abou!

Thank you for the work. Sorry for the delay in answering -- I'm back from a
vacation :) Answers to all 3 of your mails below.

> I finally managed to find some time to integrate your FPC 3.2.0 related
changes to CGE and unfortunately it fails building.
...
> mkdir -p /build/castle-game-engine-6.4+dfsg1/debian/tmp/tmp
> /usr/bin/fpc -FE/build/castle-game-engine-6.4+dfsg1/debian/tmp/tmp
 @castle-fpc.cfg tools/texture-font-to-pascal/texture-font-to-pascal.lpr
> Free Pascal Compiler version 3.0.4+dfsg-23 [2019/11/25] for x86_64
...
> castlevectors_lists.inc(371,11) Error: Identifier not found "PT"

Ups, when I fixed the FPC 3.2.0 compilation on v6.4-fixes branch (
https://github.com/castle-engine/castle-engine/commits/v6.4-fixes ), in
turn I broke FPC 3.0.4 compilation. (Usually it would be caught by my
Jenkins, but it has problems on "v6.4-fixes" branch for unrelated
reasons...)

Fixed by
https://github.com/castle-engine/castle-engine/commit/32e283f739ed75bb3a07c30713476b5b747fff75
. So, please add this patch into CGE 6.4 in Debian.

> I managed finally to build correctly CGE using 3.2.0 from experimental.
> However It required the following patch:
...
> +  {$IF (FPC_FULLVERSION >= 030100)} CThreads, {$endif}

Thanks! I committed an equivalent fix to v6.4-fixes (
https://github.com/castle-engine/castle-engine/commit/8b2233320ff59c01727174b506968cefd4def048
).

We do:

"""
{$ifdef UNIX} {$ifndef VER3_0} CThreads, {$endif} {$endif}
"""

We don't support FPC 2.x since a long time, so this is in practice
equivalent.

I actually think your solution (with "{$IF (FPC_FULLVERSION >=
030100)}...") looks cleaner. But right now we use a similar construction
("{$ifndef VER3_0} ... ") often across CGE sources. So my version is more
consistent with existing CGE code, and also it is what was already in the
CGE master branch :)

> It seems that the messages at the end of the wiki page was mis
interpreted to hide a bug on Debian FPC customization changes.
> I looked more deeply on this and discovered that the global units dir was
not fixed when the change of the default units path was applied in order to
support multi-arch.

It's good that you improved this with FPC version in Debian. But my
workaround is also necessary with upstream FPC releases. So I'll leave it
for now.

Regards,
Michalis

pon., 3 sie 2020 o 23:42 Abou Al Montacir <abou.almontacir at sfr.fr>
napisaƂ(a):

> Looking more attentively at the CGE make file I was surprised by the
> following lines:
>
> 	fpc fpmake.pp
>
> 	@echo 'Running fpmake. If this fails saying that "rtl" is not found, remember to set FPCDIR environment variable, see http://wiki.freepascal.org/FPMake .'
>
> # Workaround FPC >= 3.x problem (bug?) --- it ignores $FPCDIR, but --globalunitdir works
>
> 	if [ '(' -n "$(FPCDIR)" ')' -a \
>
> 	     '(' $(shell fpc -iV) '!=' '2.6.4' ')' -a \
>
> 	     '(' $(shell fpc -iV) '!=' '2.6.2' ')' ]; then \
>
> 	   ./fpmake --globalunitdir="$(FPCDIR)" -v -o -Ur; \
>
> 	else \
>
> 	   ./fpmake -v -o -Ur; \
>
> 	fi
>
>
> It seems that the messages at the end of the wiki page was mis interpreted
> to hide a bug on Debian FPC customization changes.
> I looked more deeply on this and discovered that the global units dir was
> not fixed when the change of the default units path was applied in order to
> support multi-arch.
>
> I fixed this on FPC and uploaded it.
>
> --- fpc.orig/fpcsrc/packages/fpmkunit/src/fpmkunit.pp
>
> +++ fpc/fpcsrc/packages/fpmkunit/src/fpmkunit.pp
>
> @@ -4538,6 +4538,9 @@ begin
>
>    BinInstallDir:='';
>
>    LibInstallDir:='';
>
>    ExamplesInstallDir:='';
>
> +  if GlobalUnitDir = '' then begin
>
> +    GlobalUnitDir := FBaseInstallDir;
>
> +  end;
>
>  end;
>
>   So now we can remove the above check and use a simple line to build CGE.
>
> --
>
> Cheers, Abou Al Montacir
>
> _______________________________________________
> Pkg-pascal-devel mailing list
> Pkg-pascal-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-pascal-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-pascal-devel/attachments/20200809/7166e59f/attachment.html>


More information about the Pkg-pascal-devel mailing list