* * *

Author Topic: Unable to compile Lazarus on raspberry pi  (Read 15633 times)

Johan

  • New member
  • *
  • Posts: 10
Unable to compile Lazarus on raspberry pi
« on: November 24, 2012, 07:51:16 pm »
Hi

I am trying to compile Lazarus on my raspberry pi. I have the raspian image installed and updated. I have installed fpc 2.6.0 from the repositories, but the repo only has lazarus 0.9.30. I want to compile Lazarus 1.0.2 but the compile fails near the end with the following message:

Free Pascal Compiler version 2.6.0-6+rpi1 [2012/11/16] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling lazarus.pp
Compiling main.pp
Assembling main
main.pp(19362) Error: Can't call the assembler, error -9 switching to external assembling
main.pp(19362) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory `/home/jkotze/lazarus/ide'
make[1]: *** [ide] Error 2
make[1]: Leaving directory `/home/jkotze/lazarus/ide'
make: *** [ide] Error 2

I can compile normal (non - gui) freepascal apps without issues.

Any ideas ?

IndianaJones

  • Hero Member
  • *****
  • Posts: 509
Re: Unable to compile Lazarus on raspberry pi
« Reply #1 on: November 24, 2012, 09:31:20 pm »
I think you are using the Debian repo, so it is so old.
Have you ever tried with the latest svn trunk?
You can follow the following page.
http://wiki.freepascal.org/Getting_Lazarus
Thanks.
« Last Edit: November 24, 2012, 09:34:12 pm by IndianaJones »

Johan

  • New member
  • *
  • Posts: 10
Re: Unable to compile Lazarus on raspberry pi
« Reply #2 on: November 24, 2012, 09:52:55 pm »
I am using fpc 2.6.0 which is the current stable version. I also downloaded Lazarus 1.0.2  source and tried to compile that. I have in the meantime managed to compile a Lazarus project and it runs. I just cannot seem to compile the IDE.

zirkonxx

  • Newbie
  • Posts: 1
Re: Unable to compile Lazarus on raspberry pi
« Reply #3 on: November 30, 2012, 02:00:57 am »
hi i have same problem you must install binutils-dev

Code: [Select]
sudo apt-get install binutils-dev

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Unable to compile Lazarus on raspberry pi
« Reply #4 on: March 07, 2013, 12:37:03 am »
Code: [Select]
sudo apt-get install binutils-dev
I am also facing the same problem, and installing binutils-dev does not make any difference.

The reason for me to compile the ide is only at I want to install the Zeos package - anyone having any ideas?

Regards
Christian

avra

  • Hero Member
  • *****
  • Posts: 1062
    • Additional info
Re: Unable to compile Lazarus on raspberry pi
« Reply #5 on: March 08, 2013, 10:03:05 am »
I used to increase swap file and then managed to compile Lazarus 1.0.2 from the source (latest SVN at the time) on my old 256MB Pi. I am not sure, but I think I have increased swap to 512MB. I can check when I get home if anyone is interested. X was not started. I used FPC 2.6.0 from repository.
« Last Edit: March 08, 2013, 10:05:47 am by avra »
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Unable to compile Lazarus on raspberry pi
« Reply #6 on: March 08, 2013, 02:51:49 pm »
Combining lazarus with a debian version( wheezy raspbian) of linux on a raspberry pi provides a huge number of opportunities for a bad outcome. The raspberry pi folks have addressed this with pre validated packages. So if  using these packages has value to you ....here are the steps.
 
1) get ready to update the pi OS

The following commands can take about 2 hrs to complete
 
  sudo apt-get update              //// gets latest version of pi OS
  sudo apt-get upgrade             //// upgrades to the latest version
2)
  get ready to install fpc

  sudo apt-get install fpc         //// this often fails
3)
  If 2) fails
  sudo apt_get update
  sudo apt-get install fpc        /// should now work

4)
 Get ready to install lazarus
 
  sudo apt-get install lazarus

At this point the lazarus IDE should run.
Now the raspberry pi OS distro is for a 2gb SD card. ( even an 8gb card will only get a 2gb partition) Use Win32DiskImager.exe( to R/w linux image) and a partition manager to expand the linux partition space...I run lazarus on a 8gb sd card pi is 512MB rev B
« Last Edit: March 08, 2013, 03:01:24 pm by picstart »

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Unable to compile Lazarus on raspberry pi
« Reply #7 on: March 08, 2013, 04:18:48 pm »
@picstart.

