You are not logged in.
I'm using Ubuntu on the WSL and I'm trying to compile a Free Pascal project to 64-bit Linux using mORMot. I am using FPC version 3.0.4. I cloned the latest mORMot code from the GitHub repository.
As soon as I include the unit SynCommons, I get the following error:
SynFPCLinux.pas(288,69) Error: Identifier not found "PUTF8Char"
Indeed, the type PUTF8Char is defined in SynCommons itself, which is not referenced by SynFPCLinux. At first, I thought this would cause a circular reference, but since SynCommons is only referencing SynFPCLinux in the uses-clause for the implementation section. Tentatively, I made a change to SynFPCLinux so that SynCommons is included in the uses-clause for the interface. This allowed compilation to resume, but then I faced the following errors:
SynFPCTypInfo.pas(95,31) Error: Identifier not found "PInterfaceData"
SynFPCTypInfo.pas(95,45) Error: Error in type definition
SynFPCTypInfo.pas(96,32) Error: Identifier not found "PVmtMethodParam"
SynFPCTypInfo.pas(96,47) Error: Error in type definition
SynFPCTypInfo.pas(97,33) Error: Identifier not found "PIntfMethodTable"
SynFPCTypInfo.pas(97,49) Error: Error in type definition
SynFPCTypInfo.pas(98,33) Error: Identifier not found "PIntfMethodEntry"
SynFPCTypInfo.pas(98,49) Error: Error in type definition
These missing types are pulled from the TypInfo unit; however, looking at typinfo.pp, not one of these types are defined there.
I must be doing something wrong. What am I missing? Has anyone here successfully compiled mORMot for Linux using Free Pascal?
Offline
The problem is that we officially test and recommend FPC 3.2+ only.
PUtf8Char is not defined in FPC 3.0.4 system RTL unit, I have replaced it with PAnsiCHar.
For the RTTI, as you have stated, those definitions are missing in FPC 3.0.4.
So current revision of mORMot 1 is not FPC 3.0.4 compatible.
Anyway, consider using FPC 3.2 and mORMot 2, for any new project, especially on 64-bit Linux.
It has much better performance and long-standing maintainability.
Offline
I didn't realize how old my FPC version is. I will upgrade to 3.2 and try again. Thanks!
Offline