You are not logged in.
Pages: 1
Hello!
Just installed Lazarus 2.0.8 (win64) which comes with FPC 3.0.4.
Tried to compile sample "04 - HTTP Client-Server".
Can't compile with error: PFPCInterfaceData = TypInfo.PInterfaceData; (SynFPCTypInfo)
Found in documentation:
If you want to use the FPC trunk, please modify line #262 in Synopse.inc to enable the FPC_PROVIDE_ATTR_TABLE conditional and support the latest trunk RTTI changes.
{$if not defined(VER3_0) and not defined(VER3_2) and not defined(VER2)}
{$define FPC_PROVIDE_ATTR_TABLE} // to be defined since SVN 42356-42411
// on compilation error in SynFPCTypInfo, undefine the above conditional
// see https://lists.freepascal.org/pipermail/ … 00612.html
{$ifend}
It is undefined by default.
Unit "typinfo" In FPC 3.0.4, does not contain PInterfaceData (as well as PVmtMethodParam, PIntfMethodTable, PIntfMethodEntry).
So, does this mean, that latest mORMot 1.8 does not support box version of Lazarus and FPC?
As i see, FPC 3.0.4 is not new, and seems, should be supported, because mORMot supports all recent Delphi and FPC is main target for mORMot 2.0.
FPC trunk SVN 40491
Is it actual recommended version from 2018 year?
Can someone clarify?
Last edited by George (2020-04-22 14:51:39)
Offline
Please see this topic:
https://synopse.info/forum/viewtopic.php?id=5361
It seems safe to use FPC 3.2.
I'm using for some weeks and no problem so far.
Offline
Thanks, will try)
Offline
There are snapshots with with fpc 3.2 RC/fixes available here:
Lazarus 2.0.8 - FPC 3.2 RC/FIXES
I haven't tested myself because I'm already on trunk but maybe it's worth trying with them
Offline
Nice, now demo project pass build.
By the way, 2020-04 lazarus-2.0.8-fpc-3.2.0_fixes-44680 not works.
I can't run empty form project due error (don't work if Application.DoubleBuffered).
If i disable it, error appear in another module. I have many problems with empty project.
Suppose that issue comes from compiler itself.
Will test another version.
---
https://synopse.info/forum/viewtopic.ph … 695#p31695
FPC: "fixes3.2" and Lazarus: "fixes2.0" works.
Last edited by George (2020-04-23 21:55:15)
Offline
It may be a lot of bugs in Lazarus or just one bug with cardinal values in compiler.
Since 2.0.8 is stable version, more likely it was bug in compiler.
Offline
program test;
{$mode objfpc}
{$H+}
begin
// don't show empty heaptrc output
{$IF DECLARED(GlobalSkipIfNoLeaks)}
GlobalSkipIfNoLeaks := True;
{$ENDIF}
WriteLn('Hello, from lazarus!');
ReadLn;
end.
Release build, disabled debug.
Stock Lazarus 2.0.8 + FPC 3.0.4; cross to win32 = 31,0 KB (exe size)
Lazarus: "fixes2.0" + FPC "fixes3.2" (fpcupdeluxe); cross to win32 = 33,0 KB (exe size)
2 kb diff. What it could be?
Offline
I believe that these differences between versions are normal. And this difference is still small.
To find out what's more, you would have to compare the source code between the versions.
Offline
you would have to compare the source code between the versions.
If you mean ASM, then unfortunately, i have no enough practice to make decision that additional 2kb comes due compiler or LCL changes, and not comes from fpcupdeluxe.
Here is ASM for both files, in case someone can and would like to check)
test (onlinedisassembler)
test_fpcupdeluxe (onlinedisassembler)
Last edited by George (2020-04-24 16:41:08)
Offline
Just out of curiosity, why do you believe this difference was caused by fpcdeluxe (which is just an installer)?
It is absolutely normal, for me, to have a difference, as they are different versions of the compiler and Lazarus.
Or did I get it wrong and is it the same version of Lazarus + FPC?
Offline
Well, this message says that new compiler even better and produce smaller code.
Second point, while fpcupdeluxe works, which is awesome, it has "specific look" and does a lot operations that make some caution feeling, especially when use it first time.
I decided to try it in my DEV machine when found, that AB recommended this tool.
You may say, fpcupdeluxe is open source, 100% safe. It downloads sources on the fly and compile it.
So, it's just some portion of caution
About difference, 2kb is nothing.
Especially if compare sizes of .net applications (with all required deps).
Last edited by George (2020-04-24 17:58:43)
Offline
Got it.
But it is difficult to make this comparison because they are different versions of FPC and Lazarus.
If you believe that something has been added by fpcdeluxe "in background" the ideal would be to compile with the same version.
The difference should only be the setup with and without fpcdeluxe.
NOTE: If this test project is a console application, and you have not added the LCL as a dependency, I believe it is not using the LCL.
Offline
AFAIK FPC got a lot new optimizations which require more bytes (bigger opcode) in the binary but are faster on the CPU. It also know new extensions like AVX etc.
I doubt that fpcupdeluxe adds anything suspicious to your compiler but you still can use the makefiles and build FPC with that.
Offline
Pages: 1