You are not logged in.
Pages: 1
To use mORMot on Linux, do I have to use FPC?
What is the best option on Linux, Delphi, or FPC?
Offline
Currently, we only support FPC. Which is therefore the best option.
The main reason is that it works perfectly, and gives pretty good performance and stability.
This is my main development platform these last years: FPC + Lazarus on Debian. And it gives the best optimization attention, because it is what we use for high-demanding servers.
The subsidiary reason is that we don't have any Delphi Linux license, so we can't make any testing.
It may be more easily feasible with mORMot 2 than with mORMot 1, by the way. Almost only mormot.core.os.pas and mormot.net.sockets.posix.inc have specific OS code.
But anyone is welcome providing patches and pull request on GitHub!
Offline
Thank you. Will take you advice
So there will be no problem to run mORMot on Kali linux ( since it is a variant of Debian)?
Offline
Thank you @ab
Forgive my ignorance. Is FPC based on LLVM (or gcc), or it is by itself? Since it is your favorite, I guess performance wise, it would generate better optimized binary code than Delphi?
Offline
No, FPC is his own full stack compiler.
It can use LLVM https://wiki.freepascal.org/LLVM but it is not the natural way of using it. See the FAQ of this link.
The FPC 3.2 code is generally in pairs with Delphi code, sometimes slower, sometimes faster (e.g. it features branchless cmov operations, or div per mul reciprocal, or has less buggy inlining).
In practice, we optimize the mORMot 2 source code for FPC + Linux X86_64. The mORMot 1 version was somehow more optimized for Delphi 32-bit.
Offline
It seems FPC when using LLVM, would give faster code in some cases. Would you recommend (or against?) using FPC/LLVM for mORMot on Linux x86-64?
Offline
Thank you @ab again for the advice. I installed Lazarus on Windows and on Kali Linux, with the docked layout enabled. It looks quite similar to Delphi, and very neat.
I am surprised and impressed that Lazarus/FPC has progressed this good. It is great to be able to directly build applications inside Linux.
Thanks again! Go mORMot~
Offline
Tip: ensure you use fpdebug +gdb as debugger in Lazarus.
It is much more stable and responsive, especially on Windows, but also on Linux. It requires Dwarf 3 debug info format.
It will be the default debugger for the upcoming Lazarus 2.2 - see https://forum.lazarus.freepascal.org/in … 021.0.html
Offline
Offline
I guess with the new Lazarus, FpDebug is not shown as "+gdb" but it is using it behind the scene IIRC.
So don't worry, you have the right debugger if you select fpdebugg in the list.
Offline
FpDebug does not use gdb, it is a dwarf debugger written in pascal.
See https://wiki.freepascal.org/FpDebug for more info.
In any case, it is currently the best debugger backend for Lazarus (it works the best for me that is).
Last edited by trx (2021-11-16 12:18:12)
Offline
@trx
You are right: I was using an old version of FpDebug which still used gdb.
https://wiki.freepascal.org/LazDebuggerFp is much more stable.
Offline
Pages: 1