My apologies for any wasted time or other problems caused by this error on my part.
Back in February, I updated an installation of the Free Pascal compiler and the Lazarus IDE done with the codebot script from getlazarus running on Ubuntu 17.10. Lately, I installed Free Pascal / Lazarus from scratch with the fpcupdeluxe tool. It was a bit more complicated to install instead of updating with that package as explained below.
Things went horribly wrong and I ended up destroying Ubuntu and I had a devil of a time in reinstalling version 18.04 which I discussed in the updated French language post Installing Ubuntu 18.04.1. I want to stress here that the problems had nothing to do with fpcupdeluxe and Free Pascal / Lazarus. Somehow, I screwed things up trying to ascertain which OpenGL library needed to be installed.
Table of Contents
- Lazarus Installer: fpcedeluxe
- Lazarus IDE Layout
- Open GL Library
- Cross Compilers
When I updated to Ubuntu 17.10, back in
November of last year, I reinstalled
Free Pascal and Lazarus
fpcupdeluxe code obtained from the
github repository. However when it was time to install
Free Pascal and Lazarus on
a fresh copy of Ubuntu 18.04.1, I had to use a
compiled binary fpcupdeluxe-x86_64-linux
(version v1.6.1g). As a bug fix will soon be available, check for the
My first attempt at using the application failed because of missing libraries. I installed those suggested by the application.
That was quite a large addition, but it was not complete as will be seen. I then proceeded to install FPC and Lazarus where I wanted it. Beside changing the installation directory (click on the Set InstallDir button), the only other thing I did was to press on the Trunk button as shown on the image below.
That successfully installed the Free Pascal compiler (version 3.1.1) and
the Lazarus IDE (version 1.9.0). The only other change that I did was to copy
.desktop file which was created on my desktop to the local
Bureau depends on the locale of the system and
en-XX locales. I then clicked
on the Apps button at the bottom of the laucher and searched for "Lazarus".
The actual name will be "Lazarus_dir" where dir is the
directory in which Lazarus was installed. I clicked on the icon with the
right mouse button and then on the
Add to Favorites option. That
way, the Lazarus IDE can be started by clicking on the icon in the launcher.
When started, the IDE displayed everything in the classic way: in separate windows.
I do not particularly like this layout, so I used
fpcupdeluxe to add the
The image below shows the appearance of the IDE after installing that component and some modification of the options. The form editor is behind the code editor. Tabs at the bottom of these editort are used to select them.
I also wanted to install
in the same way (this must be done one module at a time). However
bgrabitmap would not install. Indeed, after that I could not get
Lazarus to rebuild the IDE (menu:
Tools/Build Lazarus with Profile: Normal IDE).
After looking at the
Install/Uninstall Packages (menu:
and realized that the
lazopenglcontext package was marked
for installation but was not installed. Clearly there was a problem with
fpcupdeluxe output window was showing
that the GL library could not be found when linking.
It is reported in a number of posts in Lazarus
forum, that the
libgl-dev library had to be installed. Actually,
that rang a bell, but the library is no longer available in
Looking about the Web, I found a reference (which I can no longer find)
suggesting that the
libgl1-mesa-dev library would work. Indeed,
Synaptic suggest just as much. So I installed that
I was able to compile and install the
Once that was done, the OpenGL package could be
installed and the OpenGL tab with the
TOpenGLControl component was added to the components palette. It
was also possible to install the
bgrabitmap module with
Trying to find the missing reference mentionned in the above, I found
a askubuntu forum topic,
/usr/bin/x86_64-linux-gnu-ld: cannot find -lGL,
which suggested that the installation of the
libgl1 package would
have been sufficient. Accordingly, I removed
libgl1 using Synaptic.
It was possible to recompile the Lazarus IDE.
Then I tried to cleanup the distribution with the
sudo apt autoremove command.
ALL THIS WAS A BIG MISTAKE!
This completely broke the fresh Ubuntu 18.04.1 installation. I was not able to recover and had to delete the OS and install everything once again.
libgl1-mesa-dev the second time around,
I checked and found that
libgl1 package was already installed
by default in the distribution (or else got installed along with
another package). So
libgl1 was not sufficient to
install the OpenGL context package and
libgl1-mesa-dev was needed.
As I mentioned above, the
fpcupdeluxe utility can also be
used to add cross-compilation toolchains. It is a simple matter of choosing
the target CPU and operating system and then clicking on the Install cross-compiler button.
The first time around, I managed to install the cross-compiler to 64 bit
CPU = x8664, OS = Windows) without problems and did
compile an (
exe) executable and did test it.
Linux (GTK2) application
Windows 10 application
Installing the Darwin (MacOS) cross-compiler proved too daunting.
Cross-compilers were not installed the second time around. Since I have a dual boot system, I really should get on with cleaning up my Windows 10 partition and then the latest Free Pascal / Lazarus should be added.