Installing Free Pascal et Lazarus on Linux with FPCUPdeluxe
October 30, 2018
<-Installing Ubuntu 18.04.1 (in French) Installing Ubuntu 18.04.1, aditions and adjustements (in French)->
<-Updating Free Pascal and Lazarus with fpcupdeluxe on Ubuntu 17.10

Back in February, I updated an installation of the Free Pascal compiler and the Lazarus IDE using with the codebot script from getlazarus running on Ubuntu 17.10. In August, I installed the same programming environment but this time with the FPCUPdeluxe utility after upgrading Ubuntu to version 18.04. And yesterday, it is the most recent versions of Free Pascal and Lazarus that I added to a laptop whose operating system is Mint 19. As the later is almost identical to Ubuntu 18.04, the procedure described below is the same.

On the first attempt at using FPCUPdeluxe I made an error that necessitated a complete reinstallation of the freshly installed Ubuntu 18.04 operating system. If you want to see what not to do, you can read the initial version of this post.

Table of Content

  1. Obtaining FPCUPdeluxe
  2. Requirements
  3. Installing Free Pascal and Lazarus

Obtaining PFCUPdeluxe toc

Free Pascal and the Lazarus IDE are not available in the Ubuntu Software application, but version 3.0.4 of the compiler and version 1.8.2 of the IDE can be installed with synaptic (or apt-get). However, these are not the most recent versions. Currently, version 3.3.1 of the compiler and 2.1.0 of the IDE are available. Traditionally, the latest version of some open software not available from the software store is installed by compiling the source code. This is somewhat more complicted here, because much of what we want is written in Free Pascal.

I have installed everything from the source in the past, and it was not easy. I prefer to rely on a utility like FPCUPdeluxe. Its executable is obtained from the repository There are several versions, you must make sure to get the latest that is compatible with the operating system. Consequently, I downloaded version v1.6.2e of fpcupdeluxe-x86_64-linux yesterday.

The downloaded binary file is not marked as executable. This can easily be done by right-clicking on the utility name in Files to display its Properties. The check the option the Allow executing file as program option in the Permissions tab. It can also be done with the command chmod in a terminal.

michel@hp:~/Téléchargements/Lazarus$ chmod +x fpcupdeluxe-x86_64-linux

Requirements toc

When I pressed the Trunk button in the FPCUPdeluxe utility to get the latest versions of the compiler and IDE, the following error message was displayed.

fpcupdeluxe: info: 30-10-18 10:29:22: fpcupdeluxe: V064 (20181021) started. fpcupdeluxe: ERROR: Missing library: fpcupdeluxe: ERROR: fpcupdeluxe: ERROR: fpcupdeluxe: ERROR: fpcupdeluxe: ERROR: fpcupdeluxe: WARNING: You need to install at least libx11-dev libgtk2.0-dev libcairo2-dev libpango1.0-dev libxtst-dev libgdk-pixbuf2.0-dev libatk1.0-dev libghc-x11-dev to build Lazarus !! fpcupdeluxe: WARNING: Make, binutils, subversion/svn [and gdb] are also required !! fpcupdeluxe: info: FPCNativeInstaller (CleanModule: FPC): No FPC source [yet] ... nothing to be done fpcupdeluxe: info: make is not a valid make application (make result code was: -1)

Following the suggestion, I installed all the libraries plus an additional one needed for the bgrabitmap package that I want to include in the IDE.

michel@hp:~$ sudo apt-get install libx11-dev libgtk2.0-dev libcairo2-dev \ > libpango1.0-dev libxtst-dev libgdk-pixbuf2.0-dev libatk1.0-dev \ > libghc-x11-dev libgl1-mesa-dev

I also added the three main version control programs even if the utility said it only needed Subversion.

michel@hp:~$ sudo apt-get install git mercurial subversion

As far as Make is concerned, I verified that it was missing, and that installing build-essential was required. On the other hand, the principal tools in Binutils, ld and as, as well as the GNU Project Debugger.

michel@hp:~$ which ld /usr/bin/ld michel@hp:~$ which as /usr/bin/as michel@hp:~$ which gdb /usr/bin/gdb michel@hp:~$ sudo apt-get install build-essential

The web page of the repository contains details about the utilitity's prequisites.

Installer Free Pascal et Lazarus toc

After installing the requirements, all that needed to be done was to click on the Trunk button and to wait as the utility suggest, because it takes a considerable amount of time to compile the compiler Free Pascal and the Lazarus IDE. Luckily, everything worked correctly.

When first started, the Lazarus IDE is displayed in classic fashion: with numerous independant windows.

Lazarus IDE with multiple independant windows

I do not like dealing with a phletora of windows, so I added the anchordocking package with fpcupdeluxe.

Adding component with FCPUPdeluxe

The image shown below shows the appearance of the IDE after installing the component and modifying a few options. The form editor is behind the code editor. The tabs at the bottom of the editors are used to select one of them.

Lazarus IDE with single docked window

In a similar fashion, I installed other packages such as bgrabitmap, dcpcrypt, Synapse et virtualtreeview.

<-Installing Ubuntu 18.04.1 (in French) Installing Ubuntu 18.04.1, aditions and adjustements (in French)->
<-Updating Free Pascal and Lazarus with fpcupdeluxe on Ubuntu 17.10