[SOLVED] (opensuse) gnc-backend-dbi.c:2105:56: error: 'dbi_data_t' has no member named 'd_datetime'

John Ralls jralls at ceridwen.us
Thu Apr 2 10:14:17 EDT 2015


> On Apr 2, 2015, at 4:23 AM, Frank H. Ellenberger <frank.h.ellenberger at gmail.com> wrote:
> 
> Am 01.10.2014 um 22:34 schrieb Dimstar / Dominique Leuenberger:
>> On Wed, 2014-10-01 at 22:29 +0200, Frank H. Ellenberger wrote: 
>>> Hi Dominique,
>>> 
>>> Am 01.10.2014 um 21:50 schrieb Dimstar / Dominique Leuenberger:
>>>> For reference,
>>>> 
>>>> gnucash built for openSUSE Factory and 13.2 (which comes with libdbi3,
>>>> we carry this patch for now:
>>>> 
>>>> Index: gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
>>>> ===================================================================
>>>> --- gnucash-2.6.3.orig/src/backend/dbi/gnc-backend-dbi.c
>>>> +++ gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
>>>> @@ -2039,7 +2039,7 @@ row_get_value_at_col_name( GncSqlRow* ro
>>>>    dbi_result_t *result = (dbi_result_t*)(dbi_row->result);
>>>>    guint64 row = dbi_result_get_currow (result);
>>>>    guint idx = dbi_result_get_field_idx (result, col_name) - 1;
>>>> -     time64 time = result->rows[row]->field_values[idx].d_datetime;
>>>> +     time64 time =
>>>> _dbi_make_datetime(result->rows[row]->field_values[idx].d_datetimex);
>>>>    (void)g_value_init( value, G_TYPE_INT64 );
>>>>    g_value_set_int64 (value, time);
>>>> }
>>>> 
>>> 
>>> If we would have different -devel packages, which should report
>>> different versions, the patch could be generalized. I assume, the
>>> problem will appear in other distros earlier or later, too.
>>> 
>>> What do you think?
>> 
>> It should not matter about parallel installation of the -devel or not:
>> configure should simply identify which of the two variants are there and
>> 'do the right thing' out of it (I don't think libdbi exports usable
>> version info in the headers).
>> I'd go with some test compile of one function, if fails do the other..
>> then you know which version is there.
>> 
>> IF there is interest in this, I am willing to work on that in the next
>> couple days (probably tomorrow afternoon)
>> 
>> 
> 
> In libdbi commit ac482c2b4e478898d1b78afc62972c78c211d6d9 the function
> is changed, And in configure.ac the version is pushed:
> 
> dnl set up libtool library versioning
> -LIB_CURRENT=2
> +LIB_CURRENT=3
> LIB_REVISION=0
> -LIB_AGE=1
> +LIB_AGE=0
> 
> resulting in include/dbi/dbi.h:
> 
> /* definitions of the libtool library interface versions */
> #define LIBDBI_LIB_CURRENT 3
> #define LIBDBI_LIB_REVISION 0
> #define LIBDBI_LIB_AGE 0
> 
> Don't confound it with:
> 
> /* definition of the libdbi version */
> #define LIBDBI_VERSION ((2 * 10000) + (8 * 100) + (0))

Nice. 4 Months after Hoenicka marked https://sourceforge.net/p/libdbi/bugs/15/ as "won't fix". Jerks.

BTW, with regards to the earlier patch, don't use _dbi_make_datetime(). It returns a time_t, which is the wrong answer on Mac, Win, and 32-bit Linux/BSD. Use gnc_mktime() which returns a time64 regardless of sizeof(time_t).

All of which is interesting, but what's OpenSuse doing creating packages from unstable code? The last libdbi release is still 0.9.0 from 12 March 2013.

Regards,
John Ralls




More information about the gnucash-devel mailing list