* * *

Author Topic: [Tutorial] Cross Compile for arm-linux (Finally it works!)  (Read 122489 times)

Kjooow

  • Jr. Member
  • **
  • Posts: 88
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #15 on: December 22, 2009, 02:44:38 pm »
What thing confusing you?

With this tutorial you can build for maemo without maemo sdk/scratchbox. Follow first post step by step.

Lazarus and fpc you need are the daily source snapshot.

Other things on this thread are useless, you need to follow first post (or wiki tutorial) only:
http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM

jdonth

  • New member
  • *
  • Posts: 5
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #16 on: January 03, 2010, 08:26:19 pm »
I am trying to set this up to compile a fpc console program (Hello World) to run on a SheevaPlug running Ubuntu 9.04.

I have followed your instructions (twice) but when I run the test program, it will run under my host system, but not on the SheevaPlug. The results of the program on my host system is:
Code: [Select]
root@ubuntu:~/TestARM# ./TestARM
DATE 2010/01/03
FPCTARGET i386
FPCTARGETCPU i386
FPCTARGETOS Linux
FPCVERSION 2.5.1
root@ubuntu:~/TestARM#
and on the SheevaPlug:
Code: [Select]
Last login: Sun Jan  3 19:14:19 2010 from 192.168.1.94
root@ubuntu:~# /TestARM
-bash: /TestARM: cannot execute binary file
root@ubuntu:~#

Before I post unnecessary stuff, do you have any thoughts?

Thanks,
~Joe

alter

  • Full Member
  • ***
  • Posts: 151
    • KSP website
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #17 on: January 03, 2010, 08:55:43 pm »
Not sure but it looks like you have application binary in ~/TestARM/TestARM file. In first case you are trying to execute executable file and that seems to work. In second case you are in ~ not in ~/TestARM. Also aren't you trying to execute i386 binary on ARM or something?

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #18 on: January 04, 2010, 09:25:24 am »
Quote
it will run under my host system, but not on the SheevaPlug.
Sheeva has an ARM processor which I suppose you're no using at the host system.
Try "file ./TestARM" to see target platform (should be "ELF 32-bit LSB executable, ARM, ..." instead of "ELF 64-bit LSB executable, x86-64...") or use "readelf -h ./TestARM" (more detailed information).
PS: In reply #4 are my Sheeva specific notes on Kjooow tutorial. Good luck!
« Last Edit: January 04, 2010, 09:29:12 am by Ocye »
Lazarus 1.7 (SVN) FPC 3.0.0

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #19 on: January 07, 2010, 05:25:22 pm »
Hello and thanks for tuto.
I have Lazarus 9.29 on Ubuntu 9.10, working fine.
Your tuto is for a complete fresh installation but how to install the arm libs and be sure that my Lazarus-fpc gonna still work ? (i have a lots of components installed so im a bit afraid to touch to my good working Lazarus.)  :o

Could you explain please how to install the arms libs on a working Lazarus system (without destroy it) ?

I meen, after arm libs install, is it possible to still compile for Linux, is it possible to choose between arm compil or linux compil ?
Many thanks.
 
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Kjooow

  • Jr. Member
  • **
  • Posts: 88
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #20 on: January 08, 2010, 09:48:50 pm »
Hi, for arm you need latest FPC revision. It is better a trunk revision (more updated).

I never tried to update an existing version of lazarus/FPC, but I think that you simply need to follow the "make" parts... compiling FPC for arm (and than Lazarus for arm) simply ADD the function to cross-compile. It doesn't replace nothing (I think), so in your project, you just need to choose the CPU target to switch between architectures.

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #21 on: January 08, 2010, 10:50:49 pm »
Thanks Kjoow

Quote
Hi, for arm you need latest FPC revision. It is better a trunk revision (more updated).

Done.

Now, i dont find where to download FPC for arm for Linux (in Lazarus Snapshot only for Windows version)   :'(
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Kjooow

  • Jr. Member
  • **
  • Posts: 88
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #22 on: January 09, 2010, 12:59:53 am »
Thanks Kjoow

Quote
Hi, for arm you need latest FPC revision. It is better a trunk revision (more updated).

Done.

