yes more problems with AndroidLCLtest lazarus / 43-Android ---------------------------------------------------------------------- scaddenp · 2013-06-26 04:12 So got it building (both with ant or with old apkbuilder), but still no joy. Tried several emulators and build with both -14 and -8. Same result. App launches and then dies the moment you click a control. Here is logcat. Any brilliant ideas on where to start figuring this out? (Man its a mission doing this in Android). I/ActivityManager(   65): Start proc com.pascal.lcltest for activity com.pascal. lcltest/.LCLActivity: pid=323 uid=10036 gids={3003, 1015} I/lclapp  (  323): Trying to load liblclapp.so D/dalvikvm(  323): Trying to load lib /data/data/com.pascal.lcltest/lib/liblclap p.so 0x46030268 D/dalvikvm(  323): Added shared lib /data/data/com.pascal.lcltest/lib/liblclapp. so 0x46030268 I/lclapp  (  323): JNI_OnLoad called I/lclapp  (  323): Reading our Activity Class I/lclapp  (  323): JNI_OnLoad finished I/lclapp  (  323): LCLOnCreate called by LCLActivity.onCreate I/lclapp  (  323): [TCDWidgetSet.CreateTimer] Result=42073840 I/lclapp  (  323): [TCDWidgetSet.DestroyTimer] TimerHandle=42073840 lTimer.Nativ eHandle=4603A0D0 lTimer.NativeGlobalReference=4603A0D0 I/lclapp  (  323): [TCDWidgetSet.CreateTimer] Result=42073840 I/lclapp  (  323): [TCDWidgetSet.DestroyTimer] TimerHandle=42073840 lTimer.Nativ eHandle=4603A180 lTimer.NativeGlobalReference=4603A180 I/lclapp  (  323): [TCDWSCustomCheckBox.GetPreferredSize] Width=143 Height=38 I/lclapp  (  323): [TCDWSCustomCheckBox.GetPreferredSize] Width=143 Height=38 I/lclapp  (  323): [TCDWSCustomForm.ShowHide] First form layout adjustment lOldD PI=96 lNewDPI=160 lOldFormWidth=220 lNewFormWidth=100 I/lclapp  (  323): [LCLOnConfigurationChanged] i=0 lOldDPI=160 lNewDPI=160 lOldF ormWidth=100 lNewFormWidth=1280 D/dalvikvm(  323): GC_EXTERNAL_ALLOC freed 1014 objects / 66240 bytes in 51ms I/ActivityManager(   65): Displayed activity com.pascal.lcltest/.LCLActivity: 28 45 ms (total 2845 ms) I/DEBUG   (   30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * ** I/DEBUG   (   30): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/ test-keys' I/DEBUG   (   30): pid: 323, tid: 323  >>> com.pascal.lcltest <<< I/DEBUG   (   30): signal 11 (SIGSEGV), fault addr 614c540e I/DEBUG   (   30):  r0 420784a0  r1 000000e6  r2 0000010b  r3 614c540f I/DEBUG   (   30):  r4 00000052  r5 00000125  r6 00000000  r7 4208b53c I/DEBUG   (   30):  r8 beddb914  r9 4208b530  10 4208b518  fp beddb564 I/DEBUG   (   30):  ip beddb568  sp beddb510  lr 80cef24c  pc 614c540e  cpsr 200 00030 I/DEBUG   (   30):          #00  pc 614c540e I/DEBUG   (   30):          #01  lr 80cef24c  /data/data/com.pascal.lcltest/lib/ liblclapp.so I/DEBUG   (   30): I/DEBUG   (   30): code around pc: I/DEBUG   (   30): 614c53ec ffffffff ffffffff ffffffff ffffffff I/DEBUG   (   30): 614c53fc ffffffff ffffffff ffffffff ffffffff I/DEBUG   (   30): 614c540c ffffffff ffffffff ffffffff ffffffff I/DEBUG   (   30): 614c541c ffffffff ffffffff ffffffff ffffffff I/DEBUG   (   30): 614c542c ffffffff ffffffff ffffffff ffffffff I/DEBUG   (   30): I/DEBUG   (   30): code around lr: I/DEBUG   (   30): 80cef22c e590003c e51b2044 e51b1040 e51b303c I/DEBUG   (   30): 80cef23c e593303c e5933000 e5933068 e12fff33 I/DEBUG   (   30): 80cef24c e3500000 0a00001b e51b0040 e3500000 I/DEBUG   (   30): 80cef25c ba000018 e51b003c e1a01000 e5911000 I/DEBUG   (   30): 80cef26c e59110b0 e12fff31 e51b1040 e1510000 I/DEBUG   (   30): I/DEBUG   (   30): stack: I/DEBUG   (   30):     beddb4d0  ffff6464 I/DEBUG   (   30):     beddb4d4  482ffd20 I/DEBUG   (   30):     beddb4d8  beddb534  [stack] I/DEBUG   (   30):     beddb4dc  beddb4e8  [stack] I/DEBUG   (   30):     beddb4e0  80d32504  /data/data/com.pascal.lcltest/lib/lib lclapp.so I/DEBUG   (   30):     beddb4e4  80d3023c  /data/data/com.pascal.lcltest/lib/lib lclapp.so I/DEBUG   (   30):     beddb4e8  00000040 I/DEBUG   (   30):     beddb4ec  00000004 I/DEBUG   (   30):     beddb4f0  00000000 I/DEBUG   (   30):     beddb4f4  4208b53c I/DEBUG   (   30):     beddb4f8  beddb57c  [stack] I/DEBUG   (   30):     beddb4fc  4829a260 I/DEBUG   (   30):     beddb500  00000000 I/DEBUG   (   30):     beddb504  00000000 I/DEBUG   (   30):     beddb508  00000004 I/DEBUG   (   30):     beddb50c  80e4d968  /data/data/com.pascal.lcltest/lib/lib lclapp.so I/DEBUG   (   30): #00 beddb510  00000004 I/DEBUG   (   30):     beddb514  80c7e16c  /data/data/com.pascal.lcltest/lib/lib lclapp.so I/DEBUG   (   30):     beddb518  48288fa0 I/DEBUG   (   30):     beddb51c  00000004 I/DEBUG   (   30):     beddb520  0000010b I/DEBUG   (   30):     beddb524  000000e6 I/DEBUG   (   30):     beddb528  482ffd20 I/DEBUG   (   30):     beddb52c  beddb590  [stack] I/DEBUG   (   30):     beddb530  00000000 I/DEBUG   (   30):     beddb534  00000000 I/DEBUG   (   30):     beddb538  00000000 I/DEBUG   (   30):     beddb53c  483001a0 I/DEBUG   (   30):     beddb540  beddb57c  [stack] I/DEBUG   (   30):     beddb544  00000000 I/DEBUG   (   30):     beddb548  00000000 I/DEBUG   (   30):     beddb54c  80cd7f64  /data/data/com.pascal.lcltest/lib/lib lclapp.so I/DEBUG   (   30):     beddb550  4208b530 I/DEBUG   (   30):     beddb554  00000052 D/Zygote  (   32): Process 323 terminated by signal (11) I/ActivityManager(   65): Process com.pascal.lcltest (pid 323) has died. I/WindowManager(   65): WIN DEATH: Window{4632cac0 com.pascal.lcltest/com.pascal .lcltest.LCLActivity paused=false} ---------------------------------------------------------------------- scaddenp · 2013-06-26 21:52 I dont suppose someone can offer a link to an androidlcltest.apk that they have successfully built so I can check whether the issue is with the emulator or my building of the code? ---------------------------------------------------------------------- Leledumbo · 2013-06-26 22:24 here's the one that I just built, targetting android-8. ---------------------------------------------------------------------- scaddenp · 2013-06-27 00:03 Many thanks even it was depressing. It ran fine mostly (show info in adb killed it and get position reported errors in logcat). Was that compiled with ndk-r8e? arm-linux-androideabi-4.4.3? If so, then somehow I am not building this right. My show test is: C:\codetyphon\fpc\bin\x86_64-win64\fpc.exe  -MObjFPC -Scghi -O1 -Tandroid -Parm -Xs -XX -va -FiC:\codetyphon\CodeOcean\2_Basics\samples\androidlcl\lib\arm-android -FlC:\Android\android-ndk-r8e\platforms\android-8\arch-arm\usr\lib -FlC:\Android\android-ndk-r8e\toolchains\arm-linux- androideabi-4.4.3\prebuilt\windows-x86_64\lib\gcc\arm-linux- androideabi\4.4.3 -FlC:\codetyphon\fpcsrc\packages\fcl-db\src\sqlite -FuC:\codetyphon\fpcsrc\packages\fcl-db\src\sqlite -FuC:\codetyphon\typhon\lcl\units\arm-android\customdrawn -FuC:\codetyphon\typhon\lcl\units\arm-android -FuC:\codetyphon\typhon\components\lazutils\lib\arm-android -FuC:\codetyphon\typhon\packager\units\arm-android -FuC:\codetyphon\CodeOcean\2_Basics\samples\androidlcl\ -FUC:\codetyphon\CodeOcean\2_Basics\samples\androidlcl\lib\arm- android\ -l -dLCL -dLCLcustomdrawn -dANDROID -Xd -CpARMV6 C:\codetyphon\typhonTemp\testcompileroptions.pas I notice your classes.dex is 26,000 to my 21,000 and your liblcltest.so is nearly twice the size - is it compiled with debug info? ---------------------------------------------------------------------- Leledumbo · 2013-06-27 06:56 QuoteIt ran fine mostly (show info in adb killed it and get position reported errors in logcat)What android version? AFAIR it works fine until ICS and I haven't tried (including the one I attached above) on JB. I just flashed a JB ROM so I can test tonight. QuoteWas that compiled with ndk-r8e?I forgot, will check tonight. Quotearm-linux-androideabi-4.4.3?This one is yes. QuoteI notice your classes.dex is 26,000 to my 21,000 and your liblcltest.so is nearly twice the size - is it compiled with debug info?No, it's not. I choose release build. However, I change some of the options: -O3 -Or (or -OoREGVAR), maybe more. ---------------------------------------------------------------------- Squall64 · 2013-07-06 08:14 Same problem. App launches fine and then dies as soon as i click a control. Code: [Select]I/ActivityManager(  148): Start proc com.pascal.lcltest for activity com.pascal.lcltest/.LCLActivity: pid=835 uid=10044 gids={3003, 1015, 1028} I/dalvikvm(  835): Turning on JNI app bug workarounds for target SDK version 8... E/Trace   (  835): error opening trace file: No such file or directory (2) I/lclapp  (  835): Trying to load liblclapp.so D/dalvikvm(  835): Trying to load lib /data/data/com.pascal.lcltest/lib/liblclapp.so 0x40ff84d0 D/dalvikvm(  835): Added shared lib /data/data/com.pascal.lcltest/lib/liblclapp.so 0x40ff84d0 I/lclapp  (  835): JNI_OnLoad called I/lclapp  (  835): Reading our Activity Class I/lclapp  (  835): JNI_OnLoad finished I/lclapp  (  835): LCLOnCreate called by LCLActivity.onCreate I/lclapp  (  835): [TCDWidgetSet.CreateTimer] Result=49147840 I/lclapp  (  835): [TCDWidgetSet.DestroyTimer] TimerHandle=49147840 lTimer.NativeHandle=410039C0 lTimer.NativeGlobalReference=1D2001E6 I/lclapp  (  835): [TCDWidgetSet.CreateTimer] Result=49147840 I/lclapp  (  835): [TCDWidgetSet.DestroyTimer] TimerHandle=49147840 lTimer.NativeHandle=41003A70 lTimer.NativeGlobalReference=1D3001E6 I/lclapp  (  835): [TCDWSCustomCheckBox.GetPreferredSize] Width=146 Height=38 I/lclapp  (  835): [TCDWSCustomCheckBox.GetPreferredSize] Width=146 Height=38 I/lclapp  (  835): [TCDWSCustomForm.ShowHide] First form layout adjustment lOldDPI=96 lNewDPI=160 lOldFormWidth=220 lNewFormWidth=100 V/TabletStatusBar(  204): setLightsOn(true) D/        (  835): HostConnection::get() New Host Connection established 0x2a120d48, tid 835 I/lclapp  (  835): [LCLOnConfigurationChanged] i=0 lOldDPI=160 lNewDPI=160 lOldFormWidth=100 lNewFormWidth=1280 D/dalvikvm(  835): GC_FOR_ALLOC freed 71K, 4% free 6039K/6275K, paused 29ms, total 29ms I/dalvikvm-heap(  835): Grow heap (frag case) to 9.494MB for 3722256-byte allocation D/dalvikvm(  835): GC_CONCURRENT freed 2K, 3% free 9672K/9927K, paused 16ms+0ms, total 23ms I/ActivityManager(  148): Displayed com.pascal.lcltest/.LCLActivity: +1s624ms F/libc    (  835): Fatal signal 11 (SIGSEGV) at 0x614c540e (code=1), thread 835 (.pascal.lcltest) I/DEBUG   (   33): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG   (   33): Build fingerprint: 'generic/sdk/generic:4.1.2/MASTER/495790:eng/test-keys' I/DEBUG   (   33): pid: 835, tid: 835, name: UNKNOWN  >>> com.pascal.lcltest <<< I/DEBUG   (   33): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 614c540e I/DEBUG   (   33):     r0 4914c470  r1 000000e6  r2 0000010b  r3 614c540f I/DEBUG   (   33):     r4 491d4d20  r5 bea253f0  r6 000000e6  r7 0000010b I/DEBUG   (   33):     r8 00000052  r9 00000000  sl 00000000  fp bea25424 I/DEBUG   (   33):     ip 48e4d69c  sp bea25388  lr 48e4d6f4  pc 614c540e  cpsr 20000030 I/DEBUG   (   33):     d0  ffffffebc1a8fc00  d1  0000000200000007 I/DEBUG   (   33):     d2  41cc000044a00000  d3  3f00000041c80000 I/DEBUG   (   33):     d4  40800000c1980000  d5  4180000040000000 I/DEBUG   (   33):     d6  413d000000000000  d7  0000000000000000 I/DEBUG   (   33):     d8  0000000000000000  d9  0000000000000000 I/DEBUG   (   33):     d10 0000000000000000  d11 0000000000000000 I/DEBUG   (   33):     d12 0000000000000000  d13 0000000000000000 I/DEBUG   (   33):     d14 0000000000000000  d15 0000000000000000 I/DEBUG   (   33):     scr 60000011 I/DEBUG   (   33): I/DEBUG   (   33): backtrace: I/DEBUG   (   33):     #00  pc 614c540e  I/DEBUG   (   33):     #01  pc 001ab6f0  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33): I/DEBUG   (   33): stack: I/DEBUG   (   33):          bea25348  00000000  I/DEBUG   (   33):          bea2534c  00000000  I/DEBUG   (   33):          bea25350  00000000  I/DEBUG   (   33):          bea25354  00000000  I/DEBUG   (   33):          bea25358  4915dfa0  I/DEBUG   (   33):          bea2535c  4914c470  I/DEBUG   (   33):          bea25360  49154ca0  I/DEBUG   (   33):          bea25364  4916f260  I/DEBUG   (   33):          bea25368  4916f260  I/DEBUG   (   33):          bea2536c  48e1db94  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33):          bea25370  49154ca0  I/DEBUG   (   33):          bea25374  491d51a0  I/DEBUG   (   33):          bea25378  bea253e8  [stack] I/DEBUG   (   33):          bea2537c  00000000  I/DEBUG   (   33):          bea25380  00000000  I/DEBUG   (   33):          bea25384  48e2613c  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33):     #00  bea25388  bea25310  [stack] I/DEBUG   (   33):          ........  ........ I/DEBUG   (   33):     #01  bea25388  bea25310  [stack] I/DEBUG   (   33):          bea2538c  00000125  I/DEBUG   (   33):          bea25390  00000000  I/DEBUG   (   33):          bea25394  00000000  I/DEBUG   (   33):          bea25398  00000000  I/DEBUG   (   33):          bea2539c  48e4f0c4  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33):          bea253a0  4914c470  I/DEBUG   (   33):          bea253a4  4914c470  I/DEBUG   (   33):          bea253a8  00000001  I/DEBUG   (   33):          bea253ac  4914c470  I/DEBUG   (   33):          bea253b0  491bc200  I/DEBUG   (   33):          bea253b4  48da78dc  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33):          bea253b8  4914c470  I/DEBUG   (   33):          bea253bc  48da1efc  /data/data/com.pascal.lcltest/lib/liblclapp.so I/DEBUG   (   33):          bea253c0  4914c470  I/DEBUG   (   33):          bea253c4  bea25408  [stack] I/DEBUG   (   33): I/DEBUG   (   33): memory near r0: I/DEBUG   (   33):     4914c450 666e4920 6e69206f 42444120 64007800   Info in ADB.x.d I/DEBUG   (   33):     4914c460 00000000 00000000 00000000 0046c031  ............1.F. I/DEBUG   (   33):     4914c470 490464bc 4916f620 4915a100 000000e6  .d.I ..I...I.... I/DEBUG   (   33):     4914c480 0000010b 0000020c 0000015e 00000000  ........^....... I/DEBUG   (   33):     4914c490 00000000 00000000 00000000 0049c031  ............1.I. I/DEBUG   (   33): I/DEBUG   (   33): memory near r3: I/DEBUG   (   33):     614c53ec ffffffff ffffffff ffffffff ffffffff  ................ I/DEBUG   (   33):     614c53fc ffffffff ffffffff ffffffff ffffffff  ................ I/DEBUG   (   33):     614c540c ffffffff ffffffff ffffffff ffffffff  ................ I/DEBUG   (   33):     614c541c ffffffff ffffffff ffffffff ffffffff  ................ I/DEBUG   (   33):     614c542c ffffffff ffffffff ffffffff ffffffff  ................ I/DEBUG   (   33): I/DEBUG   (   33): memory near r4: I/DEBUG   (   33):     491d4d00 00000000 00000000 00000000 00000000  ................ I/DEBUG   (   33):     491d4d10 00000000 00000000 00000000 00d1c081  ................ I/DEBUG   (   33):     491d4d20 49046534 00000000 49025044 00000001  4e.I....DP.I.... I/DEBUG   (   33):     491d4d30 4929c500 00000000 00000000 4915dfa0  ..)I...........I I/DEBUG   (   33):     491d4d40 00000000 4916d6a0 00000000 49158df0  .......I.......I I/DEBUG   (   33): I/DEBUG   (   33): memory near r5: I/DEBUG   (   33):     bea253d0 00000000 00000000 491d51a0 491d4d20  .........Q.I M.I I/DEBUG   (   33):     bea253e0 00000126 00000000 00000000 ffff0000  &............... I/DEBUG   (   33):     bea253f0 00000000 ffff0000 48e3eb14 0000020c  ...........H.... I/DEBUG   (   33):     bea25400 491bc24c 49154ca0 491bc200 00000008  L..I.L.I...I.... I/DEBUG   (   33):     bea25410 00000008 49154ca0 bea255ec bea25428  .....L.I.U..(T.. I/DEBUG   (   33): I/DEBUG   (   33): memory near fp: I/DEBUG   (   33):     bea25404 49154ca0 491bc200 00000008 00000008  .L.I...I........ I/DEBUG   (   33):     bea25414 49154ca0 bea255ec bea25428 48e3e73c  .L.I.U..(T..<..H I/DEBUG   (   33):     bea25424 48e4ed54 00000000 00000000 00000126  T..H........&... I/DEBUG   (   33):     bea25434 00000053 00000000 00000000 00000000  S............... I/DEBUG   (   33):     bea25444 00000000 00000000 00000000 00000000  ................ I/DEBUG   (   33): I/DEBUG   (   33): memory near ip: I/DEBUG   (   33):     48e4d67c e8bd8000 e5903054 e0811003 e580105c  ....T0......\... I/DEBUG   (   33):     48e4d68c e5903058 e0821003 e5801060 e12fff1e  X0......`...../. I/DEBUG   (   33):     48e4d69c e92d40f0 e24dd004 e1a04000 e1a05003  .@-...M..@...P.. I/DEBUG   (   33):     48e4d6ac e594005c e0816000 e5940060 e0827000  \....`..`....p.. I/DEBUG   (   33):     48e4d6bc e1a00004 e1a01004 e5911000 e59110bc  ................ I/DEBUG   (   33): I/DEBUG   (   33): memory near sp: I/DEBUG   (   33):     bea25368 4916f260 48e1db94 49154ca0 491d51a0  `..I...H.L.I.Q.I I/DEBUG   (   33):     bea25378 bea253e8 00000000 00000000 48e2613c  .S..........>> com.pascal.lcltest <<< ---------------------------------------------------------------------- engkin · 2013-10-17 17:46 @kitsaros, I have both FPC 2.7.1 and NDK r7c. The only changes I did were related to their locations on my computer. The size of liblclapp.so file that I built is around 5 MB (precisely 5,194,207 bytes) while yours is less than 2.7 MB (2,829,591 bytes) My second guess is that either CodeTyphon is using wrong compiler/linker or your units\arm-android\* were generated using a different NDK (not r7c). With a quick search I saw what makes me think that CT 4.5 is supposed to be used with Android NDK-r8e. Am I right? Try to use NDK-r8e with CT 4.5 Quote from: Leledumbo on October 17, 2013, 04:34:54 pmAre you trying to access the clipboard? I don't think it's working for Android. I almost thought the same, but Leledumbo had attached the same sample before and it has the same code!! Code: [Select]procedure Tform1.btnProgressClick(Sender: TObject); var   sqliteDLL : Pointer; begin ...   btnProgress.Caption := IntToHex(PtrUInt(sqliteDLL), 8);   DebugLn('Button1Click');   ProgressBar1.Position := ProgressBar1.Position + 10;   DebugLn('Cliboard.AsText='+ClipBoard.AsText); Notice that it has the same wrong spelling Cliboard for Clipboard. That's why I don't think it's the sample. I think this smaller sized .so file is generated using two different  NDK versions, one to compile the sample code and the other was used to compile the other packages units\arm-android\* ---------------------------------------------------------------------- kitsaros · 2013-10-17 19:52 using the android-ndk-r8e i can compile successfully again the "liblclapp.so" but i get a 2,764 kb file size ... :S ---------------------------------------------------------------------- engkin · 2013-10-17 23:03 kitsaros, if I'm right, it's not enough to compile using android- ndk-r8e.  The object files that were generated previously need to be deleted so that the source code gets compiled again. I don't know how to do that with CodeTyphon. I tried to figure it out from their wiki. You might want to search your CT directory for a folder named something like arm-android, maybe!! ---------------------------------------------------------------------- engkin · 2013-10-17 23:35 kitsaros, can you compile that sample for i386 instead of arm CPU? Generate an apk with .so for i386 and uploaded here and I'll be happy to try it. ---------------------------------------------------------------------- kitsaros · 2013-10-18 00:50 Changing the CPU family to i386 i get : c:\codetyphon\fpc\bin\i386-win32\i386-android-ld.exe: skipping incompatible C:\Android\android-ndk-r8e\platforms\android-8\arch- arm\usr\lib\crtbegin_so.o when searching for C:\Android\android- ndk-r8e\platforms\android-8\arch-arm\usr\lib\crtbegin_so.o I have recompiled the crosselement (arm-android) and the i386-android obtaining same results ---------------------------------------------------------------------- engkin · 2013-10-18 02:52 Do you have these two folders? c:\codetyphon\fpc\units\arm-android c:\codetyphon\fpc\units\i386-android I expect that you have the first one, but not the second, yet. Quote from: kitsaros on October 18, 2013, 02:50:32 amChanging the CPU family to i386 i get : c:\codetyphon\fpc\bin\i386-win32\i386-android-ld.exe: skipping incompatible C:\Android\android-ndk-r8e\platforms\android-8\arch- arm\usr\lib\crtbegin_so.o when searching for C:\Android\android- ndk-r8e\platforms\android-8\arch-arm\usr\lib\crtbegin_so.o You have to choose the correct path. The one you have is for arm CPU. Maybe something like: C:\Android\android-ndk-r8e\platforms\android-8\arch-x86\usr\lib instead of C:\Android\android-ndk-r8e\platforms\android-8\arch-arm\usr\lib\ if you did not find it within android-8 then simply try android-14: C:\Android\android-ndk-r8e\platforms\android-14\arch-x86\usr\lib You'll face the same problem with another path. Quote from: kitsaros on October 18, 2013, 02:50:32 amI have recompiled the crosselement (arm-android) and the i386-android obtaining same results These are just the compilers and linkers, not the object files. ---------------------------------------------------------------------- kitsaros · 2013-10-18 03:10 QuoteDo you have these two folders? c:\codetyphon\fpc\units\arm-android c:\codetyphon\fpc\units\i386-android Yes Adding at -FI C:\Android\android- ndk-r8e\platforms\android-14\arch-x86\usr\lib\;C:\Android\android- ndk-r8e\toolchains\x86-4.4.3\prebuilt\windows\lib\gcc\i686-linux- android\4.4.3 i get this error : c:\codetyphon\fpc\bin\i386-win32\i386-android-ld.exe: cannot find -lsqlite3 ---------------------------------------------------------------------- engkin · 2013-10-18 03:36 Quote from: kitsaros on October 18, 2013, 05:10:06 am  See below Add at -Fu C:\codetyphon\fpcsrc\packages\fcl-db\src\sqlite\ (I accidentally editted your message instead of replying. I restored it as good as possible. - marcov) ---------------------------------------------------------------------- marcov · 2013-10-18 09:04 Quote from: engkin on October 18, 2013, 05:36:28 amAdd at -Fu C:\codetyphon\fpcsrc\packages\fcl-db\src\sqlite\ In general, including source directories will only lead to more trouble, since there are quickly then two sources available to the compiler, precompiled (*.o *.ppu in some units/ hierarchy) and source. This will make interpreting error messages about not finding units very difficult and dangerous. Moreover I think the compiler can't find an .so, rather than an unit.  Object files are generally not prefixed by -l in the link.res (but maybe it is different on Android) ---------------------------------------------------------------------- kitsaros · 2013-10-18 09:52 i had included that path -Fu C:\codetyphon\fpcsrc\packages\fcl- db\src\sqlite\ the error appears with that option.  Anyway i cannot understand why i have to keep focusing my efforts on i386 option. From the crossbuilding script i can see this : Code: [Select]C:/codetyphon/fpc/bin/i386-win32/make 'FPC=C:/codetyphon/fpcsrc/compiler/ppc.exe' OS_TARGET=win32 CPU_TARGET=i386 CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=? On CROSSBINDIR= it is not needed the ndk path ? ---------------------------------------------------------------------- engkin · 2013-10-18 14:14 Quote from: engkin on October 18, 2013, 05:36:28 am(I accidentally editted your message instead of replying. I restored it as good as possible. - marcov) It's ok. When I first saw it I was surprised. Now I'm laughing. It was: Quote from: kitsaros on October 18, 2013, 05:10:06 amQuoteDo you have these two folders? c:\codetyphon\fpc\units\arm-android c:\codetyphon\fpc\units\i386-android Yes @kitsaros I need to know the size of each of these two folders. Quotecannot find -lsqlite3 I adjusted the path that was already in the project options, from CT to FPC, but it did not work. I searched for sqlite3.* and the best result I found was sqlite3.pp in C:\laz4android\fpc\2.7.1\source\packages\sqlite\src\ Considering your directory structure I assume it should be: C:\codetyphon\fpcsrc\packages\sqlite\src\ Can you check? see if you have that directory and it includes sqlite3.pp otherwise search for that file. Quote from: kitsaros on October 18, 2013, 11:52:38 am Anyway i cannot understand why i have to keep focusing my efforts on i386 option. Your problem is possibly in c:\codetyphon\fpc\units\arm-android. If the second one (i386-android) is not built yet, then we can control/know which NDK is going to be used. Again, I'm just guessing. I don't have/use CT, so when I compiled this sample using Lazarus/FPC I had this problem Quote from: kitsaros on October 18, 2013, 11:52:38 am From the crossbuilding script i can see this : Code: [Select]C:/codetyphon/fpc/bin/i386-win32/make 'FPC=C:/codetyphon/fpcsrc/compiler/ppc.exe' OS_TARGET=win32 CPU_TARGET=i386 CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl CYCLELEVEL=? On CROSSBINDIR= it is not needed the ndk path ?   Yup. Unless you have it in your path (if you do I suggest you remove it) for x86 CPU: OS_TARGET=Android CPU_TARGET=i386 CROSSBINDIR=C:\Android-ndk\android- ndk-???\toolchains\x86-4.4.3\prebuilt\windows\bin BINUTILSPREFIX=i686-android-linux- for Arm CPU: OS_TARGET=Android CPU_TARGET=Arm CROSSBINDIR=C:\Android\android-ndk-???\toolchains\arm-linux- androideabi-4.4.3\prebuilt\windows\bin BINUTILSPREFIX=arm-linux-androideabi- ---------------------------------------------------------------------- kitsaros · 2013-10-18 18:38 c:\codetyphon\fpc\units\arm-android -> 53.0 MB (55,609,590 bytes) c:\codetyphon\fpc\units\i386-android -> 52.3 MB (54,880,111 bytes) In fact the path for the  sqlite3.pp is : C:\laz4android\fpc\2.7.1\source\packages\sqlite\src\ How can i edit the cross script of ct in order to add CROSSBINDIR=C:\Android-ndk\android- ndk-???\toolchains\x86-4.4.3\prebuilt\windows\bin BINUTILSPREFIX=i686-android-linux I still get c:\codetyphon\fpc\bin\i386-win32\i386-android-ld.exe: cannot find -lsqlite3 selecting OS_TARGET=Android CPU_TARGET=i386 ---------------------------------------------------------------------- kitsaros · 2013-10-21 20:03 Hello , i have posted here my solution http://forum.lazarus.freepascal.org/index.php/topic,22414.0.html Have a nice day and thanks to all