Recent

Author Topic: Android - Lazarus for Dummies (like me).  (Read 29793 times)

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #15 on: October 21, 2011, 04:52:08 pm »
Sir, I did exactly as you asked.  Followed the steps again (from step 3), below are the results:

From lazarus:
"Error: ppcarm can't be executed, error message: Failed to execute "ppcarm", error code: 127"

From terminal:
anthony@linux-3fnz:~/Downloads/lazarus/android/androidlcl/android> ant debug
Buildfile: build.xml

BUILD FAILED
/home/anthony/Downloads/lazarus/android/androidlcl/android/build.xml:46: taskdef class com.android.ant.SetupTask cannot be found

So, I believe that I may not have something pointing to the right place under lazarus, would you agree?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android - Lazarus for Dummies (like me).
« Reply #16 on: October 21, 2011, 05:17:34 pm »
Let's go back to verity that your compiler is working before:

cd /usr/bin/
ls -ls ppc*
./ppcrossarm

Could you post the results of these commands?

What is written in your Lazarus in the menu "Tools->Options->Compiler Path"?

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #17 on: October 21, 2011, 05:32:36 pm »
Yes Sir, posted below:

anthony@linux-3fnz:/usr/bin> ls -ls ppc*
0 lrwxrwxrwx 1 root root 24 Oct 21 08:43 ppcrossarm -> lib/fpc/2.5.1/ppcrossarm
0 lrwxrwxrwx 1 root root 24 Oct 20 08:48 ppcrossarm.org -> lib/fpc/2.5.1/ppcrossarm
0 lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64
anthony@linux-3fnz:/usr/bin>
anthony@linux-3fnz:/usr/bin>
anthony@linux-3fnz:/usr/bin>
anthony@linux-3fnz:/usr/bin> ./ppcrossarm
bash: ./ppcrossarm: No such file or directory
anthony@linux-3fnz:/usr/bin>

I think the problem may lay in the last line "../lib64/fpc/2.4.4/ppcx64" ?

Compiler path > /usr/bin/fpc
« Last Edit: October 21, 2011, 05:35:08 pm by almcneill »

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #18 on: October 21, 2011, 05:44:01 pm »
I think I may have found a large part of the problem.

In your Part 1 Step 2 > Step 2 - Configure the cross-binutils

su
mv /usr/bin/arm-linux-as /usr/bin/arm-linux-as_org
gedit /usr/bin/arm-linux-as

I apologize for this, I had a long day yesterday and this step was very early on BUT, opensuse does not put this in the same place.  Opensuse puts this file in the following directory:

/opt/cross/bin/arm-linux-as  - I believe that due to my lack of pointing this out to you, may be the culprit behind the whole probelm?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android - Lazarus for Dummies (like me).
« Reply #19 on: October 21, 2011, 05:47:39 pm »
anthony@linux-3fnz:/usr/bin> ls -ls ppc*
0 lrwxrwxrwx 1 root root 24 Oct 21 08:43 ppcrossarm -> lib/fpc/2.5.1/ppcrossarm
0 lrwxrwxrwx 1 root root 24 Oct 20 08:48 ppcrossarm.org -> lib/fpc/2.5.1/ppcrossarm
0 lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64

Your ppcrossarm is still pointing to the wrong location... (as I had explained in this reply: http://www.lazarus.freepascal.org/index.php/topic,15012.msg80250.html#msg80250 )

Try this:

cd /usr/bin
rm ppcrossarm
cd /usr
ln -s lib/fpc/2.5.1/ppcrossarm bin/ppcrossarm

Quote
I think the problem may lay in the last line "../lib64/fpc/2.4.4/ppcx64" ?

No, it is ppcrossarm that is wrong...
« Last Edit: October 21, 2011, 05:49:18 pm by felipemdc »

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #20 on: October 21, 2011, 05:50:08 pm »
Yes Sir, I did read the topic.  I will do this again and try post the results.

Before I try it again though, I did try this command:

anthony@linux-3fnz:/usr/bin> ls -l ppcrossarm
lrwxrwxrwx 1 root root 24 Oct 21 08:43 ppcrossarm -> lib/fpc/2.5.1/ppcrossarm

So, it looks as though it is pointing to the correct place.
« Last Edit: October 21, 2011, 05:53:22 pm by almcneill »

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #21 on: October 21, 2011, 05:57:24 pm »
Results:

linux-3fnz:/usr/bin # rm ppcrossarm
linux-3fnz:/usr/bin # cd /usr
linux-3fnz:/usr # ln -s lib/fpc/2.5.1/ppcrossarm bin/ppcrossarm

linux-3fnz:/usr/bin # ls -ls ppcrossarm
0 lrwxrwxrwx 1 root root 24 Oct 21 09:54 ppcrossarm -> lib/fpc/2.5.1/ppcrossarm

Same as before.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android - Lazarus for Dummies (like me).
« Reply #22 on: October 21, 2011, 06:01:37 pm »
This seams to defy logic .... I wonder if your shell works differently then mine? What about this ones:

cd /usr/bin
rm ppcrossarm
ls -l ppc*
ln -s ../lib/fpc/2.5.1/ppcrossarm ppcrossarm
ls -l ppc*
./ppcrossarm

lrwxrwxrwx 1 root root 24 Oct 21 08:43 ppcrossarm -> lib/fpc/2.5.1/ppcrossarm

So, it looks as though it is pointing to the correct place.

That's the wrong place, it needs to point to ../lib/fpc/2.5.1/ppcrossarm

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #23 on: October 21, 2011, 06:08:52 pm »
"This seams to defy logic .... I wonder if your shell works differently then mine?"  Ok, so I am not crazy, thank you for saying that.

Here are the posted results, notice the error, so something is definitely different between yours and mine.

linux-3fnz:/usr/bin # rm ppcrossarm
linux-3fnz:/usr/bin # ls -l ppc*
lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64

linux-3fnz:/usr/bin # ls -s ../lib/fpc/2.5.1/ppcrossarm ppcrossarm
ls: cannot access ppcrossarm: No such file or directory
2084 ../lib/fpc/2.5.1/ppcrossarm

linux-3fnz:/usr/bin # ls -l ppc*
lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64

Laksen

  • Hero Member
  • *****
  • Posts: 724
    • J-Software
Re: Android - Lazarus for Dummies (like me).
« Reply #24 on: October 21, 2011, 07:38:04 pm »
almcneill, ln and ls are two different commands. You have messed that up in your last post

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #25 on: October 21, 2011, 08:24:50 pm »
Laksen,

I understand that, ln > link command, ls > directory listing.  If you follow the posts, I have been doing as instructed.  If you think I mistyped something, could you please point it out to me (the exact line) so that I may correct it.

Thanks.

And I do truly mean thanks, to all that are replying, especially felipemdc, I am sure at this point his frustration level with my problem is pretty high.  I do truly appreciate the help and efforts that are taking place.

As a side note, if there will be a "full" version of the 2.5.1 fpc coming out (supporting the android), I am patient enough to wait for it.  Please understand, that I write my own programs for enjoyment, not money, so if I cannot get this working at this time (but rather at a later time), it does not impact me in any way.  I am just doing this so that I may further my own personal skills.

Not to mention the fact that I have tried to program in C++ (and variants thereof), and I have always been more comfortable with the Pascal language.  At one point I was trying to incorporate the Pascal language into KDevelop 4 (it use to be part of previous versions, but not version 4), and I had asked for help with this on other websites, only to be told time and again that "Pascal is a dead language".  I do not believe this, and thanks to the Lazarus/Freepascal website (not to mention how many views have hit this post alone), I see that I am not the only one with this opinion.

With that being said, huge props to the members that maintain the lazarus software, without them, I would have nothing to look forward to.  I know what is involved when I write my own programs, I can only imagine what they must go through, not only continually updating/improving lazarus/fpc, but then to have to deal with problems like mine.

I can't say it enough, Thanks... you all do a great job.

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #26 on: October 21, 2011, 08:31:51 pm »
Laksen, you were correct, I went back and thoroughly checked my commands/output again, spotted the error you were talking about, restarted, posted results below:

linux-3fnz:/usr/bin # rm ppcrossarm
linux-3fnz:/usr/bin # ls -l ppc*
lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64
linux-3fnz:/usr/bin # ln -s ../lib/fpc/2.5.1/ppcrossarm ppcrossarm
linux-3fnz:/usr/bin # ls -l ppc*
lrwxrwxrwx 1 root root 27 Oct 21 12:30 ppcrossarm -> ../lib/fpc/2.5.1/ppcrossarm
lrwxrwxrwx 1 root root 25 Oct 16 09:59 ppcx64 -> ../lib64/fpc/2.4.4/ppcx64
linux-3fnz:/usr/bin # ./ppcrossarm
Free Pascal Compiler version 2.5.1 [2011/01/19] for arm
Copyright (c) 1993-2010 by Florian Klaempfl
/usr/lib/fpc/2.5.1/ppcrossarm [options] <inputfile> [options]
Put + after a boolean switch option to enable it, - to disable it
  -a     The compiler doesn't delete the generated assembler file
      -al        List sourcecode lines in assembler file
      -an        List node info in assembler file
      -ap        Use pipes instead of creating temporary assembler files
      -ar        List register allocation/release info in assembler file
      -at        List temp allocation/release info in assembler file
  -A<x>  Output format:
      -Adefault  Use default assembler
      -Aas       Assemble using GNU AS
  -b     Generate browser info
      -bl        Generate local symbol info
  -B     Build all modules
  -C<x>  Code generation options:
      -C3<x>     Turn on ieee error checking for constants
      -Ca<x>     Select ABI, see fpc -i for possible values
      -Cb        Generate big-endian code
      -Cc<x>     Set default calling convention to <x>
      -CD        Create also dynamic library (not supported)
*** press enter ***

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #27 on: October 21, 2011, 08:48:15 pm »
Ok, a step further, after what was pointed out to me previously, and with the last output being shown, I again tried to build the program with lazarus, below is the output:

androidlcltest.lpr(1,1) Fatal: Can't find unit Interfaces used by androidlcltest

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android - Lazarus for Dummies (like me).
« Reply #28 on: October 21, 2011, 08:53:36 pm »
Ok, excellent, finally the compiler is working =)

Ok, a step further, after what was pointed out to me previously, and with the last output being shown, I again tried to build the program with lazarus, below is the output:

androidlcltest.lpr(1,1) Fatal: Can't find unit Interfaces used by androidlcltest

Which version of Lazarus are you using? Is it the very latest SVN?

almcneill

  • New Member
  • *
  • Posts: 34
Re: Android - Lazarus for Dummies (like me).
« Reply #29 on: October 21, 2011, 08:55:27 pm »
I do not believe so Sir, the version that I currently have is: Lazarus - 0.9.30.2RC1

 

TinyPortal © 2005-2018