@Marcov,
FPC needs build-essential installed on Linux, if only to resolve crtbegin/end and the tools (make, ld, as, all of which are not default)
That is not installed by default on many user friendly distro's, but most development machines need that, not only FPC.
For FPC you only need everything that is in the fp-compiler package (will install ONLY the compiler, no packages) in Debian and that will install build-essential too. I don't know if it works the same on non-Debian derived Linux systems.
FPC itself is quite easy to do on Linux, provided the above. There is only one fpc.cfg and that can be included as a resource and read from memory. You can even skip that if you accept you have to create longer compile command lines.
Otherwise FPC only need libraries you actually use, like openssl etc. including their -dev packages.
Lazarus in Linux is a completely different story and much more difficult to pack as a portable app.
(Would require X - which is contrary to common belief not a requirement - , GTK2,3,4,5, Qt3,4,5,6 just to support the most common GUI frameworks in the same distro, which makes it huge)
I would go for a docker solution, and that already exists.