[fpc-devel] Re: Building the Android branch

Den cyraid at gmail.com
Wed Dec 19 23:39:01 CET 2012


Hello again Sven/Thomas,

     Sorry about the post again, you can ignore the previous post. I got 
targetandroid compiling with my buildscript.
I just had to do a make -C "$HOME/fpc-droid/utils/fpcm" before the 
actual make process, and setting PATH to 
"$HOME/fpc-droid/utils/fpcm:$PATH" as a workaround.

     I'm sure when it is merged you won't have to worry about the 
fpcmake as it will be aware of arm-android.  I thank you very very much 
for starting this branch.  I just wish I would've stumbled upon it 
sooner rather than doing it myself based on arm-linux.  A quick demo 
works now with Android's NativeActivity.  I imported Google's 
'libandroid_native_app_glue.a' and the headers from the 
lcl/interfaces/customdrawn/android interface from Lazarus with success.  
I only had to change the 'ANativeActivity_onCreate' translation.  Now if 
only you could include NativeAppGlue (record's and procedure interfaces) 
and the other header translations from 
lcl/interfaces/customdrawn/android that would be most excellent. :)

Thank you very much again for saving me a lot of time.

- Dennis

On 12-12-19 10:18 AM, Sven Barth wrote:
> Am 19.12.2012 16:42, schrieb Thomas Schatzl:
>> On Wed, 2012-12-19 at 16:20 +0100, Sven Barth wrote:
>>> Am 18.12.2012 17:47, schrieb Thomas Schatzl:
>>>> Looking through compiler/systems/t_android.pas, you may want to try
>>>> commmenting line 343, the one that adds info.Dynamiclinker to the
>>>> input files. Looks wrong. (system/bin/linker is passed to ld later as
>>>> --dynamic-linker option later anyway).
>>> Ok... by removing the addition of the dynamic linker I can successfully
>>> compile and link the DLL, but when starting it I get an illegal
>>> instruction error... I have not yet tested whether this can be
>>> reproduced with an empty library as well.
>>>
>>> === logcat begin ===
>>>
>>> [...]
>>>
>>> === logcat end ===
>>>
>>> Edit: Linking with debug information I could resolve the address to
>>> InterlockedExchange. Hmm... It seems that the SDK's QEMU does not
>>> emulate a ARMv6 device?
>> - yes. See http://developer.android.com/tools/devices/emulator.html.
>> Btw, there is not much point to compiling for armv6 for Android. The two
>> official ABIs are either armv5te + softfloat or armv7a + vfpv3_d16
>> (maybe v2).
> Then I'll need to recompile for ARMv5...
>> - if you are really interested about doing Android development, I
>> recommend getting a developer board. The emulator is really slow. Even
>> fast developer boards are really cheap now, e.g. quad-core 1.4Ghz ARMv7
>> with 1GB RAM for 70 USD (www.hardkernel.com , search for Odroid-U). This
>> device is actually pretty decent. Otherwise use an unused phone.
> Currently I'm mostly checking what would be necessary to get our 
> Windows Mobile application (more or less) running on Android using 
> LCL-CustomDrawn. For these tests the emulator and maybe my own Phone 
> should be enough for now.
>
> Thanks again. I'll report back if the situation improves :)
>
> Regards,
> Sven
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list