How to convert lazarus.win32 into linux-arm lazarus / 37-Linux PDAs ---------------------------------------------------------------------- assembly84 · 2014-02-18 05:30 Hi, I'm new in linux-arm. Try to convert win32 project to linux-arm; use to programming Raspberry-pi i'm using lazarus 1.3.0 and fpc 2.6.2. Target platform has set to linux, uP to arm and compiler path fpc.exe hasc hange--> to ppcrossarm.exe so error message : fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz of package FCL. thanks for helping me ---------------------------------------------------------------------- motaz · 2014-02-18 07:52 listening.. ---------------------------------------------------------------------- Laksen · 2014-02-18 07:54 You don't have to change compiler. Fpc automatically does that. Usually Lazarus builds a new LCL automatically. Which version are you using? ---------------------------------------------------------------------- assembly84 · 2014-02-18 08:35 thanks for comments. I've use Lazarus 1.30 and FPC 2.6.2 .... i'd hard try to compile from win32 --> linux-arm, but always failed . fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz of package FCL. ---------------------------------------------------------------------- assembly84 · 2014-02-18 08:38 I'd set from Lazarus 1.30 IDE : Target Platform : Target OS : linux Target uP : arm help me please ... ---------------------------------------------------------------------- Laksen · 2014-02-18 15:44 How did you build the FPC crosscompiler? ---------------------------------------------------------------------- assembly84 · 2014-02-18 21:54 Quote from: Laksen on February 18, 2014, 04:44:44 pmHow did you build the FPC crosscompiler? Hi Laksen, I do know what the good step. May be i doing it wrong. First, I set from Target Platform to : linux ; uP to ARM so i try to build my test application from Run menu. then this FATAL error message show again. I try to build application from win32 to arm-linux, how is the correct step ? Thank for helping me. ---------------------------------------------------------------------- Leledumbo · 2014-02-19 01:43 QuoteHi Laksen, I do know what the good step. May be i doing it wrong. First, I set from Target Platform to : linux ; uP to ARM so i try to build my test application from Run menu. then this FATAL error message show again.Then I'm sure you don't have the cross compiler. FPC (standalone installation package or bundled with Lazarus) doesn't ship with ALL cross compilers precompiled, you have to build one according to your needs (FPC supports >20 combinations of architecture and OS, it would be overkill to distribute all cross compilers). This is the wiki article to read for building a cross compiler: http://wiki.lazarus.freepascal.org/Cross_compiling ---------------------------------------------------------------------- assembly84 · 2014-02-19 02:26 Quote from: Leledumbo on February 19, 2014, 02:43:54 amQuoteHi Laksen, I do know what the good step. May be i doing it wrong. First, I set from Target Platform to : linux ; uP to ARM so i try to build my test application from Run menu. then this FATAL error message show again.Then I'm sure you don't have the cross compiler. FPC (standalone installation package or bundled with Lazarus) doesn't ship with ALL cross compilers precompiled, you have to build one according to your needs (FPC supports >20 combinations of architecture and OS, it would be overkill to distribute all cross compilers). This is the wiki article to read for building a cross compiler: http://wiki.lazarus.freepascal.org/Cross_compiling Hi Leledumbo, it's means i've to build one according my need ? i'd installed lazarus1.3 with FPC 2.6.2 from lazmirror. then continue install ugraded fpc262_cross_arm_wince_win32.exe ? Is there enough to build it self ? i'm going to build application from win32 which run on linux_arm in raspberry. thanks for helping me ---------------------------------------------------------------------- Leledumbo · 2014-02-19 10:42 Quote it's means i've to build one according my need ?yes Quoteinstall ugraded fpc262_cross_arm_wince_win32.exe ? Is there enough to build it self ?you don't need arm-wince cross compiler (this one has prepackaged installer fortunately) if your target is arm- linux. for arm-linux, however, you need more than just fpc and its COMPLETE source (Lazarus installer for windows only ships rtl and packages, you'll need to download the full source). You'll need arm- linux cross binutils, which you also have to built from binutils source. The article above should explain it all. Even more, you'll need target system libraries as well (it's the requirement of unix binaries that all shared libraries must be present at link time). If your target is raspberrypi (with raspbian OS), then it's better to get lazarus for raspbian instead. Lazarus is capable to run directly there, no need for cross compilation (it's not a simple task after all). ---------------------------------------------------------------------- assembly84 · 2014-02-22 06:35 Quote from: Leledumbo on February 19, 2014, 11:42:21 amQuote it's means i've to build one according my need ?yes Quoteinstall ugraded fpc262_cross_arm_wince_win32.exe ? Is there enough to build it self ?you don't need arm-wince cross compiler (this one has prepackaged installer fortunately) if your target is arm- linux. for arm-linux, however, you need more than just fpc and its COMPLETE source (Lazarus installer for windows only ships rtl and packages, you'll need to download the full source). You'll need arm- linux cross binutils, which you also have to built from binutils source. The article above should explain it all. Even more, you'll need target system libraries as well (it's the requirement of unix binaries that all shared libraries must be present at link time). If your target is raspberrypi (with raspbian OS), then it's better to get lazarus for raspbian instead. Lazarus is capable to run directly there, no need for cross compilation (it's not a simple task after all). thanks for suggest ya.... but i've update from svn to build complete lazarus. but found error after this like ? How to solve it ? thanks alot target: ARM os: linux "Compiling package FCL 1.0.1" completed C:\development\lazarus\components\lazutils\unixlazfileutils.inc(128,8) Hint: User defined: use GetEnvironmentVariableUTF8 C:\development\lazarus\components\lazutils\laz2_xmlread.pas(1151,7) Hint: Mixing signed expressions and longwords gives a 64bit result "Compiling package LazUtils 1.0" completed C:\development\lazarus\lcl\include\customform.inc(734,3) Warning: unreachable code C:\development\lazarus\lcl\dialogs.pp(630,5) Warning: unreachable code C:\development\lazarus\lcl\dbctrls.pp(1337,56) Warning: Symbol "Lookup" is deprecated C:\development\lazarus\lcl\dbgrids.pas(1149,18) Warning: Symbol "Lookup" is deprecated C:\development\lazarus\lcl\dbgrids.pas(2996,54) Warning: Symbol "Lookup" is deprecated C:\development\lazarus\lcl\dbgrids.pas(3017,28) Warning: Symbol "Lookup" is deprecated C:\development\lazarus\lcl\dbgrids.pas(3697,30) Warning: Symbol "Lookup" is deprecated "Compiling package LCLBase 1.3" completed C:\development\lazarus\lcl\interfaces\gtk2\gtk2listviewtreemodel.pas(2 08,12) Hint: Mixing signed expressions and longwords gives a 64bit result C:\development\lazarus\lcl\interfaces\gtk2\gtk2pagecontrol.inc(531,36) Hint: Mixing signed expressions and longwords gives a 64bit result C:\development\lazarus\lcl\interfaces\gtk2\gtk2wsdialogs.pp(1160,62) Hint: Local variable "colors" does not seem to be initialized C:\development\lazarus\lcl\interfaces\gtk2\gtk2wsforms.pp(941,8) Note: User defined: test with smaller minor versions and check where LM_CONFIGUREEVENT is needed. C:\development\lazarus\lcl\interfaces\gtk2\gtk2wsmenus.pp(203,33) Hint: Mixing signed expressions and longwords gives a 64bit result C:\development\lazarus\lcl\interfaces\gtk2\gtk2widgetset.inc(2828,22) Hint: Mixing signed expressions and longwords gives a 64bit result C:\development\lazarus\lcl\interfaces\gtk2\gtk2widgetset.inc(3565,14) Hint: Converting the operands to "Int64" before doing the subtract could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2widgetset.inc(3566,15) Hint: Converting the operands to "Int64" before doing the subtract could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2winapi.inc(2136,29) Hint: The left operand of the IN operator should be byte sized C:\development\lazarus\lcl\interfaces\gtk2\gtk2proc.inc(2677,34) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2proc.inc(2723,39) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2proc.inc(2772,58) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2proc.inc(2929,37) Hint: Converting the operands to "Int64" before doing the add could prevent overflow errors. C:\development\lazarus\lcl\interfaces\gtk2\gtk2proc.inc(3412,46) Hint: Mixing signed expressions and longwords gives a 64bit result C:\development\lazarus\lcl\interfaces\gtk2\gtk2callback.inc(2189,30) Hint: Mixing signed expressions and longwords gives a 64bit result "Compiling package LCL 1.3" completed Options changed, recompiling clean with -B cross1lib.pas(8,39) Hint: Unit "strutils" not used in cross1lib cross1.lpr(22) Warning: "crti.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtbegin.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtend.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtn.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crti.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtbegin.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtend.o" not found, this will probably cause a linking failure cross1.lpr(22) Warning: "crtn.o" not found, this will probably cause a linking failure C:\development\fpc\bin\arm-linux\arm-linux-ld.exe: cannot open linker script file linux: No such file or directory cross1.lpr(22) Error: Error while linking cross1.lpr(22) Fatal: There were 1 errors compiling module, stopping ---------------------------------------------------------------------- Leledumbo · 2014-02-22 07:02 QuoteC:\development\fpc\bin\arm-linux\arm-linux-ld.exe: cannot open linker script file linux: No such file or directoryNo idea. What version of binutils are you building? ---------------------------------------------------------------------- assembly84 · 2014-02-22 07:24 Quote from: Leledumbo on February 22, 2014, 08:02:53 amQuoteC:\development\fpc\bin\arm-linux\arm-linux-ld.exe: cannot open linker script file linux: No such file or directoryNo idea. What version of binutils are you building? binutils --> i've download following from wikilazarus Directory of C:\development\cross\bin\arm-linux 02/21/2014 12:01 PM