Lazarus

Installation => PDAs and Smartphones => Topic started by: Johan on November 24, 2012, 07:51:16 pm

Title: Unable to compile Lazarus on raspberry pi
Post by: Johan 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 ?
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: IndianaJones 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 (http://wiki.freepascal.org/Getting_Lazarus)
Thanks.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: Johan 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.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: zirkonxx 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: chrnobel 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: avra 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.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: picstart 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: chrnobel 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.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: picstart 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.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: chrnobel 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?
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: gigi0ne 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: chrnobel 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: macaruchi 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?

 
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: yellowbit 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.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: LaKraven 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
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: dogriz on February 11, 2015, 12:37:59 pm
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
This guide works only for RPi 2 boards and not for older versions.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: LaKraven on February 11, 2015, 03:06:17 pm
Just replace the ARM 7 build params for ARM 6 and it'll compile just fine. I've done this on my RPi1 Model B.
Title: Re: Unable to compile Lazarus on raspberry pi
Post by: bee on March 05, 2015, 08:54:01 am
Just replace the ARM 7 build params for ARM 6 and it'll compile just fine. I've done this on my RPi1 Model B.

How did you build Lazarus on RPi1? I've been trying but failed. Please see my new thread at: http://forum.lazarus.freepascal.org/index.php/topic,27590.msg170707/topicseen.html

Thank you.
TinyPortal © 2005-2018