let me explain what i did
symlinks for fpc. tried both 4.8 and 4.6 versions.
sudo 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.
git clone https://github.com/graemeg/freepascal.git
PRF="/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
cd freepascal
make install INSTALL_PREFIX=/opt/fpc
make crossinstall OS_TARGET=android CPU_TARGET=arm CROSSOPT='-CpARMv5' INSTALL_PREFIX=/opt/fpc
ln -s /opt/fpc/lib/fpc/2.7.1/ppcrossarm /opt/fpc/lib/fpc/2.7.1/ppcarm
/opt/fpc/bin/fpcmkcfg -d basepath=/opt/fpc/lib/fpc/2.7.1 -o /etc/fpc.cfg
tested
export PATH=/opt/fpc/lib/fpc/2.7.1:$PATH
/opt/fpc/bin/fpc -Parm -Tandroid
now lazarus
git 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:
#sdk.dir=/home/felipe/Programas/android-sdk-linux
sdk.dir=/opt/android-sdk-update-manager
default.properties:
target=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.