You are not logged in.
Pages: 1
Our mORMot expects the interfaces to have RTTI for its methods, for SOA, MVC/MVVM and mock/stubs.
Sadly, FPC does not generate the RTTI available since Delphi 7!
The RTTI layout is well defined by
http://hallvards.blogspot.fr/2006/06/si … -rtti.html
http://hallvards.blogspot.fr/2006/08/ex … -rtti.html
This thread is for discussion about http://bugs.freepascal.org/view.php?id=26774
Offline
For anyone interested, here's another useful link http://synopse.info/fossil/info/9357b49fe2a
I tried to contact Michael but he didn't respond, I guess this will be the only solution around.
Offline
First of all: Happy NewYear !
May the mORMot be as strong as ever in 2015 !!
Now for serious business:
Would it be an idea for me to follow up on the FPC dev-list ?
( http://lists.freepascal.org/pipermail/f … 34808.html )
Perhaps it will speed-up things.
Offline
Yes - no news since November - last message thread is http://lists.freepascal.org/pipermail/f … 34824.html
Nothing happened at ncgrtti.pas level in the SVN thread since september...
I think I will implement the feature request workaround so that we would be able to generate interface information in Delphi, then compile it with FPC.
See http://synopse.info/fossil/tktview?name=9357b49fe2
Offline
We developed an application to manage queues of people needing care at a public hospital, for its various services, using mORMot framework and Delphi 7.
Last week we compiled the project done in Delphi 7 in a virtual machine with Xubuntu, FPC 3.1.1 and Lazarus 1.5. The compilation was successful and we have not encountered problems running the program until now. We had to make a small adjustment in the unit SynCrtSock.pas, class TCurlHTTP, function InternalSendRequest, as the GET method to obtain an array of records needs the parameters in the body and curl does not allow it unless the option coCustomRequest is used.
Congratulations on a great job. Regards
Offline
With pleasure:
procedure TCurlHTTP.InternalSendRequest(const aData: SockString);
begin // see [url]http://curl.haxx.se/libcurl/c/CURLOPT_CUSTOMREQUEST.html[/url]
// libcurl has dedicated options for GET,HEAD verbs
if (fIn.Method='') or (fIn.Method='GET') then begin
curl.easy_setopt(fHandle,coHTTPGet,1);
if (aData<>'') and (fIn.Method='GET') then begin // e.g. GET with body
curl.easy_setopt(fHandle,coCustomRequest,pointer(fIn.Method));
curl.easy_setopt(fHandle,coNoBody,0);
curl.easy_setopt(fHandle,coUpload,1);
fIn.Data := aData;
fIn.DataOffset := 0;
curl.easy_setopt(fHandle,coInFile,pointer(self));
curl.easy_setopt(fHandle,coReadFunction,@CurlReadData);
curl.easy_setopt(fHandle,coInFileSize,length(aData));
end;
end else
if fIn.Method='HEAD' then
curl.easy_setopt(fHandle,coNoBody,1) else begin
// handle other HTTP verbs
curl.easy_setopt(fHandle,coCustomRequest,pointer(fIn.Method));
if aData='' then begin // e.g. DELETE or LOCK
curl.easy_setopt(fHandle,coNoBody,1);
curl.easy_setopt(fHandle,coUpload,0);
end else begin // e.g. POST or PUT
curl.easy_setopt(fHandle,coNoBody,0);
curl.easy_setopt(fHandle,coUpload,1);
fIn.Data := aData;
fIn.DataOffset := 0;
curl.easy_setopt(fHandle,coInFile,pointer(self));
curl.easy_setopt(fHandle,coReadFunction,@CurlReadData);
curl.easy_setopt(fHandle,coInFileSize,length(aData));
end;
InternalAddHeader('Expect:'); // disable 'Expect: 100 Continue'
end;
curl.easy_setopt(fHandle,coWriteFunction,@CurlWriteRawByteString);
curl.easy_setopt(fHandle,coFile,@fOut.Data);
curl.easy_setopt(fHandle,coHeaderFunction,@CurlWriteRawByteString);
curl.easy_setopt(fHandle,coWriteHeader,@fOut.Header);
end;
Regards
Offline
Thanks for sharing!
Offline
A RTTI-flag is added into the FPC RTTI branch !
This allows for defines in the mORMot source !
FPC_HAS_EXTENDEDINTERFACERTTI
Offline
Does this mean that we can soon use the complete mormot framework without having to go to delphi for the rtti generation?
I've briefly tested with fully updated rtti branch fpcup on win64 and using the sample 30 but it gives me a runtime error on FillRow
Also have some failing tests.
Url to test log
and since this is my first post.
Thx for the work on making mormot avaliable to fpc.
Offline
mORMot is not yet completely Win64bit compatible with FPC.
For now, use 32bit FPC and mORMot.
It should work as expected !
Last edited by AOG (2015-10-18 20:29:16)
Offline
I would like to inform the mORMot users that I have successfully deployed a 64 bit mORMot ORM server with a MariaDB backend on an Amazon EC2 64 bit Arch Linux (free tier t2) instance !!
Everything runs as 64 bit (compiled with latest FPC). No lib32 trickery needed !!
And the speed of this very small t2 instance is very very good !!!! The save CPU cycles feature of Amazon is awfull. Network speed is incredible.
An AWS tier seems to be a very nice way of connection your mORMot with the world.
Offline
Dynamic linking ! For Linux servers, I normally use dynamic linking.
For (windows-) clients, I always use static.
With FPC on Windows, I am now using the trick to put a dll in a resoource, load it into memory at runtime, and use the dll from memory.
A bit of static, without the pain of static !
I need this trick when using mORMot clients that contact a MySQL (MariaDB) database directly: Amazon also offers an online RDBS service that works very well with mORMot.
Offline
FPC version 3.0.0 "Pestering Peacock" has been released!
Can someone confirm that FPC RTTI branch is included?
Offline
Fpcup now van apply a RTTI patch to get the RTTI needed for mORMot !
fpclazup.exe --fpcURL="trunk" --lazURL="trunk" --installdir="c:\fpctrunkrtti" --getfullrepo --fpcPATCH="fpcrtti.patch"
should give you a full featured FPC/Laz trunk combo capable of running the full mORMot !!
The patch should work on all FPC version >= 3.
Offline
Fpcup now van apply a RTTI patch to get the RTTI needed for mORMot !
fpclazup.exe --fpcURL="trunk" --lazURL="trunk" --installdir="c:\fpctrunkrtti" --getfullrepo --fpcPATCH="fpcrtti.patch"
should give you a full featured FPC/Laz trunk combo capable of running the full mORMot !!
The patch should work on all FPC version >= 3.
It is such a great news from you !
Is it possible to have a CodeTyphon distribution with RTTI out of the box ?
Offline
AFAIK, CT does not have extented interface RTTI.
Patching CT is not that easy. It has its own installer.
But you can ask CT boss Sternas on the CT forum.
Normally, he is very helpfull.
Offline
Fpcup now van apply a RTTI patch to get the RTTI needed for mORMot !
fpclazup.exe --fpcURL="trunk" --lazURL="trunk" --installdir="c:\fpctrunkrtti" --getfullrepo --fpcPATCH="fpcrtti.patch"
should give you a full featured FPC/Laz trunk combo capable of running the full mORMot !!
The patch should work on all FPC version >= 3.
I think it is preferable to use the --fpcURL=RTTI instead of --fpcURL="trunk" --fpcPATCH="fpcrtti.patch" ; in my test case the RTTI brunch produced less error than the trunk + patch.
the --getfullrepo can be discarded if you don't update your fpc/lazarus much and wanted to save some disk space.
I recommend using this:
fpclazup.exe --fpcURL=RTTI --lazURL=trunk --installdir="c:\fpctrunkrtti"
Last edited by shobits1 (2016-02-19 11:23:05)
Offline
Pages: 1