#1 2015-01-06 02:58:57

DidiL
Member
Registered: 2015-01-06
Posts: 10

Execution problem under Lazarus/Code Typhon

Hi,

I need some help to use mORMot with FPC/Windows 8.1

Using
CodeTyphon32 5.1 / FPC 2.71 / mORMot 1.18
sqlite3fpc.7z (fpc-win32)  -> mormot dir
sqlite3obj.7z  (obj) -> mormot/sqlite3 dir
sqlite3.dll  -> output dir  and system32

Compilation error:
SynCommons.pas(9438,14) Error: function header doesn't match the previous declaration "SetProperty(var tvardata;const AnsiString;const tvardata):Boolean;"

----

Using
Lazarus 1.26 32bit / FPC 2.64 / mORMot 1.18
Lazarus 1.26 32/64bit / FPC 2.64 / mORMot 1.18
Same SQLite3 deployment.

Compilation: OK
But execution error:
TestSQL3 project has raised a class exception: 'External: ?'   At address: 75262F71

----

Thank you for your help.
We've tried on 3 different computers.

Offline

#2 2015-01-06 08:14:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

This issue was already documented.
In short, 2.6.4 contains a bug - http://mantis.freepascal.org/view.php?id=26773 - which prevents the tests to pass, and has been fixed in latest SVN trunk (but not in CodeTyphoon 5.1).

You may change the Synopse.inc file, in this section:

   {$ifdef VER2_7_1}
     {$define ISFPC271}
     {$define HASVARUSTRING}
     {$define HASVARUSTRARG}
     // defined if the http://mantis.freepascal.org/view.php?id=26773 bug is fixed
     // you should use 2.7.1/trunk branch in revision 28995 from 2014-11-05T22:17:54
     // => this will change the TInvokeableVariantType.SetProperty() signature
     {$define FPC_VARIANTSETVAR}
   {$endif}

Undefine FPC_VARIANTSETVAR conditional.
But the tests would not pass either.

You need the latest SVN 2.7 trunk so that this http://mantis.freepascal.org/view.php?id=26773 bug is fixed.
Codetyphoon is outdated.
We use http://wiki.freepascal.org/fpcup to compile it, and not CodeTypoon, which has strong licensing issues.

Offline

#3 2015-01-07 14:41:47

DidiL
Member
Registered: 2015-01-06
Posts: 10

Re: Execution problem under Lazarus/Code Typhon

Thanks Arnaud,
I tried again this morning but got a FPC 3.1.1 version, witch gives me the same FPC_VARIANTSETVAR problem...

Offline

#4 2015-01-07 14:53:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

BTW I do not know what is FPC 3.1.1...
I only know the 2.6 and 2.7 branches - see http://www.freepascal.org/develop.var

I guess what you call FPC 3.1.1 version does not have the 26773 fix included.
Ask FPC guys for including the fix!

Offline

#5 2015-01-07 15:21:55

DidiL
Member
Registered: 2015-01-06
Posts: 10

Re: Execution problem under Lazarus/Code Typhon

I've asked them for them for the exact command line to get 2.71 specific version using fpcup.

Offline

#6 2015-01-07 17:25:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

Offline

#7 2015-01-07 17:40:03

DidiL
Member
Registered: 2015-01-06
Posts: 10

Re: Execution problem under Lazarus/Code Typhon

As a quick (and dirty) solution, I've found binaries for this version.
http://vdebris.wordpress.com/lazarus-2-7-1-snapshot/

The test project is successfull (except URI root)
Let's play with the mORMot! smile

Offline

#8 2015-02-24 01:42:16

brian_ch
Member
Registered: 2015-02-24
Posts: 4

Re: Execution problem under Lazarus/Code Typhon

Sorry to resurrect the thread but I'm having this issue with FPC 3.0.1. Won't it be better to change that ifdef in synopse.inc and use the FPC_FULLVERSION define instead? (In order to don't need to update the condition after new fpc version releases).

Something like:

{$if FPC_FULLVERSION >= 20701} 
{$define ISFPC27}
{$endif} 

I'm not sure if this would be ok since I'm not very experienced with FPC (and have no experience with mORMot), but it seems to be easier to maintain.

Offline

#9 2015-02-24 05:48:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

I already tried that...

But this won't be allowed in a Delphi file AFAIR....

Offline

#10 2015-02-25 02:50:47

brian_ch
Member
Registered: 2015-02-24
Posts: 4

Re: Execution problem under Lazarus/Code Typhon

Hi, thanks for the reply,

what part won't be allowed? This part of the file is inside a "{$ifdef FPC}", so Delphi won't reach that condition. (Although it would be better to end with "{$ifend}" and not "{$endif}" as in my code above, but even this would only be needed for versions lower than Delphi 6 if I'm not mistaken.)

Offline

#11 2015-02-25 05:24:40

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

Just try it.
Afair at least in older Delphi, it won't compile, even in a $ifdef fpc...
Buggy delphi...

Offline

#12 2015-02-25 23:53:26

brian_ch
Member
Registered: 2015-02-24
Posts: 4

Re: Execution problem under Lazarus/Code Typhon

I don't have a Delphi license (or a Windows one hehe). I'm a GNU/Linux user and FreePascal hobbyist (and work with Java for a living).

I was happy that I found here in my house an old Borland evaluation kit CD that has Delphi 5 trial, but I just discovered (with the help of Wine) that it needed registration on the Borland website... I guess it's a bit too late for that. big_smile Now I don't know how I'll live without knowing what that problem was, but that's life! hehe

Offline

#13 2015-02-26 07:59:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,658
Website

Re: Execution problem under Lazarus/Code Typhon

big_smile

Offline

Board footer

Powered by FluxBB