[Lazarus] Compilation error when targeting Android

samps okholm sampsokholm at gmail.com
Fri Nov 8 04:04:48 CET 2013


So....

I managed, using FPC 2.6.2, to compile a 2.7.1 cross complier for ARM
Android. When asked, the compiler returns this swada:

C:\>C:\Develop\FPC\pp\bin\i386-win32\ppcrossarm -Tandroid -i
Free Pascal Compiler version 2.7.1

Compiler Date      : 2013/11/08
Compiler CPU Target: arm

Supported targets:
  Linux for ARMEL
  WinCE for ARM
  GameBoy Advance
  PalmOS
  Nintendo DS
  Embedded
  Symbian OS for ARM
  Darwin for ARM
  Android for ARMEL

Supported CPU instruction sets:
  ARMV3,ARMV4,ARMV4T,ARMV5,ARMV5T,ARMV5TE,ARMV5TEJ,ARMV6,ARMV6K,ARMV6T2
  ARMV6Z,ARMV6M,ARMV7,ARMV7A,ARMV7R,ARMV7M,ARMV7EM

Supported FPU instruction sets:
  SOFT,LIBGCC,FPA,FPA10,FPA11,VFPV2,VFPV3,VFPV3_D16,FPV4_S16

Supported inline assembler modes:
  STANDARD
  GAS

Supported ABI targets:
  DEFAULT
  EABI

Supported Optimizations:
  REGVAR
  STACKFRAME
  LOOPUNROLL
  TAILREC
  CSE
  ORDERFIELDS
  FASTMATH
  REMOVEEMPTYPROCS
  CONSTPROP

Supported Whole Program Optimizations:
  All
  DEVIRTCALLS
  OPTVMTS
  SYMBOLLIVENESS

