Recent

Author Topic: First steps of LCL-Android are ready  (Read 125780 times)

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: First steps of LCL-Android are ready
« Reply #45 on: August 25, 2011, 08:33:28 pm »
Here are the outputs.

cd libs/armeabi
ls -l

drwxr-xr-x 3 indianajones indianajones    4096 Aug 25 10:15 .
drwxr-xr-x 4 indianajones indianajones    4096 Aug 25 10:06 ..
-rwxr-xr-x 1 indianajones indianajones 4817652 Aug 25 10:15 libandroidlcltest.so
drwxr-xr-x 6 indianajones indianajones    4096 Aug 25 10:06 .svn
indianajones@mars ~/android/androidlcl/android/libs/armeabi $ pwd
/home/indianajones/android/androidlcl/android/libs/armeabi

============================================================

indianajones@mars ~/android/androidlcl/android/libs/armeabi $ file libandroidlcltest.so
libandroidlcltest.so: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

====================================================================

indianajones@mars ~/android/androidlcl/android/libs/armeabi $ ldd libandroidlcltest.so
   linux-gate.so.1 =>  (0xb76e8000)
   libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xb76b7000)
   libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb757c000)
   libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb755b000)
   libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7177000)
   libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb70dc000)
   libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7093000)
   libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0xb6fba000)
   libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb6fb4000)
   libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb6fb0000)
   libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb6f65000)
   libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xb6f45000)
   libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb6e92000)
   libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xb6e8d000)
   libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xb6d33000)
   /lib/ld-linux.so.2 (0xb76e9000)
   libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6d14000)
   libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xb6c0e000)
   librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xb6c05000)
   libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xb6bde000)
   libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb6bd2000)
   libXcomposite.so.1 => /usr/lib/i386-linux-gnu/libXcomposite.so.1 (0xb6bcf000)
   libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb6bcc000)
   libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb6bc6000)
   libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb6b98000)
   libfreetype.so.6 => /usr/lib/i386-linux-gnu/libfreetype.so.6 (0xb6b01000)
   libfontconfig.so.1 => /usr/lib/i386-linux-gnu/libfontconfig.so.1 (0xb6ad2000)
   libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb6ac0000)
   libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xb6ab6000)
   libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xb6ab2000)
   libXi.so.6 => /usr/lib/i386-linux-gnu/libXi.so.6 (0xb6aa3000)
   libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xb6a9b000)
   libXcursor.so.1 => /usr/lib/i386-linux-gnu/libXcursor.so.1 (0xb6a91000)
   libpcre.so.3 => /lib/libpcre.so.3 (0xb6a54000)
   libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb69e7000)
   libpng12.so.0 => /lib/libpng12.so.0 (0xb69be000)
   libxcb-shm.so.0 => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 (0xb69bb000)
   libxcb-render.so.0 => /usr/lib/i386-linux-gnu/libxcb-render.so.0 (0xb69b2000)
   libz.so.1 => /usr/lib/libz.so.1 (0xb699e000)
   libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb699a000)
   libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb6994000)
   libresolv.so.2 => /lib/i386-linux-gnu/i686/cmov/libresolv.so.2 (0xb6980000)
   libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xb6961000)
   libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb693b000)

============================================================

I can test with another machine which is not Android 2.3.4 at the weekend.
Thanks.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #46 on: August 25, 2011, 10:36:20 pm »
That is not an Android executable, it is a x86-linux executable compiled with the Gtk2 widgetset.

Please do the following:

1> Open the menu Project -> Project Options
2> Select the build mode "Android"
3> Select the widgetset android if not yet selected
4> Set the tab to Linking (maybe linking, not sure)
5> Set the OS to linux
6> Set the CPU to arm
7> Rebuild the executable with Build from Lazarus
8> Rebuild the package with ant debug
9> Uninstall the app and install it again in the phone

Jonathan

  • New Member
  • *
  • Posts: 40
Re: First steps of LCL-Android are ready
« Reply #47 on: August 26, 2011, 08:18:40 am »
Hi felipemdc ,
1> Open the menu Project -> Project Options

What about Tools/Configure build Lazarus?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #48 on: August 26, 2011, 08:28:58 am »
What about Tools/Configure build Lazarus?