Which is exactly what I have done.

And there is no problem in installing FPC + Lazarus.

BUT, the problem comes when one wants to install additional packages (eg. Zeos), which requires the IDE to be rebuild  - then the compilation fails.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Unable to compile Lazarus on raspberry pi
« Reply #8 on: March 08, 2013, 08:24:48 pm »
I did install bgracontrols and other components that I wrote myself and the IDE did recompile without error but it was slow ( several minutes). Now you may have a dependency issue between the zeos and the version of lazarus it will run on....further the version of lazarus that will run zeos may not run on the pi. Opportunities to encounter issues like this exist with every new version of lazarus or the linux pi OS. Fortunately these opportunities are free opportunities.

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Unable to compile Lazarus on raspberry pi
« Reply #9 on: March 09, 2013, 01:10:21 pm »
Ok, then lets turn it the other way - does anyone have any luck in installing Zeos on the Pi, and if so, how do one have to do?

gigi0ne

  • Newbie
  • Posts: 1
Re: Unable to compile Lazarus on raspberry pi
« Reply #10 on: March 23, 2013, 11:07:20 am »
first sorry for my english..

try this:

insert a usb key (without data)

df

see key name (for me sda1)

umount sda1
mkswap /dev/sda
swapon /dev/sda

then recompile..
recompile perfect.. slow.. very slow.. but work

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Unable to compile Lazarus on raspberry pi
« Reply #11 on: April 24, 2013, 12:42:18 pm »
Ok, then lets turn it the other way - does anyone have any luck in installing Zeos on the Pi, and if so, how do one have to do?
OK, to answer my own question.

There are some problems with recompiling the IDE on the RPi, as it simply requires to much memory, but I have found a way following this guide:

http://www.michellcomputing.co.uk/blog/2012/11/lazarus-on-the-raspberry-pi/

I reduced the size of GPU to 32M, and increased the swap file to 500M (running raspi-config).

Then it is possible to build the IDE from the console, before starting X - trying under X uses to much memory.

Then to install the Zeos package as I needed, do like this in CLI:

./lazbuild --build-ide= ~/(eventual subdir)/zeos701/packages/lazarus/zcomponent.lpk

macaruchi

  • New member
  • *
  • Posts: 30
Re: Unable to compile Lazarus on raspberry pi
« Reply #12 on: August 06, 2013, 06:06:22 am »
Hi!
Chernobel

I am trying your message about compile Lazarus on Raspberry PI. I use the Mitchel guide and everything was fine , Lazarus run on my PI, but when I try to install Zeos uisng lazbuild --build-ide=component,
I get an error

TExternalToolList.Run : Error: Illegal parameter

U have any cluee?

 

yellowbit

  • New member
  • *
  • Posts: 22
Re: Unable to compile Lazarus on raspberry pi
« Reply #13 on: January 19, 2015, 10:44:14 am »
Ok, then lets turn it the other way - does anyone have any luck in installing Zeos on the Pi, and if so, how do one have to do?
OK, to answer my own question.

There are some problems with recompiling the IDE on the RPi, as it simply requires to much memory, but I have found a way following this guide:

http://www.michellcomputing.co.uk/blog/2012/11/lazarus-on-the-raspberry-pi/

I reduced the size of GPU to 32M, and increased the swap file to 500M (running raspi-config).

Then it is possible to build the IDE from the console, before starting X - trying under X uses to much memory.

Then to install the Zeos package as I needed, do like this in CLI:

./lazbuild --build-ide= ~/(eventual subdir)/zeos701/packages/lazarus/zcomponent.lpk

I've lost half a day trying this tutorial and failed (error from the first post, then some errors while building Lazarus) :( I'm guessing that people who did it successfuly, did it not on the "fresh" system, but installed something additional before, what wasn't mentioned in the tutorial.

LaKraven

  • Newbie
  • Posts: 4
Re: Unable to compile Lazarus on raspberry pi
« Reply #14 on: February 11, 2015, 08:50:24 am »
There's a link to my step-by-step no-nonsense guide on compiling and building both FPC and Lazarus on the RPi2 in this forum post: http://forum.lazarus.freepascal.org/index.php/topic,27257.0.html

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus