Cross-compile linked error... the never ending story lazarus / 32-Linux ---------------------------------------------------------------------- felipote1972 · 2013-07-30 19:35 hello all. first of all, thank's leledumbo for your help, but today is not my lucky day. my enviorments: 0.- tablet PengPOD (lubuntu 12.04, open system i can view and take all lib's using ssh) 7' armv7. 1.- ubuntu 12.04(32), lazarus  0.9->fpc_2.6.0 (binutils setting's like wiki arm cross tutorial, all working ok, fpccross making binarys only in text mode) 2.- ubuntu 12.10(32), lazarus 1.08->fpc_2.6.2 (same above) 3.- ubuntu 12.10(64), CodeTyphon ->fpc_7.1 (all working ok, toolchains, and all the song's) 4.- ubuntu 12.04(32), CodeTyphon ->fpc_7.1 (same above) (CodeTyphon work's in the same way, and you can make ppcrossarm binary using a wizard) i admit i m a begginner in cross-compilation, and my english follow the same way..  this is the error are follow me all this days, in all my machines is the SAME, when i use the ppcrossarm, almost finishing when linking... ""Compilando paquete LCL 1.0.1" completado a2.lpr(22) Warning: "crti.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtbegin.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtend.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtn.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crti.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtbegin.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtend.o" not found, this will probably cause a linking failure a2.lpr(22) Warning: "crtn.o" not found, this will probably cause a linking failure /arm-linux-ld: warning: link.res contains output sections; did you forget -T? /arm-linux-ld: cannot find -ldl /arm-linux-ld: cannot find -lpthread /arm-linux-ld: cannot find -lX11 /arm-linux-ld: cannot find -lgdk_pixbuf-2.0 /arm-linux-ld: cannot find -lgtk-x11-2.0 /arm-linux-ld: cannot find -lgdk-x11-2.0 /arm-linux-ld: cannot find -lgobject-2.0 /arm-linux-ld: cannot find -lglib-2.0 /arm-linux-ld: cannot find -lgthread-2.0 /arm-linux-ld: cannot find -lgmodule-2.0 /arm-linux-ld: cannot find -lpango-1.0 /arm-linux-ld: cannot find -lcairo /arm-linux-ld: cannot find -latk-1.0 /arm-linux-ld: cannot find -lc a2.lpr(22) Error: Error while linking a2.lpr(22) Fatal: There were 1 errors compiling module, stopping" correct me if i wrong, are 3 ways to make binaries: 1.- using command line in terminal, making simple programs eg: fpc -Tlinux -Parm -XParm-linux- TestARM.pas 2.- using lazarus, using default 'fpc' compiler, and parameter: -Tlinux -Parm -XParm-linux- 3.- using lazarus, setting 'fpcrossarm' compiler, (this binary compiler apears when you set make crosscompile, before installing lazarus) 4.- i use the wikitutorial for this stuff , and this command to create the cross-compiler binary: "sudo make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=/home/felipote/lazarus/fpc/binutils/ OPT=-dFPC_ARMEL INSTALL_PREFIX=/usr" (same wiki tutorial....) leledumbo, mencioned the target libraries, and i import them all (/lib/ & /usr/lib/ using ssh from the pengpod target), and i put in a host dir: libcross125, but: 1.- i don't know where & when use this path, i can use in the "sudo make crossinstall" command?  i don't know, maybe in tools->'build' lazarus->option or in Compiler_option->other->compilation, i think both's are the same. In fact i try all the stuff without success. Reading the posts in  CodeTyphon forums, sternas upload a 'arm-linux- pi.7z', but: 1.- i don't know how use this libs 2.- i don't know how create a new ppcrossarm with this libs, but i think, it's fix the problem, bacause many people (no so many) has the same issue. someone can explain how use this lib's and to make this happend so, i always think: 'the pengpod is a ubuntu linux-machine, how i can't run a simple form on it?'...not good. so, that's it and this is, the never ending history...  :-S apreciate any help. thanks ---------------------------------------------------------------------- Leledumbo · 2013-07-30 21:29 Quoteleledumbo, mencioned the target libraries, and i import them all (/lib/ & /usr/lib/ using ssh from the pengpod target), and i put in a host dir: libcross125, but: 1.- i don't know where & when use this path, i can use in the "sudo make crossinstall" command?  i don't know, maybe in tools->'build' lazarus->option or in Compiler_option->other->compilation, i think both's are the same. In fact i try all the stuff without success.Project->Project Options->Compiler Options->Paths->Libraries (-Fl) I thought I've mentioned -Fl in my mail reply ---------------------------------------------------------------------- felipote1972 · 2013-07-30 22:55 yes, you'r right. 1.- i test with Fl parameter, still Don't Work: a.-When i use 'pccrossarm' as compiler, show me this is 'test' mode: "PPU Time: 2013/07/30 03:35:23 PPU Flags: 159874 PPU Crc: BC712A50 PPU Crc: 812EAE60 (intfc) PPU Crc: E7A0CD5F (indc) Number of definitions: 80 Number of symbols: 147 Load from OBJPAS (interface) unit SYSTEM Adding dependency: OBJPAS depends on SYSTEM Finished loading unit OBJPAS Searching file /tmp/testcompileroptions.pas... found Parsing implementation of /tmp/testcompileroptions.pas Syntax error, "BEGIN" expected but "end of file" found Compilation aborted" and when build this Error: "a1.lpr(1,1) Fatal: Can't find unit Interfaces used by a1" b.- when i use 'ppc' bin compiler, with choosing the target in project_option->compiler_option->code_generate->  SO(-T):linux & CPU(-P):arm, when build jump: "Note: Switching assembler to default source writing assembler a1.lpr(1,1) Fatal: Can't find unit Interfaces used by a1" c.- when i i use 'ppc386' compile, with choosing the target in project_option->compiler_option->code_generate->  SO(-T):linux & CPU(-P):arm, when build jump:  "Note: Switching assembler to default source writing assembler a1.lpr(1,1) Fatal: Can't find unit Interfaces used by a1" d.- but ,when i use 'ppc386' compiler, with 'default' parameters, all is work OK. (NO Cross-Compile), so the installatin of IDE lazarus, and compiler is good e.- when i create a simple program using lazarus and choose 'ppcrossarm', the program compilation is ok, then the binary run's well in the arm tablet, in fact this binary can't be run in the host, only in the target, so the cross-compiler work's. sternas in other forum mencioned and upload a 'arm-linux-pi.7z' libraries for fix this issue, but i don't know how use this lib's to create a new 'ppcrossarm' binary and use in lazarus. ,  i think and i hope that lib's fix the problem. thank's ---------------------------------------------------------------------- Leledumbo · 2013-07-30 23:36 Quotea1.lpr(1,1) Fatal: Can't find unit Interfaces used by a1LCL must be compiled for arm-linux-gtk2 as well (I don't know why it doesn't work in your system, here on my machine the recompilation is done automatically when target platform / widgetset changes) Here's the wiki entry for that error message. Quotesternas in other forum mencioned and upload a 'arm-linux-pi.7z' libraries for fix this issue, but i don't know how use this lib's to create a new 'ppcrossarm' binary and use in lazarus. ,  i think and i hope that lib's fix the problem.I believe no, though I haven't seen its contents. Perhaps it's just a bunch of required Raspbian libraries from /usr/lib. ---------------------------------------------------------------------- felipote1972 · 2013-07-30 23:56 right now i have a ready new machine (all updates ok) for re-install again all new. tell me please for crosscompiling: 1.- which binutils best version i need 2.- which fpc i need 3.- and lazarus always i think 2.23 - 2.6.2 - 1.08 or 1.010 i can't give up. important: i working with virtual machines, and my really-host is a ubuntu 12.04 (64 Bits) thank's again ---------------------------------------------------------------------- Leledumbo · 2013-07-31 15:27 1. Any that is recent enough (>= 2.19), last version I use for arm- linux is 2.21.53, but I never hear any issue on latest version2. Latest release (2.6.2) is fine3. Latest release (1.0.10) is fineYour current cross compiler IS fine, the problem is not related to the compiler nor the IDE, only environment and configuration settings. Try cross building Lazarus itself from command line (execute this in Lazarus folder): make clean all OS_TARGET=linux CPU_TARGET=arm LCL_PLATFORM=gtk2 If that works, your current Lazarus should be ready to cross compile for arm-linux-gtk2 (the LCL should already be built for the target)