lcl example crashes lazarus / 43-Android ---------------------------------------------------------------------- tanakian · 2014-12-15 13:10 let me explain what i did symlinks for fpc. tried both 4.8 and 4.6 versions. Quotesudo ln -s /opt/android-ndk/toolchains/arm-linux- androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld.bfd /usr/bin/arm-android-ld sudo ln -s /opt/android-ndk/toolchains/arm-linux- androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as /usr/bin/arm-android-as compiled x86_64 and arm versions of git fpc. Quotegit clone https://github.com/graemeg/freepascal.git QuotePRF="/opt" FPC="fpc" VER="2.7.1" cd freepascal make all INSTALL_PREFIX=$PRF/$FPC make crossall OS_TARGET=android CPU_TARGET=arm CROSSOPT='-CpARMv5'  INSTALL_PREFIX=$OPT/$FPC Quotecd freepascal make install INSTALL_PREFIX=/opt/fpc make crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT='-CpARMv5' INSTALL_PREFIX=/opt/fpc Quoteln -s /opt/fpc/lib/fpc/2.7.1/ppcrossarm /opt/fpc/lib/fpc/2.7.1/ppcarm Quote/opt/fpc/bin/fpcmkcfg -d basepath=/opt/fpc/lib/fpc/2.7.1 -o /etc/fpc.cfg tested Quoteexport PATH=/opt/fpc/lib/fpc/2.7.1:$PATH /opt/fpc/bin/fpc -Parm -Tandroid now lazarus Quotegit clone https://github.com/graemeg/lazarus export PATH="/opt/fpc/bin:/opt/fpc/lib/fpc/2.7.1:$PATH" cd lazarus make lcl test did not pass "ant debug" stage. for that i have edited files: local.properties looks: Quote#sdk.dir=/home/felipe/Programas/android-sdk-linux sdk.dir=/opt/android-sdk-update-manager default.properties: Quotetarget=android-18 i have tried different targets. so now i can build apk, but it always crashes both on real device and emulator with android 4 version. i have rebuilt fpc and lazarus several times for armv5 and armv6 but it does not help actually. even just pressing a button crashes the application. i have removed everything from lcl test and left only one button but it does crash on click too. even if there is no event assigned. ---------------------------------------------------------------------- tanakian · 2014-12-15 13:15 android ndk version 10b, lazarus and fpc - git versions, always crash. one week ago, now. ---------------------------------------------------------------------- DelphiFreak · 2014-12-16 03:40 If you are on windows then ry laztoapk and let us know if it works. The wiki at laztoapk on sourceforge contains a table with comfigurations that worked. ---------------------------------------------------------------------- tanakian · 2014-12-16 09:17 no i am not on windows. ---------------------------------------------------------------------- Leledumbo · 2014-12-16 09:43 I have neither ARMv5 nor ARMv6 devices so I can't tell. But my apps compiled for ARMv7a works just fine, both emulator and real device. I have to use 4.6 version of the toolchain, though. ---------------------------------------------------------------------- tanakian · 2014-12-17 11:24 I'll try to use armv7a backend and 4.6 toolkit, thank you. which API version do you use? ---------------------------------------------------------------------- Leledumbo · 2014-12-17 13:09 Quote from: tanakian on December 17, 2014, 12:24:02 pmI'll try to use armv7a backend and 4.6 toolkit, thank you. which API version do you use? 14 for both target and min SDK ---------------------------------------------------------------------- tanakian · 2014-12-20 15:37 with 14 it does not even run. with api 8 it runs but crashes like with api 18. now tested with fpc for armv7a. 4.6 tools. ---------------------------------------------------------------------- Leledumbo · 2014-12-20 18:17 Quote from: tanakian on December 20, 2014, 04:37:28 pmwith 14 it does not even run. with api 8 it runs but crashes like with api 18. now tested with fpc for armv7a. 4.6 tools. Wait, are you using LCL Custom Drawn? I haven't used it for a long time. My statement above applies to LazAndroidModuleWizard generated apps. ---------------------------------------------------------------------- tanakian · 2014-12-22 07:15 yes, there is a custom drawn lcl example. i am trying to compile it. ---------------------------------------------------------------------- tanakian · 2014-12-22 07:27 i have tried to comple lazandroidmodulewizard minute ago. it fails with "character.pas(29,3) Fatal: Cannot find unit unicodedata used by character." ---------------------------------------------------------------------- marcov · 2014-12-22 11:11 The makefile of linux looks very different from target android. It looks like that hasn't been run in an year or so. ---------------------------------------------------------------------- Leledumbo · 2014-12-22 11:36 Quote from: tanakian on December 22, 2014, 08:27:52 ami have tried to comple lazandroidmodulewizard minute ago. it fails with "character.pas(29,3) Fatal: Cannot find unit unicodedata used by character." There's no such a unit here. What LazAndroidModuleWizard are you compiling? I just updated it today and it still works like yesterday and months ago. Even the size of the binary has been halved. ---------------------------------------------------------------------- tanakian · 2014-12-22 19:49 i have noticed that there is no such a unit. like you i have cloned github version. do you use windows? i am on linux. may be that is the difference. ---------------------------------------------------------------------- Leledumbo · 2014-12-23 01:09 Quote from: tanakian on December 22, 2014, 08:49:55 pmi have noticed that there is no such a unit. like you i have cloned github version. do you use windows? i am on linux. may be that is the difference. no, I use linux. and if we pull from the same git repo and branch (should be, there's only 1 branch: master) there won't be any platform difference in source. git simply doesn't know that.