[Lazarus] [Partially Solved] Cross Compile for arm-linux

Mattias Gaertner nc-gaertnma at netcologne.de
Sat Dec 12 15:11:35 CET 2009


On Sat, 12 Dec 2009 14:49:51 +0100
Kjow <antispammoni at gmail.com> wrote:

> 2009/12/12 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> 
> Thank you very much, Mattias. You are very gentle.
> 
> > This is automatically done by the IDE.
> > Just start the IDE in a terminal, compile a package normally and see
> > what it does.
> >
> > I wrote a few hints here:
> > http://wiki.lazarus.freepascal.org/Cross_compiling#Cross_compiling_the_LCL
> 
> Well, FPC compile right for my device:
> 
> Nokia-N900-42-11:/home/opt/KjowProject/Test01# ./test
> DATE 2009/12/12
> FPCTARGET arm
> FPCTARGETCPU arm
> FPCTARGETOS Linux
> FPCVERSION 2.5.1
> Nokia-N900-42-11:/home/opt/KjowProject/Test01#
> 
> But Lazarus Projects still have some problems. I'm restarted from a
> new fresh ubuntu installation, so I reinstalled fpc, binutils (both
> from latest source snaphot) and enabled fpc to cross compile for
> arm-linux. All ok.
> Then compiled Lazarus with classic: ~/lazarus$ make clean all
> All ok.
> Then I followed you wiki-instructions and compiled LCL+Package
> registration from Lazarus IDE. All OK.
> 
> I tried to build a simple form, but I got this error:
> 
> ...
> ...
> intfgraphics.pas(609,45) Hint: Parameter "Img" not used
> intfgraphics.pas(653,19) Hint: Local type "PFPColorBytes" is not used
> intfgraphics.pas(34,70) Hint: Unit "FPCAdds" not used in IntfGraphics
> Assembling intfgraphics
> Compiling /home/kjow/lazarus/lcl/imglist.pp
> Compiling /home/kjow/lazarus/lcl/lclclasses.pp
> PPU Loading /home/kjow/lazarus/lcl/units/arm-linux/wslclclasses.ppu
> PPU Source: wslclclasses.pp not found
> Recompiling WSLCLClasses, checksum changed for LCLProc

Probably you have somewhere an old ppu from your former experiments in
the search path. Add options -vu -vt to find out where it is.


> ~/dev/TestARM/LazARM$ fpc -Tlinux -Parm LAzARM.lpr
> Free Pascal Compiler version 2.5.1 [2009/12/12] for arm
> Copyright (c) 1993-2009 by Florian Klaempfl
> Target OS: Linux for ARM
> Compiling LAzARM.lpr
> Fatal: Can't find unit Interfaces used by LAzARM
> Fatal: Compilation aborted
> Error: /usr/local/bin/ppcarm returned an error exitcode (normal if you
> did not specify a source file to be compiled)
> 
> Where am I in wrong?

Open the IDE compiler options. You can see that the IDE passes some -Fu
and other options. Simply copy those options if you want to compile
at the command line.


Mattias




More information about the Lazarus mailing list