Computing: Free Pascal Programming

Installing Lazarus/Free Pascal on Solus.

Solus is a Linux distribution built from scratch. This tutorial shows, how to install Lazarus/Free Pascal on Solus 4.3 Fortitude, using the GUI-based Software Center. I suppose, that the installation procedure, described here, will also work with newer, and probably also some older versions. Not to exclude, that by using the command line tool eopkg, you could avoid the various problems, I encountered when trying to build a sample GUI application.
Open the Software Center and in the left pane, choose Search. In the search bar, type "lazarus" and hit the Search button. As you can see on the screenshot, the Lazarus package available for Solus 4.3 is lazarus-2.0.12.
Lazarus/FPC on Solus: Searching for the Lazarus package in Software Center
Click the arrow at the right of the package to open the Lazarus details window. Click the blue Install button at the top-right corner of the window. A list with the dependencies is displayed. As on the main screen, click the Install button to start the packages download and installation.
Lazarus/FPC on Solus: Selecting the Lazarus package and its dependencies
I did not find Lazarus in the "Start menu". Maybe, it would have been there if I had rebooted the machine after installation has been done (?). Anyway, you can launch the IDE from within a terminal, by typing the command:
As for Lazarus on other platforms, the Configure Lazarus IDE window pops up. As you can see on the screenshot, all components (IDE, compiler, sources, make and debugger) have been found.
Lazarus/FPC on Solus: First start with all ok 'Configure Lazarus IDE' window
Trying to build my "BlackJack" GUI application, the build failed with several error and warning messages. First, the messages that crtbeginS.o and crtendS.o are not found. As the linkage of my "BlackJack" application succeeded on PCLinux OS despite these warnings, I think that these issues are very probably not responsible for the failure (but, as on PCLinux OS, we should, of course, try to resolve them). I would say, that the linkage failure is due to the problem reported as error: Util ld not found.
Lazarus/FPC on Solus: Build failure due to linkage errors
I first tried to solve the warnings issues the same way, as described in my Installing Lazarus/FPC on PCLinux OS. The path setting to gcclib in the FPC configuration file (located at /usr/share/defaults/fpc on Solus) is obviously not accurate, as this directory does not exist. However, the problem isn't a bad path setting, but it's due to the fact that gcc isn't installed on Solus! Knowing that the GNU development tools package is called system.devel, you can install it in a terminal by typing:
    sudo eopkg install -c system.devel
After this has been done, the warnings concerning crtbeginS.o and crtendS.o disappeared. As expected, the linkage of my application still failed.
Not sure what I'd have to do, I installed the qt5pas-devel, that was listed when I searched for "lazarus" in Software Center. This didn't change anything, and I think that it's probably not necessary to install it.
Searching the forums, I finally found the reason for the linkage failure: the development files for libgtk-2 aren't installed on Solus! The package is called libgtk-2-devel and can be installed with its dependencies from within Software Center.
Lazarus/FPC on Solus: Installing the development files for libgtk-2
After installation had been done, I retried the build of my "BlackJack" application. Success. And running the created executable: Also OK!

If you find this text helpful, please, support me and this website by signing my guestbook.