Recent

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

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #75 on: October 27, 2011, 10:48:38 am »
Compiler 2.7.1 from source good?

Well, you can try that, but I think that then Unicode support will be broken.

Lazarus does not yet support 2.7 because 2.7 is under development with a final state not yet decided. So supporting it makes no sense, since it will change and then we would have to adapt again.
Thanks, I'll try with 2.5.1. I hope to succeed!

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #76 on: October 27, 2011, 11:34:27 am »
I rebuilt everything as is done in the wiki there was this error:
androidlcltest.lpr(21) Error: Assembler /home/predator/lazarus/fpc/binutils/as not found, switching to external assembling

If you remove the parameter
-XP/home/predator/lazarus/fpc/binutils /
out. fpc. cfg that will past mistakes.

/usr/local/bin/arm-linux-ld: /usr/arm-linux-gnueabi/lib/libc.so.6: Unknown mandatory EABI object attribute 44
/usr/local/bin/arm-linux-ld: failed to merge target specific data of file /usr/arm-linux-gnueabi/lib/libc.so.6
/usr/lib/fpc/2.5.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/usr/lib/fpc/2.5.1/units/arm-linux/rtl/cprt0.o: In function `_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
androidlcltest.lpr(21) Error: Error while linking
androidlcltest.lpr(21) Fatal: There were 1 errors compiling module, stopping

/ usr / arm-linux-gnueabi / lib /

This is the path to the libraries from the package in ubuntu Libc6Armelcross.deb
« Last Edit: October 27, 2011, 11:38:04 am by Rustam Asmandiarov »

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #77 on: October 27, 2011, 07:48:25 pm »
I used the original when the compiler 2.5.1 from here:
http://svn.freepascal.org/svn/fpc/branches/fixes_2_6/
Are there any ideas where to dig?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #78 on: October 27, 2011, 08:48:03 pm »
If you do this:

1> Svn update your Lazarus

2> Open the package LCLBase (you can find it in the menu Packages->Graph), then go to Options, then go to "Other" and put there this: -dAndroid

does it compile then?

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #79 on: October 28, 2011, 06:50:47 am »
If you do this:

1> Svn update your Lazarus

2> Open the package LCLBase (you can find it in the menu Packages->Graph), then go to Options, then go to "Other" and put there this: -dAndroid

does it compile then?

1) It did not work 0.9.31.33121
2) Select this option, the project compiled!

MORE BIG THANK YOU!

I used this one for manual assembly under android
http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM
It is only now looking at
http://wiki.freepascal.org/Android_Interface
I noticed the item-dAndroid

Sorry!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #80 on: October 28, 2011, 06:58:13 am »
1) It did not work 0.9.31.33121
2) Select this option, the project compiled!

It was not one or the other, it was first 1 then 2 =D

The problem is that by default Lazarus installs a C WideString Manager in UNIXes for WideString support, but this widestring manager links to the C library =( And that sucks for cross-compiling.

We don't need that for Android because I have written a new 100% Pascal WideString Manager. And that is what is activated by -dAndroid (along with deactivating the other widestring manager). I updated the instructions for this new step.

Quote
It is only now looking at
http://wiki.freepascal.org/Android_Interface
I noticed the item-dAndroid

I just added it there yesterday =D But it is not a permanent step, we should work on killing this step in the future. I'd like arm-linux to always use the Pascal WideString Manager, but I am still waiting a bit before making it the default for all arm-linux because it impacts non-Android users too.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #81 on: October 28, 2011, 08:22:36 am »
It is clear, thanks!


Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #82 on: October 31, 2011, 06:17:31 am »
Hi! I've used Lazarus from the repository
http://svn.freepascal.org/svn/lazarus/trunk
and I was able to compile the application but for some reason it will not start!
Then I used the source
lazarus-0.9.31-32 793-20111010-src.zip
And the application was compiled normally, and earned on the android emulator!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #83 on: October 31, 2011, 09:01:01 am »
So, are you saying that lazarus-0.9.31-32 793-20111010-src.zip works?

And http://svn.freepascal.org/svn/lazarus/trunk not. Correct?

What does adb say? Write:

./adb logcat

from the sdk directory where adb is. Then try to run the app. And check what it says when the application runs.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: First steps of LCL-Android are ready
« Reply #84 on: October 31, 2011, 11:48:10 am »
Hmm, now updated to 33 190 and it works!

test_user

  • Newbie
  • Posts: 2
Re: First steps of LCL-Android are ready
« Reply #85 on: November 10, 2011, 10:18:41 pm »
first of all, thanks a lot for ability to run pascal app under Android. :)  But when I tried to compile example project (or some other with target os = linux, CPU = arm) I've received error "Error: ppcarm.exe can't be executed, error message: Failed to ", and when I tried Test Project options I've received errors: "compiled FPC unit not found: system.ppu".Has someone been experienced with same issue? Does anybody know, how to resolve it? Thanks in advanced.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: First steps of LCL-Android are ready
« Reply #86 on: November 11, 2011, 05:44:46 am »
Did you follow the step-by-step instructions? In which step exactly did you have trouble?

test_user

  • Newbie
  • Posts: 2
Re: First steps of LCL-Android are ready
« Reply #87 on: November 14, 2011, 09:09:53 pm »
Yes, i tried to fallow the instruction. (some parts of it describe only installation under Linux only). But when I tried to compile test project (or setup compilation configuration for android for new project), i've received errors, described above :(. Could someone provide me with steps for installation under win 7? Or what should i do to avoid errors?

 

TinyPortal © 2005-2018