Recent

Author Topic: Lazarus On The Raspberry PI  (Read 11150 times)

zogtrog

  • New Member
  • *
  • Posts: 20
Lazarus On The Raspberry PI
« on: March 23, 2013, 08:30:47 am »
Hi,
    There is a lot of interest in using Lazarus and free pascal on the raspberry pi with Raspbian ( a debian variant which support hard float operations on the arm 6 processor ).I have successfully managed to instruct raspberry pi users  on how to install lazarus, plus fpc 2.6.0  from source using sub version. There are no offical raspbian packages for the latests lazarus releases for the raspberry pi. A comment that keeps coming up over on the raspberry pi forums is that fpc 2.6.2 doesn't support hard float operations. Am I right in thinking that if I compile fpc 2.6.2 on the pi it will just generate code with soft float support, but essentially it will still work and therefore I will be able to build lazarus 1.0.8 for the raspberry pi ?
 I would also like to be able to create raspbian packages for beginners to install is there an offical way to do this or should I create my own packages ?

Thanks for any help and advice you can give on this matter.

Jack Taylor

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11444
  • FPC developer.
Re: Lazarus On The Raspberry PI
« Reply #1 on: March 23, 2013, 02:27:14 pm »
All FPC 2.6.x series don't support hardfloat. However a Debian maintainer backported HF support from 2.7.x to 2.6.x.

Afaik the patches are in the release building (fpcbuild) repository of FPC, which is also packaged as part of the source part of the release (search in install/debian/patches or so in the fpcbuild zips):

ftp://ftp.hu.freepascal.org/fpc/dist/2.6.2/sources/

See also patch 3 in the post release patches, it concerns a debian linking path issue.


zogtrog

  • New Member
  • *
  • Posts: 20
Re: Lazarus On The Raspberry PI
« Reply #2 on: March 23, 2013, 04:18:35 pm »
cheers I will have a look at those and cross post your answer in the raspberry pi forum in the lazarus installation thread if I get stuck.

Thanks

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 402
Re: Lazarus On The Raspberry PI
« Reply #3 on: May 02, 2013, 08:26:10 pm »
Jack:

I'm brand-new to RPi and Debian Wheezy, but used the 4-step install 

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

from http://wiki.freepascal.org/Lazarus_on_Raspberry_Pi.  It generated some errors (don't know what they mean) -- but otherwise, I don't think it could have been simpler, and I ended up with Lazarus and fpc installed and working.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazarus On The Raspberry PI
« Reply #4 on: May 03, 2013, 11:41:07 am »
I'm brand-new to RPi and Debian Wheezy, but used the 4-step install
If you take a look at the version of installed Lazarus, you will find out why many people are trying the other way. I have managed to install latest Lazarus with a trick, because the common SVN way reports many compilation errors.

First, you need to increase Raspbian default paging file to 512MB.
Next, you install FPC from Raspbian repository as you have mentioned.
Finally, you install Lazarus from SVN.

Last step worked with Lazarus 1.02 at the time when I did it initially, but it might be a problem with 1.08 or current SVN since they need FPC newer then in Raspbian depository. So, try this method with Lazarus 1.06 or older since they still compile with FPC 2.6.0.

EDIT: comment from chrnobel reminded me to report that I had to lower GPU usage (I think 16MB was minimum), and I compiled without X running. These settings and swap file increase were essential for successful compilation of many things flagged as 'non compilable' by some users in various forums.
« Last Edit: May 03, 2013, 01:10:38 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

chrnobel

  • Sr. Member
  • ****
  • Posts: 283
Re: Lazarus On The Raspberry PI
« Reply #5 on: May 03, 2013, 12:15:08 pm »
If interested I have written an instruction here, how to install latest version from subversion:

http://www.lazarus.freepascal.org/index.php/topic,19012.msg120235.html#msg120235

/Christian

 

TinyPortal © 2005-2018