Supported Microcontroller types:
  LPC810M021FN8,LPC811M001FDH16,LPC812M101FDH16,LPC812M101FD20
  LPC812M101FDH20,LPC1110FD20,LPC1111FDH20/002,LPC1111FHN33/101
  LPC1111FHN33/102,LPC1111FHN33/103,LPC1111FHN33/201,LPC1111FHN33/202
  LPC1111FHN33/203,LPC1112FD20/102,LPC1112FDH20/102,LPC1112FDH28/102
  LPC1112FHN33/101,LPC1112FHN33/102,LPC1112FHN33/103,LPC1112FHN33/201
  LPC1112FHN24/202,LPC1112FHN33/202,LPC1112FHN33/203,LPC1112FHI33/202
  LPC1112FHI33/203,LPC1113FHN33/201,LPC1113FHN33/202,LPC1113FHN33/203
  LPC1113FHN33/301,LPC1113FHN33/302,LPC1113FHN33/303,LPC1113FBD48/301
  LPC1113FBD48/302,LPC1113FBD48/303,LPC1114FDH28/102,LPC1114FN28/102
  LPC1114FHN33/201,LPC1114FHN33/202,LPC1114FHN33/203,LPC1114FHN33/301
  LPC1114FHN33/302,LPC1114FHN33/303,LPC1114FHN33/333,LPC1114FHI33/302
  LPC1114FHI33/303,LPC1114FBD48/301,LPC1114FBD48/302,LPC1114FBD48/303
  LPC1114FBD48/323,LPC1114FBD48/333,LPC1115FBD48/303,LPC11C12FBD48/301
  LPC11C14FBD48/301,LPC11C22FBD48/301,LPC11C24FBD48/301
  LPC11D14FBD100/302,LPC1224FBD48/101,LPC1224FBD48/121,LPC1224FBD64/101
  LPC1224FBD64/121,LPC1225FBD48/301,LPC1225FBD48/321,LPC1225FBD64/301
  LPC1225FBD64/321,LPC1226FBD48/301,LPC1226FBD64/301,LPC1227FBD48/301
  LPC1227FBD64/301,LPC12D27FBD100/301,LPC1311FHN33,LPC1311FHN33/01
  LPC1313FHN33,LPC1313FHN33/01,LPC1313FBD48,LPC1313FBD48/01,LPC1315FHN33
  LPC1315FBD48,LPC1316FHN33,LPC1316FBD48,LPC1317FHN33,LPC1317FBD48
  LPC1317FBD64,LPC1342FHN33,LPC1342FBD48,LPC1343FHN33,LPC1343FBD48
  LPC1345FHN33,LPC1345FBD48,LPC1346FHN33,LPC1346FBD48,LPC1347FHN33
  LPC1347FBD48,LPC1347FBD64,LPC2114,LPC2124,LPC2194,LPC1754,LPC1756
  LPC1758,LPC1764,LPC1766,LPC1768,AT91SAM7S256,AT91SAM7SE256,AT91SAM7X256
  AT91SAM7XC256,STM32F100X4,STM32F100X6,STM32F100X8,STM32F100XB
  STM32F100XC,STM32F100XD,STM32F100XE,STM32F101X4,STM32F101X6,STM32F101X8
  STM32F101XB,STM32F101XC,STM32F101XD,STM32F101XE,STM32F101XF,STM32F101XG
  STM32F102X4,STM32F102X6,STM32F102X8,STM32F102XB,STM32F103X4,STM32F103X6
  STM32F103X8,STM32F103XB,STM32F103XC,STM32F103XD,STM32F103XE,STM32F103XF
  STM32F103XG,STM32F107X8,STM32F107XB,STM32F107XC,LM3S1110,LM3S1133
  LM3S1138,LM3S1150,LM3S1162,LM3S1165,LM3S1166,LM3S2110,LM3S2139,LM3S6100
  LM3S6110,LM3S1601,LM3S1608,LM3S1620,LM3S1635,LM3S1636,LM3S1637,LM3S1651
  LM3S2601,LM3S2608,LM3S2620,LM3S2637,LM3S2651,LM3S6610,LM3S6611,LM3S6618
  LM3S6633,LM3S6637,LM3S8630,LM3S1911,LM3S1918,LM3S1937,LM3S1958,LM3S1960
  LM3S1968,LM3S1969,LM3S2911,LM3S2918,LM3S2919,LM3S2939,LM3S2948,LM3S2950
  LM3S2965,LM3S6911,LM3S6918,LM3S6938,LM3S6950,LM3S6952,LM3S6965,LM3S8930
  LM3S8933,LM3S8938,LM3S8962,LM3S8970,LM3S8971,LM3S5951,LM3S5956,LM3S1B21
  LM3S2B93,LM3S5B91,LM3S9B81,LM3S9B90,LM3S9B92,LM3S9B95,LM3S9B96,LM3S5D51
  LM4F120H5,SC32442B,XMC4500X1024,XMC4500X768,XMC4502X768,XMC4504X512
  THUMB2_BARE

/swada

That part seems to be working.

Android NDK version r9b is installed and my Windows PATH has been updated
to show where to find the goodies:
C:\Program
Files\Android\android-ndk-r9b\toolchains\arm-linux-androideabi-4.8\prebuilt\windows\bin

The ARM/Android cross compiler resides in C:\Develop\FPC\pp\bin\i386-win32\
and I am trying to compile a program called test.pas, which is a standard
HelloWorld program with a single write('text') in the main body.

Windows is XP SP3 and here's what is returned when I try compiling test.pas:

C:\>
C:\>
C:\>C:\Develop\FPC\pp\bin\i386-win32\ppcrossarm -Tandroid test.pas
C:\Program
Files\Android\android-ndk-r9b\toolchains\arm-linux-androideabi-4.8\pr
ebuilt\windows\bin\arm-linux-androideabi-ld.bfd.exe: cannot find
crtbegin_dynami
c.o
C:\Program
Files\Android\android-ndk-r9b\toolchains\arm-linux-androideabi-4.8\pr
ebuilt\windows\bin\arm-linux-androideabi-ld.bfd.exe: cannot find -lc
test.pas(4,24) Error: Error while linking
test.pas(4,24) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

C:\>


I have googled about a bit, found some references to words in the error
message but nothing that seems relevant to my situation.


Any and all clues, gentlemen, please...

Samps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131108/b3ed9159/attachment-0002.html>


More information about the Lazarus mailing list