2010/1/22 Imre Horvath <[email protected]>:
> Hi all!
>
> I've tried to compile libgda with the mingw32 tools provided by fedora12
> (32bit). I've installed libgda-src from the fedora repo. If there's only
> the sqlite provider, with mignw32-configure and mingw32-make it compiled
> without any error.
> Then I've installed the postgresql-devel, for the postgres provider,
> mingw32-configure runs cleanly, at the end it says postgres = yes and
> sqlite(embedded) = yes, but the mingw32-make exited with an error:
>
> Making all in postgres
> make[2]: Entering directory
> `/home/warden/rpmbuild/SOURCES/libgda-4.0.5/providers/postgres'
> if /bin/sh ../../libtool --tag=CC --mode=compile i686-pc-mingw32-gcc
> -DPACKAGE_NAME=\"GNU\ Data\ Access\" -DPACKAGE_TARNAME=\"libgda\"
> -DPACKAGE_VERSION=\"4.0.5\" -DPACKAGE_STRING=\"GNU\ Data\ Access\ 4.0.5
> \" -DPACKAGE_BUGREPORT=\"[email protected]\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG_INT=4 -DSTDC_HEADERS=1
> -DLT_OBJDIR=\".libs/\" -DGETTEXT_PACKAGE=\"libgda-4.0\"
> -DHAVE_LOCALE_H=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1
> -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DUSING_MINGW=1 -DHAVE_POSTGRES=1 -I.
> -I.  -I../.. -I../../libgda -I../.. -mms-bitfields
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/lib/glib-2.0/include
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/libxml2
> -DLIBGDA_ABI_NAME=\"libgda-4.0\" -I/usr/include    -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4
> -mms-bitfields -MT gda-postgres-handler-bin.lo -MD -MP -MF
> ".deps/gda-postgres-handler-bin.Tpo" -c -o gda-postgres-handler-bin.lo
> gda-postgres-handler-bin.c; \
>        then mv -f ".deps/gda-postgres-handler-bin.Tpo"
> ".deps/gda-postgres-handler-bin.Plo"; else rm -f
> ".deps/gda-postgres-handler-bin.Tpo"; exit 1; fi
> libtool: compile:  i686-pc-mingw32-gcc "-DPACKAGE_NAME=\"GNU Data Access
> \"" -DPACKAGE_TARNAME=\"libgda\" -DPACKAGE_VERSION=\"4.0.5\"
> "-DPACKAGE_STRING=\"GNU Data Access 4.0.5\"" -DPACKAGE_BUGREPORT=
> \"[email protected]\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_UNSIGNED_INT=4
> -DSIZEOF_UNSIGNED_LONG_INT=4 -DSTDC_HEADERS=1 -DLT_OBJDIR=\".libs/\"
> -DGETTEXT_PACKAGE=\"libgda-4.0\" -DHAVE_LOCALE_H=1
> -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1
> -DENABLE_NLS=1 -DUSING_MINGW=1 -DHAVE_POSTGRES=1 -I. -I. -I../..
> -I../../libgda -I../.. -mms-bitfields
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/glib-2.0
> -I/usr/i686-pc-mingw32/sys-root/mingw/lib/glib-2.0/include
> -I/usr/i686-pc-mingw32/sys-root/mingw/include/libxml2 -DLIBGDA_ABI_NAME=
> \"libgda-4.0\" -I/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -MT
> gda-postgres-handler-bin.lo -MD -MP
> -MF .deps/gda-postgres-handler-bin.Tpo -c gda-postgres-handler-bin.c
> -DDLL_EXPORT -DPIC -o .libs/gda-postgres-handler-bin.o
> In file included from gda-postgres-handler-bin.c:24:
> /usr/include/string.h:359: error: nonnull argument with out-of-range
> operand number (argument 1, operand 3)
> In file included from /usr/include/string.h:635,
>                 from gda-postgres-handler-bin.c:24:
> /usr/include/bits/string2.h:1196:1: warning: "strtok_r" redefined
> In file included from ../../libgda/gda-data-handler.h:26,
>                 from gda-postgres-handler-bin.h:25,
>                 from gda-postgres-handler-bin.c:22:
> ../../libgda/gda-decl.h:117:1: warning: this is the location of the
> previous definition
> make[2]: *** [gda-postgres-handler-bin.lo] Error 1
> make[2]: Leaving directory
> `/home/warden/rpmbuild/SOURCES/libgda-4.0.5/providers/postgres'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/home/warden/rpmbuild/SOURCES/libgda-4.0.5/providers'
> make: *** [all-recursive] Error 1
>

I guess what's wrong is that you are trying to do some cross
compilation (with MinGW) but you have installed the Linux dev package
for PostgreSQL, and not the Windows ones (basically even if there was
no error with the includes, you'd get linking errors because MinGW
can't link a Linux .so to a Windows .DLL).

What you should do (what I do anyway) is download the PostgreSQL's
Windows binaries and dev files (as .zip or extracted from an
installer) and use the --with-postgres=/path/to/those/files with the
configure script. You can also download a tarball of what I
personnally use to do cross compilation at
http://www.gnome.org/~vivien/

>
> I want to compile libgdamm with mingw too, that's why i needed to
> compile libgda. (Maybe i can use the precompiled libgda win32 binaries,
> but it will be more easier to compile it with mingw32, and use with
> mingw32-pkg-config...)

You should be able to use the precompiled libgda libraries packaged as
ZIP files (at http://ftp.gnome.org/pub/GNOME/binaries/win32/libgda/)
to do your compilation and avoid compiling Libgda yourself (in the
same way you probably did not compile GLib).

Vivien
_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to