Recent

Author Topic: raspberry installation  (Read 6421 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2261
    • Lazarus and Free Pascal italian community
raspberry installation
« on: April 03, 2014, 01:44:17 pm »
I bought a raspberry pi and try to install lazarus 1.0.14 and fpc 2.6.2 because I have to be able to use raudus on this architecture . I used

sudo apt- get update
sudo apt- get upgrade
sudo apt- get install lazarus

but of course the old version was . Then I performed the following steps:

I went to the following address

http://sourceforge.net/projects/freepascal/files/

I chose
Linux

then I chose
2.6.2

and there I was:
http://sourceforge.net/projects/freepascal/files/Linux/2.6.2/

I then downloaded

fpc - 2.6.2.arm - linux.tar

decompressed with

tar-xvf ./fpc-2.6.2.arm-linux.tar

cd fpc - 2.6.2.arm -linux /

sudo sh install.sh

then went on
http://sourceforge.net/projects/lazarus/files/Lazarus 20Zip % % 20_ % 20GZip /

I chose the version 1.0.14

http://sourceforge.net/projects/lazarus/files/Lazarus 20Zip % % 20_ % 20GZip/Lazarus % 201.0.14 /

download version . tar.gz

sudo chmod 777 lazarus - 1.0.14 - 0.tar.gz

unzip with

tar-zxvf lazarus - 1.0.14 - 0.tar.gz

cd lazarus

make clean all
Code: [Select]
.
.
.
assembling lazbuild
Compiling resource .. / units / arm- linux / nogui / lazbuild.or
Linking .. / lazbuild
/ usr / bin / ld : warning: .. / link.res contains output sections ; did you forget- T ?
/ usr/lib/fpc/2.6.2/units/arm-linux/rtl/cprt0.o : In function ` _haltproc_eabi ' :
(. text +0 x88 ) : undefined reference to ` _fini '
/ usr/lib/fpc/2.6.2/units/arm-linux/rtl/cprt0.o : In function ` _haltproc_eabi ' :
(. text +0 x90 ) : undefined reference to ` _init '
lazbuild.lpr ( 1424) Error: Error while linking
lazbuild.lpr ( 1424) Fatal: There were 1 errors compiling module , stopping
Fatal: Compilation aborted
make [ 2] : *** [ lazbuild ] Error 1
make [ 2] : Leaving directory `/ home / pi / Documents / lazarus / ide '
make [ 1] : *** [ lazbuilder ] Error 2
make [ 1] : Leaving directory `/ home / pi / Documents / lazarus / ide '
make: *** [ lazbuild ] Error 2
Google Traduttore per il Business:Translator ToolkitTraduttore di siti webStrumento a supporto dell'export

I tried to follow this solution

http://bugs.freepascal.org/view.php?id=24056

but if I type

sudo find / -name cprt0.as

I do not have any results. Does anyone know how to help me?!
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2261
    • Lazarus and Free Pascal italian community
Re: raspberry installation
« Reply #1 on: April 04, 2014, 05:05:20 am »
not idea?!
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: raspberry installation
« Reply #2 on: April 04, 2014, 12:15:55 pm »
Are you using raspbian or another hard float distribution? If so, standard FPC 2.6.x won't work; you'll need the debian patched version that uses the hardfloat calling conventions (IIRC the terminology).

http://wiki.lazarus.freepascal.org/ARM_compiler_options#Instruction_sets
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

avra

  • Hero Member
  • *****
  • Posts: 2592
    • Additional info
Re: raspberry installation
« Reply #3 on: April 04, 2014, 01:21:15 pm »
If Lazarus 1.10 and FPC 2.6.2 with hard float support in Raspbian are enough for your needs then take a look at this solution:
http://forum.lazarus.freepascal.org/index.php/topic,22610.msg133708.html#msg133708

For Lazarus 1.0.6 and FPC 2.6.0 with hard float support in Raspbian take a look at solution explained here:
http://forum.lazarus.freepascal.org/index.php/topic,20481.msg126602.html#msg126602
« Last Edit: April 04, 2014, 01:25:12 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

xinyiman

  • Hero Member
  • *****
  • Posts: 2261
    • Lazarus and Free Pascal italian community
Re: raspberry installation
« Reply #4 on: April 04, 2014, 06:06:33 pm »
Are you using raspbian or another hard float distribution? If so, standard FPC 2.6.x won't work; you'll need the debian patched version that uses the hardfloat calling conventions (IIRC the terminology).

http://wiki.lazarus.freepascal.org/ARM_compiler_options#Instruction_sets

Sorry BigChimp, so I can not install it on raspberry? Do I have to compile from one PC x86 or amd64 and then move the track?! I do not understand
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: raspberry installation
« Reply #5 on: April 04, 2014, 06:14:00 pm »
Standard ARM FPC is softfloat. Raspbian is hardfloat. They are not compatible. (I don't know if that is the problem in your case because you still have not said what distribution you are using)

If you are using raspbian you cannot use standard FPC 2.6.x because ARMHF support is either non-existent or not good enough. As I said, there are raspbian patches for FPC 2.6. that allow it to work on ARMHF, but obviously you will need to use the raspbian version, not the standard FPC version.

Use either FPC trunk with ARMHF (e.g. via fpcup) or follow one of Avra's suggestions.

Copying x86 or x64 compiled binaries from a PC would be madness as the instruction set is totally different - ARM CPUs cannot understand x86 code...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

xinyiman

  • Hero Member
  • *****
  • Posts: 2261
    • Lazarus and Free Pascal italian community
Re: raspberry installation
« Reply #6 on: April 04, 2014, 06:23:55 pm »
you use raspbian. it's a shame, I'll try the patch suggested by will have, I'd like to figure out just how often are released patches for the raspberry.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018