Thread: libECPG: Warning: get descriptor: 7.1 and 7.2 are not binary compatible (yet)

libECPG: Warning: get descriptor: 7.1 and 7.2 are not binary compatible (yet)

From
Christof Petig
Date:
Hello,

I just noticed that libecpg.so.3.2.0 and libecpg.so.3.3.0 are not binary
compatible.
A program using get descriptor stopped working (still under
investigation) once I installed the new libecpg.
So I'm currently adding error logs to libecpg to find the cause for this
error.

Your's   Christof (the one to blame for this)




Re: libECPG: Warning: get descriptor: 7.1 and 7.2 are

From
Peter Eisentraut
Date:
Christof Petig writes:

> I just noticed that libecpg.so.3.2.0 and libecpg.so.3.3.0 are not binary
> compatible.
> A program using get descriptor stopped working (still under
> investigation) once I installed the new libecpg.

I seem to remember that some enums were rearranged or renumbered.  Look
there.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot

From
Christof Petig
Date:
Peter Eisentraut wrote:

> Christof Petig writes:
>
> > I just noticed that libecpg.so.3.2.0 and libecpg.so.3.3.0 are not binary
> > compatible.
> > A program using get descriptor stopped working (still under
> > investigation) once I installed the new libecpg.
>
> I seem to remember that some enums were rearranged or renumbered.  Look
> there.

You guessed right. I think I found the problem ...

@@ -67,10 +68,11 @@               ECPGd_ret_octet,               ECPGd_scale,               ECPGd_type,
+               ECPGd_cardinality,               ECPGd_EODT                              /* End of descriptor
typ
es. */       };


IIRC the list of descriptor types is terminated by ECPGd_EODT. So the new
library can't figure out where the old code's argument stop.

Fix: put ECPGd_cardinality behind ECPGd_EODT.
I reordered them because of logical considerations, maybe we should weight
binary compatibility more than beautiful-sortedness of enum values.

Michael: Would you swap the lines?

Thanks   Christof




Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot binary compatible (yet)

From
Michael Meskes
Date:
On Mon, Oct 08, 2001 at 08:39:47AM +0200, Christof Petig wrote:
> Michael: Would you swap the lines?

Just committed. 

Thanks.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot

From
Tom Lane
Date:
Christof Petig <christof@petig-baender.de> writes:
> IIRC the list of descriptor types is terminated by ECPGd_EODT. So the new
> library can't figure out where the old code's argument stop.
> Fix: put ECPGd_cardinality behind ECPGd_EODT.
> I reordered them because of logical considerations, maybe we should weight
> binary compatibility more than beautiful-sortedness of enum values.

Is that a safe fix?  If there are any places that assume that ECPGd_EODT
is the largest value of this enum type (eg, for sizing arrays) then
I think you've got a problem.
        regards, tom lane


Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot

From
Christof Petig
Date:
Tom Lane wrote:

> Christof Petig <christof@petig-baender.de> writes:
> > IIRC the list of descriptor types is terminated by ECPGd_EODT. So the new
> > library can't figure out where the old code's argument stop.
> > Fix: put ECPGd_cardinality behind ECPGd_EODT.
> > I reordered them because of logical considerations, maybe we should weight
> > binary compatibility more than beautiful-sortedness of enum values.
>
> Is that a safe fix?  If there are any places that assume that ECPGd_EODT
> is the largest value of this enum type (eg, for sizing arrays) then
> I think you've got a problem.

I double checked again. No problems at all.
Christof

PS: Michael, did you know that ecpg does not support casts on variable
inialization ?
  int VAR=(int)2.2;

is illegal in an declare section!
But it is hard to fix (tried five times, 51 shift/reduce conflicts, gave up).
Used the C++ way ( int VAR=int(2.2); )