Recent

Author Topic: Compiling in Linux for running on raspberry PI  (Read 5183 times)

macaruchi

  • New Member
  • *
  • Posts: 30
Compiling in Linux for running on raspberry PI
« on: August 02, 2013, 11:40:38 pm »
Hi!
I am developing an app to run on my Raspberry PI with Raspbian. I am use Debian in my dektop and my app is ready but when I compile this, copy to my Raspebrry doesnt works. I mean it executes but nothins happens.

I am newbie with Raspberry PI and I wanna know if there is any issue with this or the ugly solution, install Lazarus on PI and compile.

TIA
Edwin Jaws

Leledumbo

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Compiling in Linux for running on raspberry PI
« Reply #1 on: August 03, 2013, 12:30:35 am »
Raspberry is an ARM device, your desktop I believe x86 or its family. Of course the executable won't work. You have to either build the executable in Raspbian itself or cross compile from desktop Debian.

chrnobel

  • Sr. Member
  • ****
  • Posts: 273
Re: Compiling in Linux for running on raspberry PI
« Reply #2 on: August 05, 2013, 11:49:03 pm »
As Leledumbo says, you need to crosscompile or built on the Pi itself.

It is a little bit tricky to install the most recent version of Lazarus on the Pi (albeit if you can do with an older version, you can use the one that comes with the distro) as there are some problems with recompiling the IDE on the RPi, because 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.

macaruchi

  • New Member
  • *
  • Posts: 30
Re: Compiling in Linux for running on raspberry PI
« Reply #3 on: August 06, 2013, 11:51:44 pm »
Hi!
chrnobel, I used that guide to install FPC 2.7.1 and lazarus 1.1 and the tricks that you said about memory and swap memory and everything worked fine. Lazarus now is working fine.

My problem is when I tried to install zeosdbo to my lazarus I did that you said me without X

./lazbuild --build-ide=~/dir/zeos/package/lazarus/zcomponent.lpk 

I did this without X and 500mb of swap space but I get this error:

TExternalToolList.Run :Error: Illegal parameter:/home/pi/pascal/lazarus/zeos703/packages/lazarus/zcomponent.lpk
ERROR:tool reported error

Any cluees ?

macaruchi

  • New Member
  • *
  • Posts: 30
Re: Compiling in Linux for running on raspberry PI
« Reply #4 on: August 07, 2013, 05:35:13 pm »
Chrnobel, what version of ZeosDBO you installed and what version of Lazarus ?

Thks

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Compiling in Linux for running on raspberry PI
« Reply #5 on: August 07, 2013, 05:59:30 pm »
./lazbuild --build-ide=~/dir/zeos/package/lazarus/zcomponent.lpk 
This doesn't sound right - it needs a space like
Code: [Select]
./lazbuild --build-ide= ~/dir/zeos/package/lazarus/zcomponent.lpk 
See http://wiki.lazarus.freepascal.org/lazbuild
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

 

TinyPortal © 2005-2018