Forum > General

How to Build Laz IDE from GitLab Repo (Not Using fpcupdeluxe, DEBs, or tar.gz)?

(1/3) > >>

Aruna:
Hi all,

I'm interested in building the Lazarus IDE completely from source by cloning the official GitLab repository. I’m aware there are several other ways to install Lazarus:

    via .deb packages,
    downloading .zip or .tar.gz archives,
    or using fpcupdeluxe.

However, I specifically want to clone the GitLab source repositories for both Free Pascal (FPC) and Lazarus, and build everything manually from scratch — partly to better understand the internals and possibly contribute in the future.

Has anyone here done this recently? If so:

    What are the necessary steps involved?
    Any important prerequisites or potential gotchas to be aware of?
    Is it better to start by building FPC first, then Lazarus? (Since Lazarus depends on FPC?)
    Are there official build scripts or is it recommended to use make clean all?

Any guidance or links to up-to-date build instructions would be much appreciated. Thanks!

Best regards,
Aruna

MarkMLl:
Don't know whether you can see this, or if association with IRC has rotted your bits.

Looking at a system I set up a few weeks ago, I can see these two stages of package installation to allow me to build FPC and Lazarus in situ:


--- Code: ---1.3 -> 1.4, 2024/10/23 17:38:02
autoconf
automake
bison
build-essential
flex
gdb
gdbserver
libgpm-dev
libncurses5-dev
libncursesw5-dev
libpq-dev
libssl-dev
libtool
libusb-dev
subversion

1.4 -> 1.5, 2024/10/23 17:42:03
libasound2-dev
libcap-dev
libffi-dev
libglib2.0-dev
libgtk2.0-dev
libhidapi-dev
libi2c-dev
libicu-dev
libjpeg-dev
libqt5pas-dev
pkg-config
spi-tools

--- End code ---

The important manual ones are curses and GPM for FPC, with libpq-dev, libssl-dev, libusb-dev being needed plus of course libgtk2.0-dev for Lazarus. In fact of those latter you really only /need/ libgtk2.0-dev, but having the others sets up some important symlinks.

You can do a basic build by putting the Lazarus IDE etc. sources in a directory under your full control, then applying  make all  . Once you are certain that works, do something like


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---$ make clean distclean bigide 
However I urge you to start off with the stable version, not trunk which is WIP.

One general issue there is that it won't build IDE-extension packages: in order to get those you have to either rebuild from the IDE itself, or use lazbuild which is a bit arcane. See thread at https://forum.lazarus.freepascal.org/index.php/topic,67244.msg517062.html#msg517062 plus the cited links.

HTH

MarkMLl

paweld:
@rvk has provided his script that installs lazarus and fpc from sources, review the comments in the script and his posts in this thread: https://forum.lazarus.freepascal.org/index.php/topic,68845.msg540271.html#msg540271
some info on wiki: https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_Source and https://wiki.freepascal.org/Installing_the_Free_Pascal_Compiler#Compiling_the_FPC_source,_using_just_downloaded_FPC_3.2.2

Aruna:

--- Quote from: MarkMLl on March 13, 2025, 01:54:31 pm ---Don't know whether you can see this, or if association with IRC has rotted your bits.

--- End quote ---
I can see it loud and clear, no comment on the latter second part. We do live in a free world, and everyone’s entitled to make their own choices... within the boundaries of sanity, of course. That said, I must admit I’m slightly miffed, sir. I believe I’ve sent you several PMs, and—radio silence. Not even a “seen.” What gives? I thought we were friends. Anyways fpc compiled+linked and built fine. Lazarus on the other hand when I ran make all choked on me with this which I am yet trying to understand. "You' may see what I may have missed.   

So this is what I did so far:
- cloned fpc repo
- cloned lazarus repo
- cd into fpc sources and ran make all (This went well)
-cd back into lazarus and ran make all and below you see what is giving me serious headaches.


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---aruna@debian:~/keelazide/lazarus$ make allmake -C packager/registrationmake[1]: Entering directory '/home/aruna/keelazide/lazarus/packager/registration'/usr/bin/rm -f ../units/x86_64-linux/fcllaz.ppu/usr/bin/ppcx64 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -Fu/usr/local/lib/fpc/3.2.2/units/x86_64-linux/rtl -FE. -FU../units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-linux-gnu/10 -dx86_64 fcllaz.pasHint: (11030) Start of reading config file /etc/fpc.cfgHint: (11031) End of reading config file /etc/fpc.cfgFree Pascal Compiler version 3.2.2 [2021/07/09] for x86_64Copyright (c) 1993-2021 by Florian Klaempfl and others(1002) Target OS: Linux for x86-64(3104) Compiling fcllaz.pas(10001) PPU Loading /usr/lib/fpc/3.2.2/units/x86_64-linux/fcl-db/db.ppu(10011) PPU Source: db.pas not available(10011) PPU Source: dataset.inc not available(10011) PPU Source: fields.inc not available(10011) PPU Source: datasource.inc not available(10011) PPU Source: database.inc not available(10011) PPU Source: dsparams.inc not available(10028) Recompiling DB, checksum changed for /usr/local/lib/fpc/3.2.2/units/x86_64-linux/rtl/classes.ppu/home/aruna/keelazide/lazarus/packager/registration/fcllaz.pas(11,3) Fatal: (10022) Can't find unit DB used by fcllazFatal: (1018) Compilation abortedmake[1]: *** [Makefile:3471: fcllaz.ppu] Error 1make[1]: Leaving directory '/home/aruna/keelazide/lazarus/packager/registration'make: *** [Makefile:3112: registration] Error 2aruna@debian:~/keelazide/lazarus$   Just to be difficult since you concurred my bits have rotted due to association with IRC that sadly is not possible since HIV tried and failed miserably, so HA!

Aruna:

--- Quote from: paweld on March 13, 2025, 02:02:33 pm ---@rvk has provided his script that installs lazarus and fpc from sources, review the comments in the script and his posts in this thread: https://forum.lazarus.freepascal.org/index.php/topic,68845.msg540271.html#msg540271
some info on wiki: https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_from_Source and https://wiki.freepascal.org/Installing_the_Free_Pascal_Compiler#Compiling_the_FPC_source,_using_just_downloaded_FPC_3.2.2

--- End quote ---
@paweld thank you very much I will go through it carefully.

Navigation

[0] Message Index

[#] Next page

Go to full version