DBI/SQL backend

David Reiser dbreiser at earthlink.net
Thu Jun 12 21:00:51 EDT 2008


On Jun 12, 2008, at 11:19 AM, Phil Longstaff wrote:

> Derek Atkins wrote:
>> David Reiser <dbreiser at earthlink.net> writes:
>>
>>>>> with --enable-error-on-warning set, I get:
>>>>>
>>>>> cc1: warnings being treated as errors
>>>>> gnc-backend-util-sql.c: In function ‘gnc_sql_get_sql_value’:
>>>>> gnc-backend-util-sql.c:1411: warning: format ‘%d’ expects type  
>>>>> ‘int’,
>>>>> but argument 5 has type ‘GType’
>>>>> make[5]: *** [gnc-backend-util-sql.lo] Error 1
>>>> What machine/os/version of gcc?
>>>>
>>>> Phil
>>> Mac OS X, ppc hardware, gcc 4.0.1 (Apple's version)
>>
>> Another question is:  what version of glib?
>>
>> Phil, keep in mind that GLib changed from an "int" GType to an
>> "opaque" GType.   Why are you trying to read/write a GType as
>> an int?
>
> When the sql backend creates an INSERT or UPDATE statement, it gets a
> list of GValues, one for each field.  It then needs to convert them to
> ascii.  For this, it uses g_value_transform() if the GType is
> transformable to G_TYPE_STRING.  If the GType is not transformable, I
> want something in the log identifying the type, and I was using "%d"  
> and
> the GType value.  I can switch to the GType name.
>
> Phil

Thanks for the fix in 17222. There's another GType in line 705 of gnc- 
backend-dbi.c
If I fix that one in roughly the same manner as 17222, and I  
explicitly --disable-gda (so that only dbi and not gda shows up in the  
configure summary), my build stops at:

  gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"gnc.gui\" -I/sw/ 
include -I../../src/core-utils -I../../src/gnc-module -I../../src/ 
engine -I../../src/backend/file -I../../src/app-utils -I../../src - 
I../../src -I../../lib/libc -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/ 
include -I/sw/lib/pango-ft219/include/pango-1.0 -I/sw/lib/fontconfig2/ 
include -I/sw/lib/freetype219/include/freetype2 -I/sw/lib/freetype219/ 
include -I/sw/include/pixman-1 -I/sw/include/libpng12 -I/sw/include/ 
glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/cairo -I/sw/include/ 
gtk-2.0 -I/sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include -I/sw/include/ 
libxml2 -I/sw/include/libglade-2.0 -I/usr/X11R6/include -I/usr/X11/ 
include -I/sw/lib/pango-ft219/include/pango-1.0 -I/sw/lib/fontconfig2/ 
include -I/sw/lib/freetype219/include/freetype2 -I/sw/lib/freetype219/ 
include -I/sw/include/pixman-1 -I/sw/include/libpng12 -I/sw/include/ 
glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/cairo -I/sw/include/ 
gtk-2.0 -I/sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include -I/usr/X11R6/ 
include -I/usr/X11/include -I/sw/lib/pango-ft219/include/pango-1.0 -I/ 
sw/lib/fontconfig2/include -I/sw/lib/freetype219/include/freetype2 -I/ 
sw/lib/freetype219/include -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/ 
include -I/sw/include/orbit-2.0 -I/sw/include/gconf/2 -I/sw/include/ 
pixman-1 -I/sw/include/libpng12 -I/sw/include/cairo -I/sw/include/ 
gtk-2.0 -I/sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include -I/sw/include/ 
libart-2.0 -I/sw/include/gail-1.0 -I/sw/include/bonobo-activation-2.0 - 
I/sw/include/libbonobo-2.0 -I/sw/include/gnome-vfs-2.0 -I/sw/lib/gnome- 
vfs2.16/gnome-vfs-2.0/include -I/sw/include/libgnome-2.0 -I/sw/include/ 
libgnomecanvas-2.0 -I/sw/include/libxml2 -I/sw/include/libbonoboui-2.0  
-I/sw/include/gnome-keyring-1 -I/sw/include/libgnomeui-2.0 -I/usr/ 
X11R6/include -I/usr/X11/include -DORBIT2=1 -I/sw/lib/pango-ft219/ 
include/pango-1.0 -I/sw/lib/fontconfig2/include -I/sw/lib/freetype219/ 
include/freetype2 -I/sw/lib/freetype219/include -I/sw/include/pixman-1  
-I/sw/include/libpng12 -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/ 
include -I/sw/include/cairo -I/sw/include/gtk-2.0 -I/sw/include/ 
atk-1.0 -I/sw/lib/gtk-2.0/include -I/sw/include/libxml2 -I/sw/include/ 
orbit-2.0 -I/sw/include/gconf/2 -I/sw/include/libart-2.0 -I/sw/include/ 
gail-1.0 -I/sw/include/bonobo-activation-2.0 -I/sw/include/ 
libbonobo-2.0 -I/sw/include/gnome-vfs-2.0 -I/sw/lib/gnome-vfs2.16/ 
gnome-vfs-2.0/include -I/sw/include/libgnome-2.0 -I/sw/include/ 
libgnomecanvas-2.0 -I/sw/include/libbonoboui-2.0 -I/sw/include/gnome- 
keyring-1 -I/sw/include/libglade-2.0 -I/sw/include/libgnomeui-2.0 -I/ 
sw/include/libgtkhtml-3.14 -I/usr/X11R6/include -I/usr/X11/include - 
DORBIT2=1 -D_THREAD_SAFE -I../../lib/libqof/qof -I../../lib/libqof/qof  
-I/sw/lib/pango-ft219/include/pango-1.0 -I/sw/lib/fontconfig2/include - 
I/sw/lib/freetype219/include/freetype2 -I/sw/lib/freetype219/include - 
I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include -I/sw/include/ 
pixman-1 -I/sw/include/libpng12 -I/sw/include/cairo -I/sw/include/ 
gtk-2.0 -I/sw/include/atk-1.0 -I/sw/lib/gtk-2.0/include -I/sw/include/ 
libxml2 -I/sw/include/libart-2.0 -I/sw/include/libglade-2.0 -I/sw/ 
include/libgsf-1 -I/sw/include/libgoffice-0.6 -I/usr/X11R6/include -I/ 
usr/X11/include -Werror -Wdeclaration-after-statement -Wno-pointer- 
sign -D_FORTIFY_SOURCE=2 -g -Wno-unused -MT dialog-database- 
connection.lo -MD -MP -MF .deps/dialog-database-connection.Tpo -c  
dialog-database-connection.c  -fno-common -DPIC -o .libs/dialog- 
database-connection.o
dialog-database-connection.c:33:27: error: libgda/libgda.h: No such  
file or directory
dialog-database-connection.c: In function ‘gnc_ui_database_connection’:
dialog-database-connection.c:116: error: ‘GdaDataModel’ undeclared  
(first use in this function)
dialog-database-connection.c:116: error: (Each undeclared identifier  
is reported only once
dialog-database-connection.c:116: error: for each function it appears  
in.)
dialog-database-connection.c:116: error: ‘dsns’ undeclared (first use  
in this function)
cc1: warnings being treated as errors
dialog-database-connection.c:117: warning: ISO C90 forbids mixed  
declarations and code
dialog-database-connection.c:134: error: ‘GdaDataSourceInfo’  
undeclared (first use in this function)
dialog-database-connection.c:134: error: ‘ds_info’ undeclared (first  
use in this function)
make[5]: *** [dialog-database-connection.lo] Error 1

I built libgda 3.99, but I obviously haven't gotten the flags right  
for it, but with --disable-gda, shouldn't gnucash quit looking for  
libgda.h?

Dave

--
David Reiser
dbreiser at earthlink.net






More information about the gnucash-devel mailing list