Installation => Linux => Topic started by: DL on November 18, 2020, 09:38:04 pm

Title: Installing FPC on RedHat EL 7.9
Post by: DL on November 18, 2020, 09:38:04 pm
Hi All, I could really use some help getting fpc installed on a RHEL 7.9 workstation. I'm comfortable running basic Linux commands and using the package manager for most installs, but this one is a bit beyond me.

First, I can't find Lazarus or fpc within RedHat's yum manager, but I imagine it's just not there? No problem yet.

I went ahead and downloaded both the fpc 3.2.0 rpm and src.rpm from here:

If I try and install the rpm directly using the rpm shell command, I get an error:

> error: Failed dependencies:
>         rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by fpc-3.2.0-1.x86_64

I've looked around some and it seems like this is a compatibility issue with RedHat 7 and how the rpm was made? Something about using xz instead of zstd for package compression?

I installed zstd but that didn't make a difference.

I loosely followed some of the instructions I found online to install mock using dnf. I then tried using mock to install the fpc rpm. A lot of fun stuff happened while it downloaded some dependencies (I think), but then it failed with a similar message.

I tried installing using the src.rpm. I was able to properly extract it using rpmbuild into its two main folders, SOURCES and SPECS. If I try to build using rpmbuild and the spec file, I get:

error: Failed build dependencies:
        fpc is needed by fpc-3.2.0-1.x86_64

At this point I'm way out of my depth so any advice would be helpful. Hopefully I'm just stupid and there's a simple thing I'm missing! Thanks.

Title: Re: Installing FPC on RedHat EL 7.9
Post by: Bart on November 18, 2020, 10:40:30 pm
You can download the fpc as a tar file that contains an installscript.
Your package manager however will then not be aware of the installation of fpc.

After that download the sources for fpc and the sources for Lazarus (the latter is easiest via svn), best in some subfolder of you home directory.
Then manually build Lazarus.

The advantage of this is that you Lazarus is local to you.
The disadvantage is that you will have to install some devel packages before you can actually build Lazarus, otherwise the linking will fail.
You need devel packages for libc, glibc, gtk2, gdk-pixbuf, cairo and some more.
Installing gcc might take care of some of those.
Also you need binutils installed (make etc.)

I only ever once installed fpc/Lazarus via my packamanager (on Suse 10.0), after that I changed to the above mentioned way of getting the compiler and Lazarus.

Finding out what devel packages you need is the hard part.
However, if linking fails due to a missing lib, it will mention what lib this is (and nee then need the devel package for that).

Title: Re: Installing FPC on RedHat EL 7.9
Post by: DL on November 18, 2020, 11:18:17 pm
Thanks, I think I should be able to handle that. I'll give it a shot once I have some free time and will report back.
Title: Re: Installing FPC on RedHat EL 7.9
Post by: dbannon on November 19, 2020, 12:27:00 am

Quite important that you consider installing FPC (and src) as a distinct operation from installing Lazarus

I believe that the only dependencies you need are - binutils, make, gcc. If you find that is not the case, please report !

Then, only after you have confirmed a working FPC, install Lazarus
Now you will need either GTK2 or Qt5, please read the note on that wiki page about dependencies. Most important !

And let us know if it does not work please !


Title: Re: Installing FPC on RedHat EL 7.9
Post by: Zvoni on November 19, 2020, 08:23:12 am
Or you go the "easy" way and use fpcupdeluxe

EDIT: Err....yes...forgot...fpcupdeluxe doesn't solve dependencies, so what the others said is still true
TinyPortal © 2005-2018