ZeosLib 7 64 bits support

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

donaldshimoda
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 24.09.2009, 13:25
Contact:

Post by donaldshimoda »

BTW, you forget to fix ZTestCase.pas

at line 133
uses
{$IFDEF LINUX}
LCLIntf,
{$ELSE}

at line 381

function TZAbstractTestCase.GetTickCount: Cardinal;
begin
{$IFDEF LINUX}
Result := LCLIntf.GetTickCount;
{$ELSE}

Still raise some exceptions, i will show you in a while
donaldshimoda
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 24.09.2009, 13:25
Contact:

Post by donaldshimoda »

Well, running from outside the ide solve the exceptions. I will report you in a moment the result of the tests! :)
donaldshimoda
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 24.09.2009, 13:25
Contact:

Post by donaldshimoda »

I run the test, then where to upload the results? It only run 134 of the 374 tests...
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Felicitations, I also have failures in the test suite, no worries. Only the Core and Parsesql suites should be quite reasonabe. They would be a nice starter.

Statistics are a bit weird. Tests are run multiple times depending on the connections you have defined and the enabled drivers. It would be nice if we could fix that a little, but at the moment that's not our concern.

Here an overview of my 'normal' statistics. I did run these from the GUI in non-debug mode. (BTW : for the test suite in debug mode you should ignore all exceptions. The test are written explicitly to raise some, just because error conditions should also been tested.)

Core : Runs 68/53 Errors : 0 Failures : 5
ParseSql : Runs 58/58 Errors : 0 Failures : 0
Dbc : Runs 268/170 Errors : 0 Failures : 11
Component : Runs 225/42 Errors : 0 Failures : 33
Bugreport : Runs 152/63 Errors : 7 Failures : 9

I also attach result files for core and parsesql run in batch mode using

Code: Select all

ztestall -b --format=plain --suite=core>result.core.txt
ztestall -b --format=plain --suite=parsesql>result.parsesql.txt
As you'll see there's too much information to be practical, so I'm thinking about adding a verbose mode and a normal mode. Don't know yet how to do that.

Mark

P.S. Sometimes it's easier to talk over IM. My coordinates should be public, so contact me when needed/useful and I'm alive. I tried to contact you but that didn't work :?
You do not have the required permissions to view the files attached to this post.
Image
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

OK,

I just committed some changes that make the dbc layer working more or less for mysql on a 64 bit machine, based on your patches.
I tried the test suite on it and basically it works. (After I manually loaded the test database. Seems like the code that loads the database on Delphi isn't working yet on Lazarus/Fpc.
Now the dbc tests for mysql don't show more errors than they do on 32 bit systems.

The components layer however still complains about the bookmarks. Your patch didn't work out on the other compilers, however, so I couldn't apply it right away. I hope I maight find some time to have a look at that issue.

Mark
Image
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

I put in ZeosBugs, a second patch.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

The third patch is available in Zeosbugs.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

And it's committed now.

TO EVERYBODY:

Now Zeoslib 7 is also (more or less) usable on 64-bit Lazarus. At least when you use mysql.
For other databases we don't know yet if there are problems with the interface records of the driver libraries. Using the new 'universal' datatypes Fabio added to ZCompatibility.pas should make the job quite easy.

Mark
Image
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

TO EVERBODY (2):

I tested with SQLite3 and it is working fine under 64 bits (better than 32
bits, got less failures in 64 than 32bits). Postgres raises one exception
in 32 and 64 bits, but not in same test. I don't know if it is related
with my version of Postgres Server (8.4) and the client api is 8.1.

Others drivers I can't test it. If somebody can do this and found some
problem, contact-me using msn.

Regards,
Fabio
oflor
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 22.04.2010, 15:18
Location: Paraguay
Contact:

Post by oflor »

Hi People:

I was download Zeos 7 from SourgeForge Page.

I use it with Fedora12 64bits with Lazarus 0.9.29 but when I connect with Firebird 2.1.3 a access violation like error appears.

Tracing TZConnection.Connect := True I found that it necessary to make 2 changes to files ZCompatibility.pas and ZPlainLoader.

The FHandle and HMODULE properties, fields must be of type PtrInt.

FPC automatically change this data-type to corresponding long depending of processor type (32 or 64).

Good I continue probing it

Best Regards
donaldshimoda
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 24.09.2009, 13:25
Contact:

Post by donaldshimoda »

Wich FPC version (the most important data) Im using ubuntu 9.10 , 64 bits, zeos trunk version, FPC 2.4.1, FB 2.1.3 no AV at all...
wengpeng
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 04.05.2010, 08:49

Post by wengpeng »

TO EVERYBODY:

After changing types of FHandle and HModul to PtrInt in ZCompatibility.pas and ZPlainLoder.pas my Lazarus connects without problmes to my PostgreSQL-Server (8.3.4)

My OS FreeBSD 8.0-Stable (amd64), fpc 2.5.1, Lazarus 0.9.29, zeos trunk 803, all in 64bits !!!
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

donaldshimoda,
Can you just try this change? It's a FPC only change as Delphi doesn't support PtrInt.

For Windows this patch works:

Code: Select all

Index: core/ZCompatibility.pas
===================================================================
--- core/ZCompatibility.pas	(revision 803)
+++ core/ZCompatibility.pas	(working copy)
@@ -126,7 +126,7 @@
   INVALID_HANDLE_VALUE = 0;
 
 type
-  HMODULE = LongWord;
+  HMODULE = PtrInt;
 
 function LoadLibrary(ModuleName: PChar): HMODULE;
 function FreeLibrary(Module: HMODULE): LongBool;
Index: plain/ZPlainLoader.pas
===================================================================
--- plain/ZPlainLoader.pas	(revision 803)
+++ plain/ZPlainLoader.pas	(working copy)
@@ -67,7 +67,11 @@
   TZNativeLibraryLoader = class (TObject)
   private
     FLocations: TStringDynArray;
+  {$IFDEF FPC}
+    FHandle: PtrInt;
+  {$ELSE}
     FHandle: LongWord;
+  {$ENDIF}
     FLoaded: Boolean;
     FCurrentLocation: String;
     function ZLoadLibrary(Location: String): Boolean;
@@ -85,7 +89,11 @@
     procedure LoadIfNeeded; virtual;
 
     property Loaded: Boolean read FLoaded write FLoaded;
+  {$IFDEF FPC}
+    property Handle: PtrInt read FHandle write FHandle;
+  {$ELSE}
     property Handle: LongWord read FHandle write FHandle;
+  {$ENDIF}
     property CurrentLocation: String read FCurrentLocation write FCurrentLocation;
     function GetAddress(ProcName: PAnsiChar): Pointer;
   end;
Mark
Image
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

SVN rev 806.

Mark
Image
donaldshimoda
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 24.09.2009, 13:25
Contact:

Post by donaldshimoda »

I test version 805, version 806, firebird embebbed , firebird super server, all fails dbc test on the same point has explained.

HTH
Locked