Difference between revisions of "Installing Lazarus on FreeBSD"

From Free Pascal wiki
Jump to navigationJump to search
m (→‎via the Ports tree: Updated Lazarus revision)
m (→‎via the Lazarus repository: minor tweak for gmake)
Line 48: Line 48:
 
==via the Lazarus repository==
 
==via the Lazarus repository==
  
This option will often be used if you want to follow Lazarus trunk, a Fixes branch, or some other release (eg compiling from a source tarball).
+
This option will often be used if you want to follow Lazarus trunk, a fixes branch, or some other release (eg compiling from a source tarball).
  
 
* Use the SubVersion or Git repositories to checkout a copy of the source code you want, or unpack a downloaded source archive into a suitable location. Recent versions of FreeBSD include the '''svn''' command as '''svnlite''', so you do not need to install full Subversion package to checkout a copy of the source code.
 
* Use the SubVersion or Git repositories to checkout a copy of the source code you want, or unpack a downloaded source archive into a suitable location. Recent versions of FreeBSD include the '''svn''' command as '''svnlite''', so you do not need to install full Subversion package to checkout a copy of the source code.
  
* The readme.txt file in Lazarus directory mentions '''make clean all'''. This only works if you are using Linux. Under FreeBSD you need to replace '''make''' with '''gmake'''.
+
* The readme.txt file in Lazarus directory mentions '''make clean all'''. This only works if you are using Linux. Under FreeBSD you need to replace '''make''' with '''gmake''' and ensure that you have also installed the GNU gmake from ports.
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">

Revision as of 09:28, 1 July 2020

English (en)

Installing Lazarus on FreeBSD

The following applies to FreeBSD 11.x, 12.x and maybe 13.x only. Earlier FreeBSD versions are end-of-life and not supported.

via the Ports tree

The latest version of Lazarus available in the FreeBSD ports tree is v2.0.8. We can use that to install Lazarus (GTK2 or QT5).

# cd /usr/ports/editors/lazarus && make install clean

or

# cd /usr/ports/editors/lazarus-qt5 && make install clean

Installing FPC sources

# cd /usr/ports/lang/fpc-source && make install clean

via the pkg system

# pkg install editors/lazarus

or

# pkg install editors/lazarus-qt5

Lazarus will install Free Pascal source files. If you don't have them:

# pkg install lang/fpc-source


If you start Lazarus IDE at this point by typing lazarus you will get a dialog which needs you to input the directory in which the Free Pascal sources are located. Set it to /usr/local/share/fpc-source-3.0.4

via the Lazarus repository

This option will often be used if you want to follow Lazarus trunk, a fixes branch, or some other release (eg compiling from a source tarball).

  • Use the SubVersion or Git repositories to checkout a copy of the source code you want, or unpack a downloaded source archive into a suitable location. Recent versions of FreeBSD include the svn command as svnlite, so you do not need to install full Subversion package to checkout a copy of the source code.
  • The readme.txt file in Lazarus directory mentions make clean all. This only works if you are using Linux. Under FreeBSD you need to replace make with gmake and ensure that you have also installed the GNU gmake from ports.
  cd /path/to/lazarus_source
  gmake clean all

Installation troubleshooting

Troubleshooting details that should (hopefully) be applicable across platforms may be found in the article Installation Troubleshooting.

Some additional notes for FreeBSD installations can be found in the article FreeBSD.