Recent

Author Topic: How to build Lazarus ?  (Read 933 times)

Borneq

  • Full Member
  • ***
  • Posts: 248
How to build Lazarus ?
« on: December 20, 2019, 03:36:06 pm »
Especially under Linux? Sources last from repository https://github.com/User4martin/lazarus or last release version. How to build with default settings and non-default (for example : including debug information)?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: How to build Lazarus ?
« Reply #1 on: December 20, 2019, 03:47:47 pm »
If you want to get svn versions, you can use fpcupdeluxe.

Otherwise it will be best, if you have fpc already installed (it takes a bit to build it yourself....)
For current Lazarus from svn, you need at least fpc 3.0.2 or maybe 3.0.0 (not sure), I doubt it will run with any version before 3.0. (but not tested)

If you do have an existing (and working) previous version of the Lazarus executable (not to old), then you can copy that into the new sources, and use build from the tools menu.

Otherwise

make bigide OPT="....."

where ..... can be any fpc argument: -O2 -gh -gl -gw -godwarfsets -Criot   and others.

Then start the IDE, add your packages (if needed) and rebuild.
Which weans, you can also do "make bigide" without options, and add the options when you rebuild from the IDE.

If you have the sources in your home dir (or writeable to your user) you do not need to do "make install". Just use the IDE from the build dir. That way you have all the sources in place.

https://wiki.lazarus.freepascal.org/Installing_Lazarus

---
If you have more than one build on your system:
https://wiki.lazarus.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file



JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4467
  • I like bugs.
Re: How to build Lazarus ?
« Reply #2 on: December 20, 2019, 04:09:56 pm »
If you want to get svn versions, you can use fpcupdeluxe.
You dont really need fpcupdeluxe for building native Lazarus. It is good for installing different versions of FPC and for cross-compilation etc.
Just install FPC from the distro's repos, then download Lazarus sources from Subversion server and build them.
The development packages for GTK2 must also be installed at this point.
So:
 $ cd
 $ svn co https://svn.freepascal.org/svn/lazarus/trunk/ lazarus_trunk
 $ cd lazarus_trunk
 $ make bigide
 $ ./lazarus &

Then you can install packages into Lazarus as you wish etc.
The 2.0 fixes branch can be got the same way. This method is recommended on Linux related to Debian if the provided .deb packages cause problems. They do not work in every version of every Debian derivative.
Using the svn gives an extra benefit: You get the latest bug fixes by typing "svn up".
Simple instructions:
 https://wiki.freepascal.org/Getting_Lazarus
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9857
  • Debugger - SynEdit - and more
    • wiki
Re: How to build Lazarus ?
« Reply #3 on: December 20, 2019, 04:16:41 pm »
$ svn co https://svn.freepascal.org/svn/lazarus/trunk/ lazarus_trunk

The  https://github.com/User4martin/lazarus - which he said he has - is a copy of the svn. So it works the same.

 

TinyPortal © 2005-2018