Recent

Author Topic: [SOLVED] Configuring lazarus for linux arm  (Read 6364 times)

capslock

  • New Member
  • *
  • Posts: 12
[SOLVED] Configuring lazarus for linux arm
« on: January 15, 2013, 07:42:42 pm »
Hi folks,

I trying to configure lazarus for linux arm building the compiler my self like described in http://wiki.lazarus.freepascal.org/Android_Interface .

When I tried to compile the first app an error ocurred:

Error: Assembler arm-linuxas not found, switching to external assembling.

Environment:
Ubuntu 9.10 karmic koala
Lazarus 0.9.30.4 (compiled by myself)
fpc 2.4.0

How can I solve this?
I tried the virtual machine available in the wiki, but doesn't not work too.
« Last Edit: January 21, 2013, 07:03:49 pm by memorea »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Configuring lazarus for linux arm
« Reply #1 on: January 16, 2013, 09:22:13 am »
Quote
Error: Assembler arm-linuxas not found...
What's your arm-linux assembler binary name? And in your fpc.cfg, what's your -XP setting?

capslock

  • New Member
  • *
  • Posts: 12
Re: Configuring lazarus for linux arm
« Reply #2 on: January 16, 2013, 12:43:30 pm »
Thank you for replying, Leledumbo!

I'm a newbie in lazarus. I hope answer your questions correctly:

1) About the arm-linux assembler binary name:

Binaries found in system:

root@ubuntu:/usr/local/bin# ls -l
total 36660
-rwxr-xr-x 1 root root 2424597 2013-01-15 07:11 arm-linux-addr2line
-rwxr-xr-x 2 root root 2557527 2013-01-15 07:10 arm-linux-ar
-rwxr-xr-x 1 root root      54 2013-01-15 07:12 arm-linux-as
-rwxr-xr-x 2 root root 3841011 2013-01-15 07:11 arm-linux-as_org
-rwxr-xr-x 1 root root 2403276 2013-01-15 07:11 arm-linux-c++filt
-rwxr-xr-x 1 root root 2830761 2013-01-15 07:11 arm-linux-gprof
-rwxr-xr-x 2 root root 3681219 2013-01-15 07:12 arm-linux-ld
-rwxr-xr-x 2 root root 2461916 2013-01-15 07:11 arm-linux-nm
-rwxr-xr-x 2 root root 2978493 2013-01-15 07:11 arm-linux-objcopy
-rwxr-xr-x 2 root root 3314535 2013-01-15 07:10 arm-linux-objdump
-rwxr-xr-x 2 root root 2557554 2013-01-15 07:10 arm-linux-ranlib
-rwxr-xr-x 1 root root  589846 2013-01-15 07:11 arm-linux-readelf
-rwxr-xr-x 1 root root 2453588 2013-01-15 07:10 arm-linux-size
-rwxr-xr-x 1 root root 2426054 2013-01-15 07:10 arm-linux-strings
-rwxr-xr-x 2 root root 2978488 2013-01-15 07:11 arm-linux-strip
lrwxrwxrwx 1 root root      29 2013-01-15 07:31 ppcarm -> /usr/lib/fpc/2.4.0/ppcrossarm
root@ubuntu:/usr/local/bin#

And there are a symbolic links here:

root@ubuntu:/home/menthor/lazarus/fpc/binutils#
root@ubuntu:/home/menthor/lazarus/fpc/binutils# ls -l
total 0
lrwxrwxrwx 1 root root 27 2013-01-15 07:12 ar -> /usr/local/bin/arm-linux-ar
lrwxrwxrwx 1 root root 27 2013-01-15 07:12 as -> /usr/local/bin/arm-linux-as
lrwxrwxrwx 1 root root 27 2013-01-15 07:12 ld -> /usr/local/bin/arm-linux-ld
root@ubuntu:/home/menthor/lazarus/fpc/binutils#
root@ubuntu:/home/menthor/lazarus/fpc/binutils#
root@ubuntu:/home/menthor/lazarus/fpc/binutils#

2) In /etc/fpc.cfg:

#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
  -XP$fpctarget-
#ENDIF NEEDCROSSBINUTILS
#ENDIF



Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Configuring lazarus for linux arm
« Reply #3 on: January 16, 2013, 01:18:49 pm »
Quote
-XP$fpctarget- ...  arm-linux-as
This should be correct, then something must be wrong on your system because it searched for arm-linuxas instead of arm-linux-as (I assume it's not a copy-paste error). Is /usr/local/bin part of your PATH?

Anyway, I don't think your FPC and Lazarus version adequate for compiling for Android. You should use the one pointed by the article.

capslock

  • New Member
  • *
  • Posts: 12
Re: Configuring lazarus for linux arm
« Reply #4 on: January 16, 2013, 02:01:44 pm »
You right.

There was an incorrect parameter in Project Options | Compiler Options | Other | Custom Options:

-XParm-linux  instead of -XParm-linux-

Now, I received an other error trying to compile my project:

/usr/local/bin/arm-linux-ld: warning: link.res contains output sections; did you forget -T?
/usr/local/bin/arm-linux-ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
/usr/local/bin/arm-linux-ld: cannot find /usr/lib/crti.o
teste.lpr(21) Error: Error while linking
teste.lpr(21) Fatal: There were 1 errors compiling module, stopping

Any idea?

I was tried other versions like described in article, but doesn't work too. It's sounds like a nightmare :-(

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Configuring lazarus for linux arm
« Reply #5 on: January 16, 2013, 02:14:17 pm »
Quote
skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
It should NEVER link to that library, it belongs to your system, not the android system. You need to give path to NDK libraries. See this important note.

capslock

  • New Member
  • *
  • Posts: 12
[Solved] Re: Configuring lazarus for linux arm
« Reply #6 on: January 21, 2013, 07:03:17 pm »
You right again. The problem was solved.

I made an update for most recent versions of lazarus, fpc, binutils and ubuntu and reconfigure all again from scratch. It's all working properly now.

Thanks for you help

Diego

  • New member
  • *
  • Posts: 8
Re: [SOLVED] Configuring lazarus for linux arm
« Reply #7 on: August 24, 2014, 05:39:48 pm »
Hello, I'm having the same problem, follow the step by step of http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM.

I'm trying to build lazarus and I get the error: /home/mint/lazarus/packager/registration/lazaruspackageintf.pas(104) Error: Assembler arm-linuxas not found, switching to external assembling

Could anyone help me?

 

TinyPortal © 2005-2018