This dialog is for building the Lazarus IDE, not for building your project and also not for building the LCL in 0.9.31, so I find it extremely unlikely that you want do set anything regarding Android there. The IDE cannot run in Android for multiple reasons.
« Last Edit: August 26, 2011, 08:36:44 am by felipemdc »

laguna

  • Sr. Member
  • ****
  • Posts: 327
Re: First steps of LCL-Android are ready
« Reply #49 on: August 26, 2011, 09:28:01 am »
Hello Felipe, I modified this script to install Lazarus and FPC251 into user folder in Ubuntu.

But it is still not fully functional, you may kindly fix it, so as to incorporate the necessary files for Android!?

Thanks for everything.

by Laguna

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #51 on: August 26, 2011, 10:16:19 am »
Hello Felipe, I modified this script to install Lazarus and FPC251 into user folder in Ubuntu.

But it is still not fully functional, you may kindly fix it, so as to incorporate the necessary files for Android!?

Could you say what exactly doesn't work, in which part it stops (and copy some parts of the script here), etc, and formulate a more specific question? I use Mandriva, not Ubuntu, and I guess this script is Ubuntu specific (not sure, however).

laguna

  • Sr. Member
  • ****
  • Posts: 327
Re: First steps of LCL-Android are ready
« Reply #52 on: August 26, 2011, 12:12:29 pm »
The script is also good for Mandriva.
Must remove the "Install dependencies" with the following lines "sudo apt-"
With some tweaking this script may be useful to many, is using Mandriva Ubuntu or other distribution.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: First steps of LCL-Android are ready
« Reply #53 on: August 30, 2011, 04:37:10 am »
Hi felipemdc
I have met an error After I set Target Os:Linux,Target CPU:ARM .
Code: [Select]
/home/hotcyy/lazarus/fpc/binutils/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/home/hotcyy/lazarus/fpc/binutils/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/home/hotcyy/lazarus/fpc/binutils/ld: cannot find -lpthread
androidlcltest.lpr(21) Error: Error while linking
androidlcltest.lpr(21) Fatal: There were 1 errors compiling module, stopping

ld is an soft link:ln /usr/local/bin/arm-linux-ld  /home/hotcyy/lazarus/fpc/binutils/ld.
My System is Ubuntu ,I try to  install libthread-devel ,gtk2-devel,libc6-devel to solve the problem ,but It does not work. Do you have any idea?
« Last Edit: August 30, 2011, 04:40:30 am by Jonathan »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #54 on: August 30, 2011, 08:00:00 am »
Strange, do you have local modifications in the project? Could you show your file androidlcltest.lpr?

This error is associated with the unit cthreads being present in the project, but in an unmodified androidlcltest it should not occur.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: First steps of LCL-Android are ready
« Reply #55 on: August 30, 2011, 10:07:33 am »
Hi felipemdc  .Before the previous error, there is an error like that  :
Code: [Select]
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(236,76) Error: range check error while evaluating constants
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(260,76) Error: range check error while evaluating constants
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(284,76) Error: range check error while evaluating constants
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(323,76) Error: range check error while evaluating constants
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(348,92) Error: range check error while evaluating constants
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(362,15) Hint: Local variable "Msg" does not seem to be initialized
/home/hotcyy/lazarus/lcl/interfaces/android/androidprivate.pas(388) Fatal: There were 5 errors compiling module, stopping

please help me solve this problem first ! Thank you !
« Last Edit: August 30, 2011, 10:29:24 am by Jonathan »

Jonathan

  • New Member
  • *
  • Posts: 40
Re: First steps of LCL-Android are ready
« Reply #56 on: August 30, 2011, 10:41:18 am »
I delete the WRAP_CONTET{} ,so it works.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #57 on: August 30, 2011, 11:07:01 am »
Indeed, there was a potential range check error, I fixed in the latest svn

Jonathan

  • New Member
  • *
  • Posts: 40
Re: First steps of LCL-Android are ready
« Reply #58 on: August 30, 2011, 11:21:15 am »
felipemdc   ,So Another error occures:
 
Code: [Select]
android/androidwsfactory.pas(112,3) Fatal: Can't find unit androidwsforms used by androidwsfactory
the  File "/home/hotcyy/lazarus/lcl/interfaces/android/androidwsforms.pp" not found. but My Lazarus is 0.9.31 .   Why? Thanks

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #59 on: August 30, 2011, 11:50:20 am »
ops, I had forgotten to add those files =D I just added them in rev32109

 

TinyPortal © 2005-2018