Lazarus IDE - Linux?

Discussion and questions about programming with Ultibo.
Steve_SJA
Posts: 1
Joined: Mon Apr 24, 2017 5:29 am

Lazarus IDE - Linux?

Postby Steve_SJA » Mon Apr 24, 2017 6:05 am

Hi All,

New to all of this. Don't use Windows.

Spent this morning downloading and compiling various software sources. I have arrived at a point where I believe everything is installed correctly according to the WiKi at:-

https://ultibo.org/wiki/Building_for_Debian

(BTW: The Github Free Pascal (Ultibo Edition) Makefile as downloaded today still contains REQUIREDVERSION=2.6.4, I had to change it to 3.1.1 before it would build as per the instructions above).

If I've got my head around this properly. After following these instructions you end up with a Free Pascal (Ultibo Edition) command line ARM cross-compiler and an unrelated native Linux Lazarus IDE v1.7

Question: What additional steps are now required so that you can use the Lazarus IDE to build Ultibo applications under Linux?
Gavinmc42
Posts: 852
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Lazarus IDE - Linux?

Postby Gavinmc42 » Mon Apr 24, 2017 10:25 am

Easiest way is use Wine with the Windows version, it works much better than previous releases which needed a little work.
Recently I copied the Windows install to a USB stick, nearly fell off my chair when I could just run this from the stick in Linux.

If you want to learn how to do it, follow the instructions, which may be out of date now?.
But if you just want to start coding, find a friendly Windows owner :P

To busy having fun with it to bother about install issues any more.
It runs fast enough under Wine for me on old Celeron which I updated to Duo :lol: .
Would be nice if there was Wine for Pi's.

Native Pi install? Pik33 has done it?
I'm moving my Pi OS from Raspbian to PiCore so quite a bit different.
Eventually Ultibo development on a PiCore Pi3? but I'm in no hurry when my current method works.

Discovered some interesting ways that might mean compiling remotely and updating remotely that may even work on Android.
Sort of local Cloud.
Currently playing with Zero's with USB gadget mode. May be able to get them working with no sdcard :o
Could be useful for A+ and compute modules too.
User avatar
Ultibo
Site Admin
Posts: 1279
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Lazarus IDE - Linux?

Postby Ultibo » Mon Apr 24, 2017 11:05 am

Hi Steve_SJA,

Steve_SJA wrote:Question: What additional steps are now required so that you can use the Lazarus IDE to build Ultibo applications under Linux?

I was going to point you to some of the other posts where this has been discussed, some people do have a working setup, but it is getting a little messy now with various incomplete sets of instructions so here is the quick and simple set of steps to compile Lazarus Ultibo edition on Linux.

This was tested on Debian but should be easily adaptable to others, there are also a number of posts for doing this on Raspbian (on the Pi itself).

Lazarus Ultibo edition 1.6 source unzipped or cloned to:

Code: Select all

$HOME/ultibo/core/lazarus

Rename the "Lazarus-master" folder to "lazarus" after extracting

Required dependancies

Code: Select all

sudo apt-get install libgtk2.0-dev libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev

Fix missing Package.fpc file in regexpr folder

Copy from: $HOME/ultibo/core/fpc/lib/fpc/3.1.1/units/i386-linux/rtl/Package.fpc
Copy to: $HOME/ultibo/core/fpc/lib/fpc/3.1.1/units/i386-linux/regexpr/Package.fpc

Edit the file and change the line name=rtl to name=regexpr

Update the Makefiles to support Linux target

Code: Select all

cd $HOME/ultibo/core/lazarus

export FPCDIR=$HOME/ultibo/core/fpc/lib/fpc/3.1.1

fpcmake -Ti386-linux -v

cd $HOME/ultibo/core/lazarus/ide

fpcmake -Ti386-linux -v

cd $HOME/ultibo/core/lazarus/components

fpcmake -Ti386-linux -v

cd $HOME/ultibo/core/lazarus/tools

fpcmake -Ti386-linux -v

Compile Lazarus Ultibo edition 1.6 using FPC 3.1.1

Code: Select all

cd $HOME/ultibo/core/lazarus

export PATH=$HOME/ultibo/core/fpc/bin:$PATH

make clean all OPT="@$HOME/ultibo/core/fpc/bin/fpc.cfg"

That should leave you with a working Lazarus.


Steve_SJA wrote:The Github Free Pascal (Ultibo Edition) Makefile as downloaded today still contains REQUIREDVERSION=2.6.4, I had to change it to 3.1.1 before it would build

Check carefully that you didn't miss any steps and have followed the instructions completely, we have done the build process quite a few times and have never needed to modify the Makefile for any reason.
Ultibo.org | Make the future
https://ultibo.org

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest