More patches soon ...

Dmitry Nikitin <[email protected]> Fri, 4 Mar 2011 20:29:22 +0200
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
Hi, Nirgal Vourgère!

You job is greate. Thanks.
I found your git-repository and compiled worked and new functionality mdbtools.
But when I would build the RPM package for my distr (Mandriva 2010), the build CFLAGS of:
CFLAGS="-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -DHAVE_ICONV -DSQL"
give the errors in sources:

gcc -DHAVE_CONFIG_H -I. -I../../include  -I../../include -DORBIT2=1 -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libglade-2.0 -I/usr/include/libxml2 -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/gail-1.0   -DDATADIR="\"/usr/local/share\"" -DGMDB_ICONDIR="\"/usr/local/share/gmdb/glade/\"" -DGMDB_GLADEDIR="\"/usr/local/share/gmdb/glade/\""    -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -DHAVE_ICONV -DSQL -DHAVE_ICONV -DSQL -MT main2.o -MD -MP -MF .deps/main2.Tpo -c -o main2.o main2.c
main2.c: In function ‘gmdb_about_cb’:
main2.c:75: warning: passing argument 1 of ‘gtk_show_about_dialog’ from incompatible pointer type
/usr/include/gtk-2.0/gtk/gtkaboutdialog.h:67: note: expected ‘struct GtkWindow *’ but argument is of type ‘struct GtkWidget *’
main2.c: In function ‘gmdb_help_cb’:
main2.c:105: error: format not a string literal and no format arguments
make[3]: *** [main2.o] Error 1

This errors take the CFLAGS="-Werror=format-security", without this flags compiled as is.

Also give errors in build mdbtools with unixODBC:
Making all in odbc
make[2]: Вхожу у каталог "/home/luckas/rpm/BUILD/mdbtools-0.6pre1.patched/src/odbc"
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include  -I../../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I/usr/include   -O2 -g -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -DHAVE_ICONV -DSQL -DHAVE_ICONV -DSQL -DUNIXODBC -MT odbc.lo -MD -MP -MF .deps/odbc.Tpo -c -o odbc.lo odbc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include -O2 -g -pipe -Wformat -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -DHAVE_ICONV -DSQL -DHAVE_ICONV -DSQL -DUNIXODBC -MT odbc.lo -MD -MP -MF .deps/odbc.Tpo -c odbc.c  -fPIC -DPIC -o .libs/odbc.o
odbc.c:223: error: expected declaration specifiers or ‘...’ before ‘SQLROWOFFSET’
odbc.c:224: error: expected declaration specifiers or ‘...’ before ‘SQLROWSETSIZE’
odbc.c:220: error: conflicting types for ‘SQLExtendedFetch’
/usr/include/sqlext.h:1857: note: previous declaration of ‘SQLExtendedFetch’ was here
odbc.c: In function ‘SQLExtendedFetch’:
odbc.c:236: error: ‘pcrow’ undeclared (first use in this function)
odbc.c:236: error: (Each undeclared identifier is reported only once
odbc.c:236: error: for each function it appears in.)
odbc.c: At top level:
odbc.c:1485: error: expected declaration specifiers or ‘...’ before ‘SQLROWCOUNT’
odbc.c:1482: error: conflicting types for ‘SQLSetStmtOption’
/usr/include/sql.h:796: note: previous declaration of ‘SQLSetStmtOption’ was here
make[2]: *** [odbc.lo] Error 1

My configurations:
Mandriva 2010.0, x86_64, mdbtools-git-2011-02-28, lib64gtk+2.0_0-devel-2.18.9-1.2mdv2010.0.x86_64, lib64unixODBC-devel-2.2.14-8mdv2010.0.x86_64

Also I would like propouse a some thinks:
1) need to fix maximum varchar (255) for mysql
2) need to fix the procedure of sanitize (-S) the dump of MDB files. You already changes dates to utf-8 codepage, and the more "dummy"
MS windows users and "admins" used the non ASCII symbols for names of tables and columns in the MDB-files, like as cyrilic :(
May be the procedure of sanitize can replace the symbols in names as transliterate (need check the match of names and length?)
Now, the replaced only spaces in names as "_", and .... the other non-english symbols taking "____________________________" as name of table.

Good Luck, Dmitry

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
mdbtools-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mdbtools-dev