Now, i dont find where to download FPC for arm for Linux (in Lazarus Snapshot only for Windows version)   :'(

you don't need a precompiled package, but simply the sources of fpc :)
With the tutorial you will going to enable arm-linux cross compileing from FPC sources :)
Download the zip via freepascal site ;)

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #23 on: January 10, 2010, 07:09:00 pm »
Hi Kjooow

I have followed your steps.

Quote
FPC for ARM:

1) cd ~/lazarus/fpc/2.5.1/

2) sudo make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=/home/kjow/lazarus/fpc/binutils/ OPT=-dFPC_ARMEL INSTALL_PREFIX=/usr

Ok, it has compiled without problems.
Now, i have tried to cross-compile the LCL and i get that message (from console: sudo startlazarus):

Quote
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/fred/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
Note: TDefinePool.CreateFPCSrcTemplate UnitSearchPath empty
[TExternalToolList.Run] CmdLine="/usr/bin/make clean all -w OS_TARGET=linux CPU_TARGET=arm()" WorkDir="/usr/share/lazarus/lcl"
make: Entering directory `/usr/share/lazarus/lcl'
Makefile:198: *** The Makefile doesn't support target arm()-linux, please run fpcmake first.  Stop.
make: Leaving directory `/usr/share/lazarus/lcl'
TExternalToolList.Run Exception: the process exited with error code 2
TMainIDE.DoBuildLazarus: Building standard components (LCL, SynEdit, CodeTools) failed.
LAZARUS END - cleaning up ...
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
[TMainIDE.Destroy] END

Also when i try to compile a sample : fpc -Tlinux -Parm test.pas

Quote
fred@fred-laptop:~$ fpc -Tlinux -Parm test.pas
Fatal: Too many config files nested
Fatal: Compilation aborted
Error: /usr/local/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)

Of course fpc -Tlinux -Pi386 test.pas compile without problems.
And binutils was installed like you explain.

What is the problem ?

Thanks

PS1 Why everything must be so complicated with Lazarus ?

PS2 Write once, compile everywhere, ok but, please, why must it be so difficult to install a crosscompiler ?
Is it so difficult for the Lazarus team to write a unique script to install a crosscompiler.
Maybe Lazarus team have to choose something else than : Write once, compile everywhere...

PS3 Lazarus was done only for Gurus ?

PS4 Many thanks to Kjooow  :P to try to help us in that jungle.

