[SOLVED] Configuring lazarus for linux arm lazarus / 1-Linux ---------------------------------------------------------------------- capslock · 2013-01-15 18:42 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. ---------------------------------------------------------------------- Leledumbo · 2013-01-16 08:22 QuoteError: Assembler arm-linuxas not found...What's your arm-linux assembler binary name? And in your fpc.cfg, what's your -XP setting? ---------------------------------------------------------------------- capslock · 2013-01-16 11:43 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 · 2013-01-16 12:18 Quote-XP$fpctarget- ...  arm-linux-asThis 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 · 2013-01-16 13:01 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 · 2013-01-16 13:14 Quoteskipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.oIt 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 · 2013-01-21 18:03 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 · 2014-08-24 15:39 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?