Recent

Author Topic: Raspberry pi lazarus compile problem  (Read 23189 times)

croc

  • New Member
  • *
  • Posts: 16
Raspberry pi lazarus compile problem
« on: December 02, 2014, 05:11:24 pm »
Hello,

I have question. I have raspberry pi version with 256mb and 16gb sd kaart. I installed lazarus and it boots up correctly in GUI. When I compile a simple example hello world I get the following error: lazarus error can't call the assembler, error -1 switching to external assembling.

I already change the memory split to 16mb with
sudo raspi-config option 8 memory split to 16mb.

What should be done to fix this problem ??

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #1 on: December 02, 2014, 08:13:52 pm »
I have now a different error.

Can not find unit interface used by Hello_World. check if package LCL is in the dependencies.

How could I fix this?

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #2 on: December 03, 2014, 07:04:34 pm »
I got the first problem back and again.

The version of lazarus is Lazarus IDE v1.2.4+dfsg-2+b1

Can somebody help me ??

jwdietrich

  • Hero Member
  • *****
  • Posts: 1236
    • formatio reticularis
Re: Raspberry pi lazarus compile problem
« Reply #3 on: December 04, 2014, 01:02:47 am »
Did you install Lazarus and fpc via sudo apt-get or did you compile the tools from source? Which Free Pascal version do you use?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 3.4.0 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Raspberry pi lazarus compile problem
« Reply #4 on: December 04, 2014, 06:57:22 pm »
I don't know what went wrong, but because of your "switching to external assembling" error you should probably install the binutils package.
Regards,
Paul Breneman
www.ControlPascal.com

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #5 on: December 08, 2014, 08:16:52 pm »
If I do sudo apt-get install binutils

I get the following message: binutils is already the newest version.

So I think this will not be a problem.

Can somebody still help me ?

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #6 on: December 08, 2014, 08:29:56 pm »
@jwdietrich

I installed the version from jesse lazarus and fpc version from here: http://forum.lazarus.freepascal.org/index.php/topic,20481.msg141721.html#msg141721 .

it is the Lazarus IDE v1.2.4 +dfsg-2+b1

Free pascall is version is I think this one
When I ask: dpkg-query -W -f='${Status} ${Version}\n' fpc
the following answer:
Install ok installed 2.6.4+dfsg-4+rpil

When I ask: dpkg-query -W -f='${Status} ${Version}\n' binutils
the following answer:
Install on Installed 2.24.90.20141023-1

When I ask: dpkg-query -W -f='${Status} ${Version}\n' lazarus
the following answer:
Install ok Installed 1.2.4+dfsg-2

So I hoop this will help.
« Last Edit: December 08, 2014, 08:45:23 pm by croc »

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Raspberry pi lazarus compile problem
« Reply #7 on: December 08, 2014, 08:47:52 pm »
A while back I had problems using FPC 2.6.4 on ARM Linux:
http://forum.lazarus.freepascal.org/index.php/topic,23927.msg148329.html#msg148329
Regards,
Paul Breneman
www.ControlPascal.com

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #8 on: December 08, 2014, 09:28:21 pm »
I am now removing the fpc 2.6.4 with the following command:
sudo apt-get purge fpc 2.6.4.
this will take a time.

Than I will use
sudo apt-get update
sudo apt-get upgrade
hope this will work
sudo apt-get install fpc 2.6.2

And check if this will help or do you don't this will work Paul Breneman?

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Raspberry pi lazarus compile problem
« Reply #9 on: December 08, 2014, 09:33:07 pm »
I would recommend not removing anything.  I was not using Lazarus in my project so I'm not sure how it would be affected.  Maybe someone who knows will jump in and let us both know?
Regards,
Paul Breneman
www.ControlPascal.com

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #10 on: December 08, 2014, 10:02:15 pm »
It looks like the raspberry pi install again the newest one after the command sudo apt-get install fpc 2.6.2.

is there way to resolve this to install only the 2.6.2 version ?

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #11 on: December 08, 2014, 10:05:13 pm »
Oke Paul.

I will wait than till it will be finished the install version 2.6.4 again.

Is it possible you have a image with the lazarus install the 1.2.4 version on raspberry pi for me ??

So I can already create some apps on it, till somebody will resolve this problem.
« Last Edit: December 08, 2014, 10:16:45 pm by croc »

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #12 on: December 09, 2014, 01:45:39 pm »
I see that I have some error in the package graph.

When I build IDE with: tools -> configure "build Lazarus".... -> 
LCL widget type = gtk (deprecated,
Target OS: = Linux,
Target CPU: arm
and only Clean up on = Automatically

and than build I get the following error:
Brokken dependency: One or more required packages were not found. See package graph for detials.

I get Package graph. see attachement

croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #13 on: December 11, 2014, 03:43:09 pm »
I have a working version now

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

don't forget to install sudo apt-get install fpc-source otherwise lazarus will complain source is missing.

# apt-get install subversion
# svn export http://svn.freepascal.org/svn/lazarus/trunk/components/leakview/leakview.lpk --revision 47172
# mv leakview.lpk /usr/lib/lazarus/1.2.4/components/leakview/
# svn export http://svn.freepascal.org/svn/lazarus/trunk/components/leakview/dbginforeader.pas --revision 47172
# mv dbginforeader.pas /usr/lib/lazarus/1.2.4/components/leakview/

Now Lazarus should work, but the IDE may complain about a broken ide/version.inc
In this case, just look at the title bar and edit /usr/lib/lazarus/1.2.4/ide/version.inc (I edited mine from '1.2.4+dfsg-1' to '1.2.4+dfsg-1+b1')
Restart Lazarus and everything should work!

The Raspberry Pi doesn't have enough memory to recompile the whole IDE, so you need to add a swap
Take an empty USB memory (at least 1GB) and insert it in the Raspberry Pi

$ df

Find which /dev it is (for me it was /dev/sda1)
WARNING: THIS WILL DELETE EVERY FILE ON YOUR USB MEMORY

$ sudo umount /dev/sda1
$ sudo mkswap /dev/sda1
$ sudo swapon /dev/sda1

Now you have a good amount of swap memory; you can check it with

$ cat /proc/swaps

Now start the IDE with root permissions

$ gksudo lazarus-ide

Uninstall package tachartfpvectorial 1.0 in lazarus when you see the IDE

for me this resolve the problem.

I still have package errors after uninstall when I try to rebuild the IDE maybe somebody can help me with this??

Till now this is better than nothing


croc

  • New Member
  • *
  • Posts: 16
Re: Raspberry pi lazarus compile problem
« Reply #14 on: December 11, 2014, 04:33:58 pm »
If you have enough space on your sd-card you can also use the space that is on the sd-card.

instead to add the usb stick sda1 you can also do this.

sudo nano /etc/dphys-swapfile
change the value
CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024

the following steps is needed
sudo swapoff -a
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
sudo swapon -a

you can check with sudo top command and next to KiB Swap: you will see the total swap space.


 

TinyPortal © 2005-2018