PS5  >:(  >:D
« Last Edit: January 10, 2010, 08:51:24 pm by fredvs »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2482
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #24 on: January 11, 2010, 01:37:40 am »
Quote
fred@fred-laptop:~$ fpc -Tlinux -Parm test.pas
Fatal: Too many config files nested
...
I would first try to resolve this issue. I've never seen this and it doesn't sound right.

try running
Code: [Select]
fpc -Tlinux -Parm -va test.pas to figure out which configfiles are used.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #25 on: January 11, 2010, 03:55:48 pm »
Hello Marc and thanks to care about me.

Quote
fred@fred-laptop:~$ fpc -Tlinux -Parm -va test.pas
[0.002] Macro defined: FPC
[0.002] Macro defined: VER2
[0.002] Macro defined: VER2_5
[0.002] Macro defined: VER2_5_1
[0.002] Macro defined: RESSTRSECTIONS
[0.002] Macro defined: FPC_HASFIXED64BITVARIANT
[0.002] Macro defined: FPC_HASINTERNALOLEVARIANT2VARIANTCAST
[0.002] Macro defined: FPC_HAS_VARSETS
[0.002] Macro defined: FPC_HAS_VALGRINDBOOL
[0.002] Macro defined: FPC_HAS_STR_CURRENCY
[0.002] Macro defined: FPC_REAL2REAL_FIXED
[0.002] Macro defined: FPC_STRTOCHARARRAYPROC
[0.002] Macro defined: FPC_STRTOSHORTSTRINGPROC
[0.002] Macro defined: FPC_OBJFPC_EXTENDED_IF
[0.003] Macro defined: FPC_HAS_OPERATOR_ENUMERATOR
[0.003] Macro defined: FPC_HAS_UNICODESTRING
[0.003] Macro defined: FPC_RTTI_PACKSET1
[0.003] Macro defined: FPC_HAS_INTERNAL_ROX
[0.003] Macro defined: FPC_HAS_MEMBAR
[0.003] Macro defined: FPC_SETBASE_USED
[0.003] Macro defined: INTERNAL_BACKTRACE
[0.003] Macro defined: STR_CONCAT_PROCS
[0.003] Macro defined: FPC_HAS_FEATURE_SUPPORT
[0.003] Macro defined: CPUARM
[0.003] Macro defined: CPU32
[0.003] Macro defined: FPC_CURRENCY_IS_INT64
[0.003] Macro defined: FPC_COMP_IS_INT64
[0.003] Configfile search: /home/fred/.fpc.cfg
[0.003] Reading options from file /home/fred/.fpc.cfg
[0.003] Start of reading config file /home/fred/.fpc.cfg
[0.016] interpreting file option "#INCLUDE /etc/fpc.cfg"
[0.016] Reading options from file /etc/fpc.cfg
[0.016] Start of reading config file /etc/fpc.cfg
[0.054] interpreting file option "#"
[0.054] interpreting file option "# Example fpc.cfg for Free Pascal Compiler"
[0.054] interpreting file option "#"
[0.054] interpreting file option "# ----------------------"
[0.054] interpreting file option "# Defines (preprocessor)"
[0.054] interpreting file option "# ----------------------"
[0.054] interpreting file option "#"
[0.054] interpreting file option "# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed"
[0.054] interpreting file option "#"
[0.054] interpreting file option "# -d is the same as #DEFINE"
[0.054] interpreting file option "# -u is the same as #UNDEF"
[0.054] interpreting file option "#"
[0.054] interpreting file option "#"
[0.055] interpreting file option "# Some examples (for switches see below, and the -? helppages)"
[0.055] interpreting file option "#"
[0.055] interpreting file option "# Try compiling with the -dRELEASE or -dDEBUG on the commandline"
[0.055] interpreting file option "#"
[0.055] interpreting file option "# For a release compile with optimizes and strip debuginfo"
[0.055] interpreting file option "#IFDEF RELEASE"
[0.055] interpreting file option "#WRITE Compiling Release Version"
[0.055] interpreting file option "#ENDIF"
[0.055] interpreting file option "# For a debug version compile with debuginfo and all codegeneration checks on"
[0.055] interpreting file option "#IFDEF DEBUG"
[0.055] interpreting file option "#WRITE Compiling Debug Version"
[0.055] interpreting file option "#ENDIF"
[0.055] interpreting file option "# set binutils prefix"
[0.055] interpreting file option "#IFNDEF CPUI386"
[0.055] interpreting file option "#IFNDEF CPUAMD64"
[0.055] interpreting file option "#DEFINE NEEDCROSSBINUTILS"
[0.055] Macro defined: NEEDCROSSBINUTILS
[0.055] interpreting file option "#ENDIF"
[0.055] interpreting file option "#ENDIF"
[0.055] interpreting file option "#IFNDEF linux"
[0.055] interpreting file option "#DEFINE NEEDCROSSBINUTILS"
[0.055] interpreting file option "#ENDIF"
[0.055] interpreting file option "#IFDEF FPC_CROSSCOMPILING"
[0.055] interpreting file option "#IFDEF NEEDCROSSBINUTILS"
[0.055] Handling option "-XParm-linux-"
[0.055] interpreting option "-XParm-linux-"
[0.055] interpreting file option "#include /usr/lib/fpc/fpc-cross.cfg"
[0.079] Reading options from file /usr/lib/fpc/fpc-cross.cfg
[0.079] Start of reading config file /usr/lib/fpc/fpc-cross.cfg
[0.090] interpreting file option "#if 2.5.1 = 2.5.1"
[0.090] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.090] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.091] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] interpreting file option "#if 2.5.1 = 2.5.1"
[0.101] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.101] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] interpreting file option "#if 2.5.1 = 2.5.1"
[0.101] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.101] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] interpreting file option "#if 2.5.1 = 2.5.1"
[0.101] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.101] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] interpreting file option "#if 2.5.1 = 2.5.1"
[0.101] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.101] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.102] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.102] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.102] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.102] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.102] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.102] interpreting file option "#if 2.5.1 = 2.5.1"
[0.102] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.103] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.103] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.103] interpreting file option "#if 2.5.1 = 2.5.1"
[0.103] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.103] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.103] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.103] interpreting file option "#if 2.5.1 = 2.5.1"
[0.103] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.103] Too many config files nested
[0.103] Compilation aborted
Error: /usr/local/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled)
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2482
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #26 on: January 12, 2010, 01:18:21 am »
This is where it is going wrong
Code: [Select]
...
[0.055] interpreting file option "#include /usr/lib/fpc/fpc-cross.cfg"
[0.079] Reading options from file /usr/lib/fpc/fpc-cross.cfg
[0.079] Start of reading config file /usr/lib/fpc/fpc-cross.cfg
[0.090] interpreting file option "#if 2.5.1 = 2.5.1"
[0.090] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
[0.090] Reading options from file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.091] Start of reading config file /usr/lib/fpc/2.5.1/fpc-cross.cfg
[0.101] interpreting file option "#if 2.5.1 = 2.5.1"
[0.101] interpreting file option "#include /usr/lib/fpc/2.5.1/fpc-cross.cfg"
...

The file /usr/lib/fpc/fpc-cross.cfg is including /usr/lib/fpc/2.5.1/fpc-cross.cfg that seems OK to me, but... this file /usr/lib/fpc/2.5.1/fpc-cross.cfg is including itself. Remove those lines

//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #27 on: January 12, 2010, 10:27:42 pm »
Hola Marc, you are TOO STRONG.

[0.050] Unitsearch: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/system.ppu
[0.051] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/system.ppu... found
[0.051] PPU Loading /usr/lib/fpc/2.5.1/units/arm-linux/rtl/system.ppu
[0.051] PPU Name: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/system.ppu
[0.051] PPU Time: 2010/01/10 02:38:57
[0.051] PPU Flags: 192641
[0.051] PPU Crc: ABF44071
[0.051] PPU Crc: 0585A8F3 (intfc)
[0.051] PPU Crc: 6B7B25F8 (indc)
[0.051] Number of definitions: 3934
[0.051] Number of symbols: 11426
[0.070] Finished loading unit SYSTEM
[0.070] Searching file test.pas... found
[0.070] Searching file test.pas... found
[0.070] Registering new unit FPINTRES
[0.070] Load from TEST (implementation) unit FPINTRES
[0.070] Loading unit FPINTRES
[0.070] Unitsearch: fpintres.ppu
[0.070] Searching file fpintres.ppu... not found
[0.070] Searching file FPINTRES.PPU... not found
[0.070] Unitsearch: fpintres.pp
[0.070] Searching file fpintres.pp... not found
[0.070] Searching file FPINTRES.PP... not found
[0.070] Unitsearch: fpintres.pas
[0.070] Searching file fpintres.pas... not found
[0.070] Searching file FPINTRES.PAS... not found
[0.070] Unitsearch: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/fpintres.ppu
[0.070] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/fpintres.ppu... found
[0.070] PPU Loading /usr/lib/fpc/2.5.1/units/arm-linux/rtl/fpintres.ppu
[0.070] PPU Name: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/fpintres.ppu
[0.070] PPU Time: 2010/01/10 02:38:57
[0.070] PPU Flags: 192641
[0.070] PPU Crc: B8DBE822
[0.070] PPU Crc: B8DBE822 (intfc)
[0.070] PPU Crc: 6B7B25F8 (indc)
[0.070] Number of definitions: 58
[0.070] Number of symbols: 169
[0.070] Load from FPINTRES (interface) unit SYSTEM
[0.070] Adding dependency: FPINTRES depends on SYSTEM
[0.070] Finished loading unit FPINTRES
[0.071] Searching file test.pas... found
[0.071] Registering new unit OBJPAS
[0.071] Load from TEST (implementation) unit OBJPAS
[0.071] Loading unit OBJPAS
[0.071] Unitsearch: objpas.ppu
[0.071] Searching file objpas.ppu... not found
[0.071] Searching file OBJPAS.PPU... not found
[0.071] Unitsearch: objpas.pp
[0.071] Searching file objpas.pp... not found
[0.071] Searching file OBJPAS.PP... not found
[0.071] Unitsearch: objpas.pas
[0.071] Searching file objpas.pas... not found
[0.071] Searching file OBJPAS.PAS... not found
[0.071] Unitsearch: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.ppu
[0.071] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.ppu... found
[0.071] PPU Loading /usr/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.ppu
[0.071] PPU Name: /usr/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.ppu
[0.071] PPU Time: 2010/01/10 02:38:57
[0.071] PPU Flags: 192643
[0.071] PPU Crc: 31D1BC29
[0.071] PPU Crc: 300797B1 (intfc)
[0.071] PPU Crc: 6B7B25F8 (indc)
[0.071] Number of definitions: 80
[0.071] Number of symbols: 147
[0.071] Load from OBJPAS (interface) unit SYSTEM
[0.071] Adding dependency: OBJPAS depends on SYSTEM
[0.071] Finished loading unit OBJPAS
[0.071] Searching file test.pas... found
[0.071] Parsing implementation of test.pas
[0.071] Handling switch "$I"
[0.071] Searching file test.pas... found
[0.071] Back in test.pas
[0.072] Handling switch "$I"
[0.072] Searching file test.pas... found
[0.072] Back in test.pas
[0.072] Handling switch "$I"
[0.072] Searching file test.pas... found
[0.072] Back in test.pas
[0.072] Handling switch "$I"
[0.072] Searching file test.pas... found
[0.072] Back in test.pas
[0.072] Handling switch "$I"
[0.072] Searching file test.pas... found
[0.072] Back in test.pas
[0.073] Unloading resource unit FPINTRES (not needed)
[0.073] Assembling test
[0.073] Searching file /home/fred/lazarus9.29/fpc/binutils/as... found
[0.073] Using assembler: /home/fred/lazarus9.29/fpc/binutils/as
[0.083] Searching file test.o... found
[0.083] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/system.o... found
[0.095] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/objpas.o... found
[0.096] Linking test
[0.096] Searching file prt0... not found
[0.096] Searching file prt0.o... not found
[0.096] Searching file PRT0.O... not found
[0.096] Searching file /usr/lib/fpc/2.5.1/units/arm-linux/rtl/prt0.o... found
[0.101] Searching file /home/fred/lazarus9.29/fpc/binutils/ld... found
[0.101] Using util /home/fred/lazarus9.29/fpc/binutils/ld
[0.125] 9 lines compiled, 0.1 sec
[0.125] 6 hint(s) issued
[0.125] 2 note(s) issued[/quote]

It works, Marc, it works, alleluia.  :P  :P  :P
Thaaaaanks
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #28 on: January 12, 2010, 10:38:23 pm »
Ooops, litle bemol.

I have tried to compile my real prog (+- 50.000 lines) with Lazarus but i get

Quote
No option inside /usr/lib/fpc/2.5.1/fpc-cross.cfg
Fatal: Cant find unit Interfaces used by miximum
  :'(

and if i try to cross-compile the LCL

Quote
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TLazarusManager.Run starting /usr/share/lazarus/lazarus ...
[WARNING] Out of OEM specific VK codes, changing to unassigned
[WARNING] Out of unassigned VK codes, assigning $FF
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/home/fred/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
Note: TDefinePool.CreateFPCSrcTemplate UnitSearchPath empty
[TExternalToolList.Run] CmdLine="/usr/bin/make clean all -w OS_TARGET=linux CPU_TARGET=arm()" WorkDir="/usr/share/lazarus/lcl"
make: Entering directory `/usr/share/lazarus/lcl'
Makefile:198: *** The Makefile doesn't support target arm()-linux, please run fpcmake first.  Stop.
make: Leaving directory `/usr/share/lazarus/lcl'
TExternalToolList.Run Exception: the process exited with error code 2
TMainIDE.DoBuildLazarus: Building standard components (LCL, SynEdit, CodeTools) failed.


 :'(   :'(
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2482
Re: [Tutorial] Cross Compile for arm-linux (Finally it works!)
« Reply #29 on: January 13, 2010, 01:56:51 am »
Quote
CPU_TARGET=arm()

what do those () there ?

//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus