You are not logged in.
Pages: 1
Now SOA and mock/stub tests DO PASS with FPC!!!
See the generated TestSQL3FPCInterfaces.pas file which covers all corresponding interfaces used by TestSQL3.dpr regressiont tests.
https://github.com/synopse/mORMot/blob/ … rfaces.pas
To generate the file, e.g. for TestSQL3.dpr, could be done in one line of code:
ComputeFPCInterfacesUnit(
['..\CrossPlatform\templates','..\..\CrossPlatform\templates'],
'\..\..\SQlite3\TestSQL3FPCInterfaces.pas');
See http://synopse.info/fossil/info/856d7b670cc6b7
We found a good workaround with missing RTTI, by generating a dedicated unit from Delphi, which would be compiled with FPC to supply the expected RTTI.
http://synopse.info/fossil/info/9357b49fe2
and the corresponding commits
http://synopse.info/fossil/tkttimeline/9357b49fe2?y=ci
Only remaining issue is with dynamic array parameters: fpc\compiler\i386\cpupara.pas is not consistent with Delphi register convention.
I've made the tests on Windows, but I'm confident it won't be too much difficult to make them work under Linux.
Great news!
Offline
Gooood news !!!!
Offline
Great news, Arnaud.
Accordingly the dyn-array params... Maybe i'm wrong but this little christmas gift could be related: http://bugs.freepascal.org/view.php?id=27206
See the rttichanges.path patch.
Last edited by EgonHugeist (2015-01-09 22:23:57)
Offline
Good news Arnaud, I see the bright future of mORMot for FPC on Linux. The last time an EMBT sales representative asked me what would make me upgrade to the latest Delphi, I said Linux support for the non-GUI stuff might be interesting, now it seems that we almost have full support for FPC
Last edited by edwinsn (2015-01-10 09:33:15)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Maybe i'm wrong but this little christmas gift could be related: http://bugs.freepascal.org/view.php?id=27206
This patch is just about wrappers about dynamic arrays.
It add some low-level wrapper functions, for compatibility with Delphi.
In fact, you would find the same code already in SynCommons.pas.
And most of the logic of this "generic collection" feature in TDynArray / TDynArrayHashed.
But is won't help in our case.
The compiler was not patched to include the needed RTTI.
And our "dynamic array parameter" issue is not about RTTI, but about register calling convention which is not the same for FreePascal and Delphi.
Offline
I would like to inform you that:
Latest mORMot (12-01-2015) runs all tests on Windows, including interfaces, out-of-the-box, with CodeTyphon 5.2
All Greens on 15.360.078 tests under Windows 8.1 !!
Many thanks Arnaud !!!
Last edited by AOG (2015-01-12 12:51:25)
Offline
Some notes about cross-platform writing using Delphi and FPC.
First posted on https://plus.google.com/101151078020673 … X9FyKkgNSh
First link to read about FPC is http://wiki.freepascal.org/Multiplatfor … ming_Guide
1. About the compiler.
First of all, we stayed as much as possible to the pre-generic Delphi syntax. String types are not consistent, and FPC 3.1.1 UnicodeString is still not stable, but we use our own RawUTF8 type. New RTTI is not available in FPC, and we discovered than even some part of the "old" RTTI (like IInvokable method description, available since Delphi 6) is not yet available - bug fix is waiting since 3 months.
2. Architecture.
Even if some part of our code base has very tuned asm code (x86 or x64), we always maintain a "pure pascal" version. But we only support Intel/ARM little endian model.
3. CrossPlatform.
The FPC libraries are much more cross-platform than Delphi's. Most of the time, you could use POSIX compatibility to target almost all non-Windows systems. You have a lot of fp*() methods
4. Implementation.
We wrote some units in which we tried to put all the FPC/Architecture/Platform code. Higher level code never call the "Windows" unit directly.
5. IDE.
Lazarus is a great IDE, especially for debugging under Linux (gdb is less stable under Windows). In respect to Delphi remote debugging, Lazarus is just amazing for cross-platform process.
http://www.ipst-info.net/download/Linux … 10502.html
Offline
Pages: 1