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

Dimstar / Dominique Leuenberger dimstar at opensuse.org
Wed Oct 1 15:50:27 EDT 2014


On Wed, 2014-10-01 at 21:43 +0200, Frank H. Ellenberger wrote: 
> Hi all,
> 
> with the help of lmat I was able to solve this issue, which prevented me
> for a long time from building the code.
> 
> Opensuse has libdbi1-0.9.0-2.1.2 in its default 13.1 repos.
> Additional exists libdbi3-0.9.0.g32-1.1 in its OBS server:database. Both
> can be installed parallel. But you can only install one libdbi-devel. If
> you configured the database OBS repo, you can accidentially upgrade your
> libdbi-devel package.
> 
> While libdbi-devel-2.1.2 has time_t d_datetime;
> in dbi_data_t in the /usr/include/dbi/dbi-dev.h, it is
> dbi_datetimex d_datetimex; in libdbi-devel-0.9.0.g32-1.1
> 
> I hope this prevents others from hours of search,
> Frank

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);
}


Cheers,
-- 
Dimstar / Dominique Leuenberger <dimstar at opensuse.org>



More information about the gnucash-devel mailing list