You are not logged in.
Pages: 1
Hi,
I am writing a mORMot Server under FPC (Lazarus). This one must be executed in console mode only. But I have the RTTI error.
I also read that : http://synopse.info/forum/viewtopic.php?id=2279 but I don't know if I can use RTTI for my server.
I need some councils.
Thank you in advance
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
You should enjoy RTFM and generate a .pas source code file containing the needed RTTI for IIDAPSignaling.
See http://synopse.info/files/html/Synopse% … #TITLE_593
I hope the "interface RTTI" branch would reach soon the main FPC trunk.
In this branch, there is already the needed RTTI for x86/x64 and ARM32...
Offline
You should enjoy RTFM and generate a .pas source code file containing the needed RTTI for IIDAPSignaling.
See http://synopse.info/files/html/Synopse% … #TITLE_593
I hope the "interface RTTI" branch would reach soon the main FPC trunk.
In this branch, there is already the needed RTTI for x86/x64 and ARM32...
I read this part of the doc too.
But I only need to write this :
SQLite3ConsoleTests;
{$ifdef COMPUTEFPCINTERFACES}
ChDir(ExtractFilePath(ParamStr(0)));
ComputeFPCInterfacesUnit(
['..\CrossPlatform\templates','..\..\CrossPlatform\templates'],
'\..\..\SQlite3\"my_unit".pas');
{$endif}
and add "mORMotWrappers.pas" in the uses section ?
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
Without the SQLite3ConsoleTests, of course: put here some code using your IIDAPSignaling interface with mORMot (or simply register it).
And adapting the mustache wrapper folder (possibly using an absolute path depending on your local hard drive configuration).
You have to run it under Delphi!
But Delphi 6 is enough - or any later revision.
Offline
Without the SQLite3ConsoleTests, of course: put here some code using your IIDAPSignaling interface with mORMot (or simply register it).
Yes of course
You have to run it under Delphi!
But Delphi 6 is enough - or any later revision.
With Delphi ok ! Thank you for the speed of your response
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
If you like to experiment .... you could try this:
1)
Use fpcup to install the special branch of fpc, that includes an RTTI extension.
fpcup --fpcURL="rtti" --installdir="myspecialfpcdir"
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup
2)
enable fpc RTTI inside of synopse.inc
{.$define HASINTERFACERTTI} ... remove dot
Note: this additional RTTI is (at the moment) only available for i386, X86_64 and ARM.
Offline
If you like to experiment .... you could try this:
1)
Use fpcup to install the special branch of fpc, that includes an RTTI extension.
fpcup --fpcURL="rtti" --installdir="myspecialfpcdir"
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup2)
enable fpc RTTI inside of synopse.inc
{.$define HASINTERFACERTTI} ... remove dotNote: this additional RTTI is (at the moment) only available for i386, X86_64 and ARM.
I already tried fpcup and I prefer CodeTyphon. But this is an other way to use RTTI, it's interesting.
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
What does
['..\CrossPlatform\templates','..\..\CrossPlatform\templates']
exactly mean ?
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
This should be the folder where the cross-platform templates files are available on your local computer.
It depends where you did unzip the framework source code.
Ok I corrected my links but what are they for ?
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
The wrapper generator need to access the FPC-mORMotInterfaces.pas.mustache template.
Ok all is now clear. Thank's a lot !
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
I have a new error, only with FPC :
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
I found the problem. TestSQL3FPCInterfaces was used in another unit !
Now a last error. Even if I include "My RTTI unit".pas, I have the "No RTTI available for ..."
Last edited by Thomas-Acia (2015-05-19 13:31:09)
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
RTTI is now working well. Next step is to connect my server to my Postgresql database with ZEOS.
Delphi 2010 - Delphi XE5 (x64 Apps) - CodeTyphon - Typhon IDE v 5.7 - FPC 3.1.1 - mORMot 1.18
Windows 7 - VirtualBox : Linux Debian 8.5 Jessie 32 bits
Offline
If you like to experiment .... you could try this:
1)
Use fpcup to install the special branch of fpc, that includes an RTTI extension.
fpcup --fpcURL="rtti" --installdir="myspecialfpcdir"
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup2)
enable fpc RTTI inside of synopse.inc
{.$define HASINTERFACERTTI} ... remove dotNote: this additional RTTI is (at the moment) only available for i386, X86_64 and ARM.
I could not run your fpcup_linux_x86 on my CentOS 5.11 x64. The i686 version of glibc has already installed. Could you help to comment how to work around ? ...
[test@localhost i386-linux]$ pwd
/home/test/DEV/Reiniero-fpcup-master/bin/i386-linux
[test@localhost i386-linux]$
[test@localhost i386-linux]$ cat /etc/redhat-release
CentOS release 5.11 (Final)
[test@localhost i386-linux]$
[test@localhost i386-linux]$ uname -a
Linux localhost.localdomain 2.6.18-398.el5 #1 SMP Tue Sep 16 20:50:52 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[test@localhost i386-linux]$
[test@localhost i386-linux]$ ./fpcup_linux_x86 --fpcURL="rtti" --installdir="/home/test/fpclazarus_x86/"
bash: ./fpcup_linux_x86: /usr/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
[test@localhost i386-linux]$
[test@localhost i386-linux]$ sudo yum -y install glibc.i686
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* c5-media:
Setting up Install Process
Package glibc-2.5-123.i686 already installed and latest version
Nothing to do
[test@localhost i386-linux]$
Offline
Sorry for the trouble. Problem solved by adding a symbolic link....
[test@localhost i386-linux]$ ldd fpcup_linux_x86
linux-gate.so.1 => (0xffffe000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00a10000)
libdl.so.2 => /lib/libdl.so.2 (0x00a09000)
libc.so.6 => /lib/libc.so.6 (0x00880000)
/usr/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00861000)
[test@localhost i386-linux]$
[test@localhost i386-linux]$ ls /usr/lib/ld-linux.so.2
ls: /usr/lib/ld-linux.so.2: No such file or directory
[test@localhost i386-linux]$
[test@localhost i386-linux]$ ls -l /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 9 Nov 20 2014 /lib/ld-linux.so.2 -> ld-2.5.so
[test@localhost i386-linux]$
[test@localhost i386-linux]$ sudo ln -s /lib/ld-2.5.so /usr/lib/ld-linux.so.2
[test@localhost i386-linux]$
[test@localhost i386-linux]$ ls -l /usr/lib/ld-linux.so.2
lrwxrwxrwx 1 root root 14 Jul 1 00:11 /usr/lib/ld-linux.so.2 -> /lib/ld-2.5.so
[test@localhost i386-linux]$
Could you help to comment another question ?
If you like to experiment .... you could try this:
1)
Use fpcup to install the special branch of fpc, that includes an RTTI extension.
fpcup --fpcURL="rtti" --installdir="myspecialfpcdir"
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup
......
Is this "rtti" a specific revision, or always the latest revision that contains the "rtti" feature ?
Last edited by ComingNine (2015-06-30 14:25:35)
Offline
AFAIK this is a dedicated branch.
Do you mean that --fpcURL="rtti" will always fetch the latest revision of this dedicated branch ?
Offline
If you like to experiment .... you could try this:
1)
Use fpcup to install the special branch of fpc, that includes an RTTI extension.
fpcup --fpcURL="rtti" --installdir="myspecialfpcdir"
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup......
I could not run your fpcup_linux_x86 or fpcup_linux_x64 on my CentOS 5.11 x64.
[test@localhost i386-linux]$ ./fpcup_linux_x86 --fpcURL="rtti" --installdir="/home/test/fpclazarus_x86/" --verbose
......
/home/test/fpclazarus_x86/lazarus/components/lazutils/lazfglhash.pas(83,6) Error: (5000) Identifier not found "FHashTableSize"
/home/test/fpclazarus_x86/lazarus/components/lazutils/lazfglhash.pas(84,17) Error: (5000) Identifier not found "FHashTableSize"
......
[test@localhost i386-linux]$ cat /home/test/fpclazarus_x86/lazarus/components/lazutils/lazfglhash.pas
......
{$if not(defined(ver2) or defined(ver3_0))}
function TLazFPGHashTable.ForEachCall(aMethod: TGIteratorMethod): THTGNode;
var
i, j: Longword;
continue: boolean;
begin
Result:=nil;
continue:=True;
if FHashTableSize>0 then
for i:=0 to FHashTableSize-1 do
if Assigned(Chain(i)) then
if chain(i).Count>0 then
for j:=0 to Chain(i).Count-1 do
begin
aMethod(THTGNode(Chain(i)[j]).Data, THTGNode(Chain(i)[j]).Key, continue);
if not continue then
begin
Result:=THTGNode(Chain(i)[j]);
Exit;
end;
end;
end;
......
[test@localhost i386-linux]$
It seems to be related to the ver2 or ver3_0. Could you help to comment what is the correct way to work around this ? ...
Last edited by ComingNine (2015-06-30 14:56:51)
Offline
@ComingNine
It would be better to post your fpcup remarks on the fpc mailing list : http://forum.lazarus.freepascal.org/ind … 211.0.html
However, the above problem is not related to fpcup, but seemingly the fpc/lazarus combi not working together.
(the rtti branch of fpc does not receive much love lately, other than the initial commit)
Offline
This post is verry usefull! I allready have followed it and I have got my Server(based on Project16ServerHttp sample) running compiled by LazarusIDE.
Thanks a lot!
Offline
Good !
Some updated info about FPC/Lazarus and RTTI.
The whole rtti branch of FPC is abandoned. But it is also not needed anymore.
Just use NewPascal: it has all the RTTI (and more) you need for the mORMot. See http://synopse.info/forum/viewforum.php?id=21
Or use fpcupdeluxe to install NewPascal anywhere you want ! See https://github.com/LongDirtyAnimAlf/Rei … /tag/0.99c
Offline
Pages: 1