#1 Re: mORMot 1 » XE3 - Fatal: F2084 Internal Error: C2130 » 2020-03-05 14:32:38

>fossil
do not understand where the current version is downloading

2020-03-05 15:27 Fatal https://github.com/synopse/mORMot/commi … 0dedbaa840
2020-03-05 15:35 Success https://github.com/synopse/mORMot/commi … e00adc3ea2

#2 Re: mORMot 1 » XE3 - Fatal: F2084 Internal Error: C2130 » 2020-03-05 13:21:08

TDynArrayHasher =

  function HashOne(Elem: pointer): cardinal; {$ifdef FPC_OR_UNICODE}inline;{$endif} // Delphi 2007 -> C1632

Fix for latest version:

TDynArrayHasher =
...
    function HashOne(Elem: pointer): cardinal;
       {$ifdef FPC}inline;{$else}
         {$ifdef ISDELPHIXE4}inline;{$endif}
       {$endif} // Delphi 2007=C1632, 2010=C1872, XE3=C2130

#3 Re: mORMot 1 » XE3 - Fatal: F2084 Internal Error: C2130 » 2020-03-05 13:06:29

Two consecutive commites:

Last XE3 Success: 2020-03-05 14:57
  https://github.com/synopse/mORMot/commi … 974a9f9cab

Fiirst XE3 Fatal: 2020-02-15 14:32 (see diff)
  https://github.com/synopse/mORMot/commi … 04a6e68dcf
    SynCommons.pas(52090) Fatal: F2084 Internal Error: C2130

#4 Re: mORMot 1 » XE3 - Fatal: F2084 Internal Error: C2130 » 2020-03-05 11:07:35

XE3:
SynCommons.pas(51075) Fatal: F2084 Internal Error: C2130

#5 mORMot 1 » XE3 - Fatal: F2084 Internal Error: C2130 » 2020-03-04 18:04:29

pult
Replies: 6

XE3 x86:
SynCommons.pas -  Fatal: F2084 Internal Error: C2130

mORMot version '1.18.5765' at 2020-04-04: https://github.com/synopse/mORMot/commi … c0c5fee675

#6 mORMot 1 » Failed compilation when defined NOSETTHREADNAME » 2020-02-06 12:49:05

pult
Replies: 1

Failed compilation when defined NOSETTHREADNAME :

SynCommons.pas ... Error: E2023 Function needs result type

#8 Re: mORMot 1 » LVCL: SynCommons.pas SynCrtSock.pas » 2014-02-13 00:00:25

thanks!!!
fixes for Abort/ReturnAddress

procedure Abort;
   {$IFDEF MSWINDOWS}{$IFNDEF UNICODE}
   function ReturnAddress: Pointer; // "ReturnAddress" built into the new language
   asm
     mov eax, [ebp+8]
   end;
   {$ENDIF}{$ENDIF}
 begin
   raise EAbort.Create('Operation Aborted') {$IFDEF FPC} {at todo: ?<i do not remember> }{$ELSE}at ReturnAddress{$ENDIF};
 end;

- I will wait for fixes for unicode smile

#9 Re: mORMot 1 » LVCL: SynCommons.pas SynCrtSock.pas » 2014-02-11 21:25:04

LVCL\Demo\Project3.dpr

D2007: 62'464 bytes
XE3:  81'408 bytes

#10 Re: mORMot 1 » LVCL: SynCommons.pas SynCrtSock.pas » 2014-02-11 17:58:45

To reduce the size of the examples (*.dpr):

{$IF CompilerVersion >= 22.00}
  {.$IFNDEF DEBUG}
    {$WEAKLINKRTTI ON}
    {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
  {.$ENDIF}
{$ENDIF}

#11 Re: mORMot 1 » LVCL: SynCommons.pas SynCrtSock.pas » 2014-02-11 17:47:45

I tried to translate for D2007, XE3.
In the "D2007" examples work. And in "XE3" black background in forms (still need to fix).
LVCL my changes:
LVCL_CHANGES_D2007,XE3_[2014.02.11_1919].zip

#12 mORMot 1 » LVCL: SynCommons.pas SynCrtSock.pas » 2014-02-11 15:37:09

pult
Replies: 8

1) "SynCrtSock.pas, CPort.pas" requires inclusion "Synopse.inc" for processing "{$IFDEF LVCL}"
2) "SynCommons.pas" reqired change "function FileAgeToDateTime" for option "{$IFDEF LVCL}" or need overloded version FileAge in "LVCL\SysUtils.pas"
3) "SynCommons.pas" required declaration TBytes for "{$IFDEF LVCL}" (easier to add to LVCL\SysUtils.pas)
4) "SynCommons.pas" duplicate definitions PUREPASCAL:
  {$ifndef PUREPASCAL} { these functions are implemented in asm }
  {$ifndef LVCL} { don't define these functions twice }
  {$ifndef PUREPASCAL}
  procedure FillChar(var Dest; Count: Integer; Value: Byte);
5) "SynCommons.pas" required "function Trim(RawUTF8): RawUTF8"  for option "{$IFDEF LVCL}"

#13 mORMot 1 » SynCommons.pas not compiled for {$define USEPACKAGES} » 2014-02-08 17:06:49

pult
Replies: 1

SynCommons.pas(...) Error: E2065 Unsatisfied forward or external declaration: 'RecordClear'

fix:

{$ifdef USEPACKAGES}
procedure RecordCopy(var Dest; const Source; TypeInfo: pointer);
asm // same params than _CopyRecord{ dest, source, typeInfo: Pointer }
{$ifdef CPUX64}
  .NOFRAME
{$endif}
  jmp System.@CopyRecord
end;
// +++++++++++++++++++++++:
procedure RecordClear(var Dest; TypeInfo: pointer);
asm
{$ifdef CPUX64}
  .NOFRAME
{$endif}
  jmp System.@FinalizeRecord
end;
// +++++++++++++++++++++++.
{$else USEPACKAGES}
{$ifdef DELPHI5OROLDER}
procedure RecordCopy(var Dest; const Source; TypeInfo: pointer);
asm // same params than _CopyRecord{ dest, source, typeInfo: Pointer }
  jmp System.@CopyRecord
end;

#14 mORMot 1 » How to disable system proxy for TWinHTTP ? » 2014-01-27 16:20:12

pult
Replies: 1

How to disable system proxy for TWinHTTP ?
I use this method:

Client := TSQLHttpClient.Create(sHost, sPort, Model,
  {https:}False,
  {proxyname:}#32,  // proxy #32 for disable over proxy access
  {proxybypas:}'');

But it looks not very logical.

#15 mORMot 1 » Win64: SynZipFiles.pas: Fatal: F1026 File not found: 'Libc.dcu' » 2014-01-24 13:31:16

pult
Replies: 1

1) SynZipFiles.pas cannot compile for Win64:
   Fatal: F1026 File not found: 'Libc.dcu'

2) SynZipFiles.pas warnings:
     SynZipFiles.pas(613) Warning: W1035 Return value of function 'TZipReader.GetData' might be undefined
     SynZipFiles.pas(869) Warning: W1057 Implicit string cast from 'RawUTF8' to 'string'

3) SynCommons.pas hint for compiler option "accertion off" {$C-} for code "function VariantSave":
     Hint: H2077 Value assigned to 'P' never used
     Please modify code to:

function VariantSave(const Value: variant): RawByteString;
{$ifopt C+}
var P: PAnsiChar;
{$endif}
begin
  SetString(result,nil,VariantSaveLength(Value));
  {$ifopt C+}P := {$endif}VariantSave(Value,pointer(result));
  {$ifopt C+}
  assert(P-pointer(result)=length(result));
  {$endif}
end;

#16 mORMot 1 » SynCommons.pas StringToGUID UNICODE - buffer not zero ended » 2013-12-23 13:34:33

pult
Replies: 1

fixing:

function StringToGUID(const text: string): TGUID;
{$ifdef UNICODE}
var tmp: array[0..{+}36{+.}] of byte;// ******** +1 ***********
    i: integer;
{$endif}
begin
  if (length(text)=38) and (text[1]='{') and (text[38]='}') then begin
    {$ifdef UNICODE}
    for i := 0 to 35 do
      tmp[i] := PWordArray(text)[i+1];
    {+}tmp[36] := 0;{+.} // ******** +2 ***********
    if TextToGUID(@tmp,@result)<>nil then
    {$else}
    if TextToGUID(@text[2],@result)<>nil then
    {$endif}
      exit; // conversion OK
  end;
  fillchar(result,sizeof(result),0);
end;

#17 Re: mORMot 1 » SynCommons.pas - delphi package compilation error for asm code » 2013-11-26 10:57:06

Nightly - Yes
USEPACKAGES - Thanks - this solved the problem

#18 mORMot 1 » SynCommons.pas - delphi package compilation error for asm code » 2013-11-25 18:17:34

pult
Replies: 2

If you try to create a package for the library mORMot:

Error: E2201 Need imported data reference ($G) to access 'VarCopyProc' from unit 'SynCommons'

temporary fix:

...
{$ifdef PUREPASCAL}
...
{$else}

procedure RecordCopyInvoke;
asm
  call System.@CopyRecord
end;

{+} // begin changes:
{.$IFDEF USESYNTABLEVARIANT}
procedure _VarCopyProc(var Dest: TVarData; const Source: TVarData);
begin
  System.VarCopyProc(Dest, Source); // AV when System.VarCopyProc = nil
end;
var
  VarCopyProc:   procedure (var Dest: TVarData; const Source: TVarData) = _VarCopyProc;
{.$ENDIF USESYNTABLEVARIANT}
{+.} // end changes.

procedure RecordCopy(var Dest; const Source; TypeInfo: pointer);
...

Board footer

Powered by FluxBB