Path to 6.6.6-stable - "constref" FPC 2.5.1

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
mdbs99
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 22.10.2010, 13:24
Location: Rio de Janeiro, Brazil
Contact:

Path to 6.6.6-stable - "constref" FPC 2.5.1

Post by mdbs99 »

Hi,
Because this http://wiki.freepascal.org/User_Changes ... en_changed

...I could not compile my Lazarus. So, in attachment is a path to ZClasses.pas

This path is to 6.6.6-stable version.

Marcos Douglas
You do not have the required permissions to view the files attached to this post.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

Hi Marcos!

What's the version of your compiler that you used to do this changes? Now, I can't compile ZeosLib on Linux with latest FPC version, so, now I'm creating other patch to solve my problem without creating others to you...

Regards,

Fabio
mdbs99
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 22.10.2010, 13:24
Location: Rio de Janeiro, Brazil
Contact:

Post by mdbs99 »

Hi Fabio,
I used the last version of trunk (FPC 2.5.1). See the title...

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

Post by papelhigienico »

Sorry, when I wrote the previous post at near of 01:30AM (so I was sleeping).

I see that my version of FPC old if compared with your FPC version, so I updated it.

I'll provide a patch to get it compiling on linux again...
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

(2.5.1 is the development version. 2.4.2 is the last release, two weeks old now.)
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

marcov,
Can you have a short look at the patch, please? Just to check if the changes seem correct.
Th {$IFDEF FPC_HAS_CONSTREF} thing should keep the code backward compatible, I think, but I'm not sure of the other small changes are safe.

Mark
Image
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

zeos does not compile on FPC 2.4 anymore

Post by Wild_Pointer »

Hello,

the change applied may be ok for FPC 2.5, but for FPC 2.4 it raises exception when compiling. Attaching patch that should fix the problem.
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Wild_Pointer,
What about the patches by papelhienico posted in the bug tracker, are they allright?
I did commit his patches earlier today (to testing branch). Is your patch above still needed?

What worries me about your post is this part:

Code: Select all

{$IFDEF FPC2_5UP}{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}{$ELSE}stdcall{$ENDIF}
Does that mean fpc <2.5 on linux doesn't use 'cdecl'?

Mark
Image
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

Hello, mdaems,

I'm using Lazarus 0.9.28.2-10Ubuntu1, FPC v2.4.0

objpash.inc contains declaration:

Code: Select all

       IUnknown = interface
         ['{00000000-0000-0000-C000-000000000046}']
         function QueryInterface(const iid : tguid;out obj) : longint;stdcall;
         function _AddRef : longint;stdcall;
         function _Release : longint;stdcall;
       end;
       IInterface = IUnknown; 
UODATE:
I have updated to initial (1) objpash.inc revision from fpc repository - seems that interface definition has not been changed till version 2.4.0
END OF UPDATE.

I have tried compiling zeos trunk version, but I failed, so I had to change the code. Maybe fpc <2.5 on linux does use 'cdecl', but not with IInterface ... I didn't come with anything more elegant than this {$IFDEF FPC2_5UP}.
What about the patches by papelhienico posted in the bug tracker, are they allright?
I think the change made by papelhienico is valid only to FPC >= 2.5
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

This issue has been fixed? The latest zeos revision works on FPC 2.4.x on linux? I'm testing on

FPC 2.4.4 windows
FPC 2.5.1 linux
FPC 2.2.4 linux

FPC 2.4.x I can't test zeos
Alex Rosa
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 21.03.2012, 15:51
Location: Porto Alegre, Brazil
Contact:

Post by Alex Rosa »

Is there a plan to release a 6.6.7 with these fixes? On Linux I managed to get it working on FPC 2.6.0 with changes to ZClasses.pas (extra IFDEFs) and Zeos.inc (extra DEFINEs). Marcos tested it on Windows.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Alex Rosa,
Do you think you can get this working correctly for old and new fpc compilers on the 6.6.7 branch?

I can't promise a 6.6.7 build within a few days, but if you can provide a working patch we can commit it. And after that I can start thinking about making another try of a 6.6.7 build.

Mark
Image
Post Reply