[Pkg-pascal-devel] Castle Game Engine build tool

Abou Al Montacir abou.almontacir at sfr.fr
Mon Feb 22 09:23:32 UTC 2016


Hi Michalis,
On Wed, 2016-02-17 at 20:49 +0100, Michalis Kamburelis wrote:
> 2016-02-16 12:37 GMT+01:00 Abou Al Montacir <abou.almontacir at sfr.fr>:
> > Using multi-arch you are probably able to compile for Debian for an other
> > CPU.
> 
> As far as I understood, Debian multi-arch is about installing
> libraries for multiple architectures on the same system (
> https://wiki.debian.org/Multiarch ). This is very useful for
> cross-compiling of course. But does Debian multi-arch also deal with
> distributing cross-compilers itself?
Not completely for now but partially. If you are compiling for the same CPU
traget but with other OS (like Debian freeBSD, ...) this will work.
If you are compiling for same OS but with an other CPU target then indeed this
will not work, you will need a cross compiler.
> I mean, in an ideal future, I would like to install on my Debian Linux
> (x86_64) an FPC binary that runs on x86_64 and can compile to arm
> (e.g. running Android OS) or i386 (e.g. running 32-bit Linux or
> Windows OS). That is, "ppcross386" or "ppcrossarm", running on x86_64.
> I would like to install them of course using pure "apt-get install
> ..." calls (without the need to make cross-compiler myself from FPC
> sources, like I do now). Is this within the scope of Debian
> multi-arch?
> 

The cross compiler himself is not, but this can be fixed easily.
Normally for this you need to use fpc -P<cpu> -Xp<path>. This is undocumented
feature but is very useful.
Please see compiler/utils/fpc.pp lines 167-240 for code selecting the compiler
backend.
This code could also be modified to use qemu as a workaround and install the
native arm compiler package for example
> If this is within the scope of Debian multi-arch, or just your TODO,
> then it's great! I volunteer for testing, as cross-compiling with FPC
> is very very useful for me:)
> 

I don't think this is within Debian mult-arch but sure in my todo list.
> > 
> > However for Windows a Android, you will need to recompile RTL, but this
> > could be done using fpc-source
> > 

> 
> 
> Sure, you can use fpc-source for that. But that's a little cheating:)
> 

I agree
> I mean, using FPC sources, you can compile for yourself FPC RTL for
> Windows, or FPC RTL for Android, or FPC cross-compiler from x86_64 to
> arm. But doing this is more complicated than just installing package
> like "fpc-windows-rtl" or "fpc-android-rtl" and
> 

Windows is a special case. 
> "fpc-android-arm-cross-compiler":) If you can (or want) to work with
> FPC sources, then you can probably do all this with upstream sources
> from freepascal.org, no need to really install Debian package
> fpc-source.
> 

I agree, it should be done the Debian way, install and run no need for
compilation.
> BTW, I'm not sure whether FPC Makefile/fpmake system supports
> out-of-tree build. So to use fpc-source like that, you may need to "cp
> -R /usr/share/fpcsrc/XXX ..." them to your home.
> 

Not sure, but we handle already this with Lazarus which may recompile files.
> > 
> > You cannot cross-compile to Android. For this, you're missing
> > 
> > This will come soon or late. It is on my todo list to make it easy to build
> > APK using FPC on a Debian box. I just need time, but maybe I should write
> > some wiki page about it.
> > 
> > 

> 
> 
> That's excellent news!:) Right now my instruction for setting up
> environment for using Castle Game Engine + Android look quite long
> (describe getting Android SDK, then Android NDK, then FPC
> cross-compiler to Android+Arm). See here:
> 
>   https://github.com/castle-engine/castle-engine/wiki/Android
> 
> 
> It would be absolutely fantastic if I could one day write there "If
> you're on Debian, no need to read this, just apt-get instal
> fpc-for-android"!
> 

That is what I want too!
-- 
Cheers,
Abou Al Montacir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20160222/a9f2b23d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-pascal-devel/attachments/20160222/a9f2b23d/attachment.sig>


More information about the Pkg-pascal-devel mailing list