[patch_done] Zeos7 doesnt compile under FPC2.6.0

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

IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

There is {$IFDEF DARWIN} macro in FPC. The statements could be separated from UNIX
macro.
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

Not really. It should be the same for all unixy platforms.

Your problem is somewhere else, and as said earlier, using 2.4.4. or 2.6.0 it is the best to simply kill the whole ifdef FPC block in zclasses.

I'm currently revising the ifdef system of zeos, and hope to have an initial patch in about a week.

One of the problems is that I don't know much details about FPC versions before 2.4.2 anymore. Too long ago :-)

2.4.0 is a bit of a problem. It is still actively used (since default in Debian-stable), but was never used much with Lazarus.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

marcov wrote:One of the problems is that I don't know much details about FPC versions before 2.4.2 anymore. Too long ago :-)

2.4.0 is a bit of a problem. It is still actively used (since default in Debian-stable), but was never used much with Lazarus.
Really... a big problem.

I still suspecting about something related with your OS. I don't have a MacOS X to do tests. Because is strange the latest ZeosLib revision compiles fine on Linux with FPC 2.6.0 and Lazarus 0.9.31.

I checked to, if has something wrong with ZClasses.pas in /trunk and /branches/testing and are it equals.
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

I don't have a problem with 2.6.0 atm, I am not the original poster. From what I can see, the relevant fragment is correct for FPC 2.6.0 on OS X, but is not needed in the first place.

But I'm working with 2.7.1 which has TRecordBuffer like D2009 (which were recently merged back to 2.6.1), and noticed that about half of the ifdef FPC's are no longer necessary with 2.6.0

In time, 2.7.1 will be changed to the D2009 compatible definition of TRecordbuffer, and then Zeos must follow the Delphi12plus path of the relevant ifdefs. (but not all Delphi12plus bits are trecordbuffer related)

To this end, I've been playing and changing the define system for the last few days.

The goal is to totally eliminate the use of ver<x>, ver<x>plus and ver<x>below from the sources, and concentrate this in zeos.inc

For the current (not tidied) status see http://www.stack.nl/~marcov/zeos.patch

btw, maybe trecordbuffer shouldn't be solved with ifdefs at all, but should older Delphis simply define trecordbuffer=pchar or pansichar (which is the same for older Delphis), and should all relevant pchar() casts changed to trecordbuffer casts, eliminating the need for a ifdef at such positions.
Last edited by marcov on 27.01.2012, 13:29, edited 1 time in total.
IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

Tested with the revision 967 and now compiles without any error.
Thanks.
IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

Also plain files should be modified for DARWIN. It is different than windows(dll) and linux(so). it uses dylib.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

IndianaJones,
Can you propose (and test!) a fix for the dylib problem for your database driver of choice?
I suppose a few changes to the zplainloader and zplainxxxxdriver units may do the trick?

Mark
Image
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

IndianaJones wrote:Also plain files should be modified for DARWIN. It is different than windows(dll) and linux(so). it uses dylib.
In case of FPC, it should use "sharedsuffix" in unit dynlibs. (the unit that contains portable loadlibrary etc in FPC).

This is loaded, in a platform depend way with .so, dylib and dll.

BTW, OS X does support .so, but that's a bit atypical.
Locked