Last svn Lazarus version on RaspBerry B+ lazarus / 1-Linux ---------------------------------------------------------------------- ouiouioui · 2015-06-18 09:57 Hello, usually i use it on Debian without problem, on RaspBerry i'm begin crazy, after 3days i'm done i don't find alone, i need help please. with apt the version is too much old for my project, so i try install last svn version. I have read and tried all tutorials i found without success i have installed succesfully fpc arm 2.6.4 from "fpc-2.6.4.arm- linux.tar" after when i try make Lazarus with this: Quote# Goto the FreePascal folder. cd ./Lazarus # Initial creation of the repository. svn co http://svn.freepascal.org/svn/lazarus/trunk Lazarus # Update Lazarus snapshot. svn up Lazarus LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf:$LIBRARY_PATH export LIBRARY_PATH # Build the Lazarus binaries. cd ./Lazarus make clean all FPMAKEOPT="-T 8" i get the following error: QuoteAssembling fpmkunit 25124 lines compiled, 34.3 sec 30 warning(s) issued 9 note(s) issued make[3]: Leaving directory '/usr/local/fpc/trunktmp/packages/fpmkunit' /usr/local/fpc/trunktmp/compiler/ppcarm fpmake.pp  -Fu/usr/local/fpc/trunktmp/packages/fpmkunit/units_bs/arm-linux -Fu/usr/local/fpc/trunktmp/rtl/units/arm-linux  Free Pascal Compiler version 3.1.1 [2015/06/18] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling fpmake.pp fpmake.pp(16,3) Note: Local variable "T" is assigned but never used Assembling fpmake Linking fpmake fpmake.pp(49) Warning: "crti.o" not found, this will probably cause a linking failure fpmake.pp(49) Warning: "crtbegin.o" not found, this will probably cause a linking failure fpmake.pp(49) Warning: "crtend.o" not found, this will probably cause a linking failure fpmake.pp(49) Warning: "crtn.o" not found, this will probably cause a linking failure /usr/bin/ld: Avertissement: link.res contient des sections de sortie; avez-vous oublié -T? /usr/local/fpc/trunktmp/rtl/units/arm-linux/cprt0.o: dans la fonction « _haltproc_eabi »: (.text+0x88): référence indéfinie vers « _fini » /usr/local/fpc/trunktmp/rtl/units/arm-linux/cprt0.o: dans la fonction « _haltproc_eabi »: (.text+0x90): référence indéfinie vers « _init » fpmake.pp(49) Error: Error while linking fpmake.pp(49) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted Makefile:1669: recipe for target 'fpmake' failed make[2]: *** [fpmake] Error 1 make[2]: Leaving directory '/usr/local/fpc/trunktmp/packages' Makefile:2662: recipe for target 'packages_smart' failed make[1]: *** [packages_smart] Error 2 make[1]: Leaving directory '/usr/local/fpc/trunktmp' Makefile:2858: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2 i have tried google but, i don't find how fix that, i have this file, i give path Thanks in advance for your help, i try install last svn fpc for see if that help, ---------------------------------------------------------------------- Leledumbo · 2015-06-18 10:20 that arm-linux tar archive is not compiled for arm hard float (as can be seen from the compiler output you paste), which is what recent raspbian requires. raspbian repository contains fpc 2.6.4 with backported patches and is compiled for arm hard float. you can also build from trunk source, providing -dFPC_ARMHF to OPT. ---------------------------------------------------------------------- ouiouioui · 2015-06-18 12:27 Thanks for the answer, i have try apt-get install fpc but it put 2.6.0, i'm on Rasbian up to date. compil fail with it too, i have try compil last svn fpc but it fail too with make all OPT=-dFPC_ARMHF Quote/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res  /bin/rm -f *.s *_ppas.sh make[7]: Leaving directory '/usr/local/fpc/trunktmp/rtl/linux' make[6]: Leaving directory '/usr/local/fpc/trunktmp/rtl' make -C /usr/local/fpc/trunktmp/rtl 'OPT=-dFPC_ARMHF   ' all make[6]: Entering directory '/usr/local/fpc/trunktmp/rtl' An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 make -C linux all make[7]: Entering directory '/usr/local/fpc/trunktmp/rtl/linux' An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/prt0.o arm/prt0.as as   -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/cprt0.o arm/cprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/gprt0.o arm/gprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as /usr/local/fpc/trunktmp/compiler/ppc2 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/usr/local/fpc/trunktmp/rtl/units/arm-linux -dFPC_ARMHF -darm -dRELEASE -Us -Sg system.pp An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 Makefile:3573: recipe for target 'system.ppu' failed make[7]: *** [system.ppu] Error 217 make[7]: Leaving directory '/usr/local/fpc/trunktmp/rtl/linux' Makefile:1950: recipe for target 'linux_all' failed make[6]: *** [linux_all] Error 2 make[6]: Leaving directory '/usr/local/fpc/trunktmp/rtl' Makefile:4157: recipe for target 'rtl' failed make[5]: *** Error 2 make[5]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4046: recipe for target 'next' failed make[4]: *** [next] Error 2 make[4]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4059: recipe for target 'ppc3' failed make[3]: *** [ppc3] Error 2 make[3]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4063: recipe for target 'cycle' failed make[2]: *** [cycle] Error 2 make[2]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:2826: recipe for target 'compiler_cycle' failed make[1]: *** [compiler_cycle] Error 2 make[1]: Leaving directory '/usr/local/fpc/trunktmp' Makefile:2858: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2 ---------------------------------------------------------------------- Leledumbo · 2015-06-18 20:22 Quote from: ouiouioui on June 18, 2015, 02:27:18 pmcompil fail with it too, i have try compil last svn fpc but it fail too with make all OPT=-dFPC_ARMHF You need latest release (2.6.4) to build trunk. Follow this thread. ---------------------------------------------------------------------- bee · 2015-06-19 03:07 I have successfully installed Lazarus trunk on my Raspberry 1B+ model. Here's the steps I did: 1. Install FPC v.2.6.4 (either from apt-get or custom install). 2. Compile FPC trunk (assuming you have had the latest SVN copy) using FPC v.2.6.4 to create FPC trunk binaries (this should be FPC v.3.1?). 3. Compile Lazarus trunk using the FPC trunk binary (from step 2). Before doing any of that, make sure you had increased the swap file into at least 512 MB and video memory into at least 32 MB. Good luck! ---------------------------------------------------------------------- ouiouioui · 2015-06-19 13:50 Hello, for the 1) i think it's ok see: Quoteroot@raspberrypi:/# fpc -v Free Pascal Compiler version 2.6.4 [2014/03/21] for arm Copyright (c) 1993-2014 by Florian Klaempfl and others Fatal: No source file name in command line Fatal: Compilation aborted Error: /usr/local/bin/ppcarm returned an error exitcode (normal if you did not specify a source file to be compiled) 2) i run this: Quotesvn co http://svn.freepascal.org/svn/fpc/trunk 2.7.1 svn up who output what i write in my previous message i don't find find why, i'l try increase swap and come back ---------------------------------------------------------------------- ouiouioui · 2015-06-19 15:14 fail again: Quote/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res  /bin/rm -f *.s *_ppas.sh make[7]: Leaving directory '/usr/local/fpc/trunktmp/rtl/linux' make[6]: Leaving directory '/usr/local/fpc/trunktmp/rtl' make -C /usr/local/fpc/trunktmp/rtl 'OPT=-dFPC_ARMHF   ' all make[6]: Entering directory '/usr/local/fpc/trunktmp/rtl' An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 make -C linux all make[7]: Entering directory '/usr/local/fpc/trunktmp/rtl/linux' An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/prt0.o arm/prt0.as as   -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/dllprt0.o arm/dllprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/cprt0.o arm/cprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/gprt0.o arm/gprt0.as as  -o /usr/local/fpc/trunktmp/rtl/units/arm-linux/ucprt0.o arm/ucprt0.as /usr/local/fpc/trunktmp/compiler/ppc2 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../arm -Fi../unix -Fiarm -FE. -FU/usr/local/fpc/trunktmp/rtl/units/arm-linux -dFPC_ARMHF -darm -dRELEASE -Us -Sg system.pp An unhandled exception occurred at $0005FFC4: EAccessViolation: Access violation   $0005FFC4   $0003CE94   $00036E94 Makefile:3573: recipe for target 'system.ppu' failed make[7]: *** [system.ppu] Error 217 make[7]: Leaving directory '/usr/local/fpc/trunktmp/rtl/linux' Makefile:1950: recipe for target 'linux_all' failed make[6]: *** [linux_all] Error 2 make[6]: Leaving directory '/usr/local/fpc/trunktmp/rtl' Makefile:4157: recipe for target 'rtl' failed make[5]: *** Error 2 make[5]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4046: recipe for target 'next' failed make[4]: *** [next] Error 2 make[4]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4059: recipe for target 'ppc3' failed make[3]: *** [ppc3] Error 2 make[3]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:4063: recipe for target 'cycle' failed make[2]: *** [cycle] Error 2 make[2]: Leaving directory '/usr/local/fpc/trunktmp/compiler' Makefile:2826: recipe for target 'compiler_cycle' failed make[1]: *** [compiler_cycle] Error 2 make[1]: Leaving directory '/usr/local/fpc/trunktmp' Makefile:2858: recipe for target 'build-stamp.arm-linux' failed make: *** [build-stamp.arm-linux] Error 2 maybe my rasbian isn't the good version, my sources.list Quotedeb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non- free rpi deb http://plugwash.raspbian.org/wsf wheezy-wsf main i continue my research, when i found i make 4sd :/ so much time lost i'm bad with linux system lol ---------------------------------------------------------------------- ouiouioui · 2015-06-19 17:55 i have try put raspian again, let them up to date in English and it fail again increase swap change nothing. so i don't know what doing now i wait someone make recent deb for arm thanks to all. ---------------------------------------------------------------------- bee · 2015-06-20 02:34 Try this: http://otapi.com/2015/02/10/raspberry-pi-2-freepascal- lazarus-and-delphi/ ---------------------------------------------------------------------- Leledumbo · 2015-06-20 05:51 Or try another route: Build ppcrossarm for ARM HF from your hostUse it to compile the native ppcarmTransfer ppcarm to rpiUse it as a bootstrapping compiler to build full fpc on rpi (with the same -dFPC_ARMHF) ---------------------------------------------------------------------- ouiouioui · 2015-06-24 08:56 Hello all, finally it's working on my RaspBerry B+ with Raspbian http://www.toutenvrac.org/lazarus.jpg Thanks to all who make FreePascal, Lazarus, Linux, Raspian, Debian and other open source better, so here is my step: put RaspBian Wheezie on sd update them, keep in English, push swap to 1000 dist-upgrade to RaspBian Jessie apt-get install debhelper fp-compiler fp-units-base fp-units-fcl fp- utils po-debconf hevea rdfind symlinks libx11-dev libgdk-pixbuf2.0-dev libcairo2-dev lpango-1.0 libpangox-1.0-dev xorg-dev subversion fp- units-base-2.6.4 fp-units-db-2.6.4 fp-units-fcl-2.6.4 fp-units- fv-2.6.4 fp-units-gfx-2.6.4 fp-units-gnome1-2.6.4 fp-units-gtk-2.6.4 fp-units-gtk2-2.6.4 fp-units-math-2.6.4 fp-units-misc-2.6.4 fp-units- multimedia-2.6.4 fp-units-net-2.6.4 fp-units-rtl-2.6.4 fpc- source-2.6.4 apt-get source --compile fpc svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus cd ./lazarus make all OPT=-dFPC_ARMHF sudo make install OPT=-dFPC_ARMHF PREFIX=/usr maybe i miss some step, before that i put vnc, webmin i don't know if fpc have correct compile settings like for floating but it work it's enough for what i want to do. Thanks all! ---------------------------------------------------------------------- Leledumbo · 2015-06-24 09:00 Congratulations, that's how one is supposed to do Quote from: ouiouioui on June 24, 2015, 10:56:19 ami don't know if fpc have correct compile settings like for floating but it work The default floating point implementation on ARM is AFAIK -CfSOFT (software emulation). As long as your programs are not floating point intensive, that should be enough. Otherwise, consider recompile using -CfVFPv3. You can also make it faster by sacrificing precision using -OoFASTMATH. ---------------------------------------------------------------------- ouiouioui · 2015-06-24 09:27 Good to know thanks, i try recompil if my program grow enought. ---------------------------------------------------------------------- Thaddy · 2015-06-24 09:57 Quote from: Leledumbo on June 24, 2015, 11:00:33 amCongratulations, that's how one is supposed to do Quote from: ouiouioui on June 24, 2015, 10:56:19 ami don't know if fpc have correct compile settings like for floating but it work Otherwise, consider recompile using -CfVFPv3. -CfVFPV3 won't work on the B+, only on the A2 and B2. The B+ requires -CfVFPV2 ---------------------------------------------------------------------- Leledumbo · 2015-06-24 10:18 Quote from: Thaddy on June 24, 2015, 11:57:19 amQuote from: Leledumbo on June 24, 2015, 11:00:33 amCongratulations, that's how one is supposed to do Quote from: ouiouioui on June 24, 2015, 10:56:19 ami don't know if fpc have correct compile settings like for floating but it work Otherwise, consider recompile using -CfVFPv3. -CfVFPV3 won't work on the B+, only on the A2 and B2. The B+ requires -CfVFPV2 Ah, sorry. Didn't pay attention to the detail. ---------------------------------------------------------------------- ouiouioui · 2015-06-24 10:45 Thanks Thaddy. I have make a little research for give argument for compil in: apt-get source --compile fpc but don,'t find for now. ---------------------------------------------------------------------- Thaddy · 2015-06-24 15:16 http://otapi.com/2015/02/10/raspberry-pi-2-freepascal-lazarus-and- delphi/ Half way are steps that are reliably installing fpc and lazarus on any raspberry pi version.