|
From: Duncan M. <dwm...@gm...> - 2007-08-30 03:11:21
|
I couldn't get make test to work - it seemed to hang on: make check-TESTS make[2]: Entering directory `/home/Test/libdbi-drivers/tests' But to even get that far I had to alter the test_dbi.c (since MinGW has no sleep function). See attached patch On 8/29/07, Duncan McQueen <dwm...@gm...> wrote: > I took a look at the README.w32 file - the procedure is the same for > MinGW - just that you need to use MSYS to compile the drivers. > > This section is NOT applicable to the MinGW version: > > Once libdbi is compiled for Win32 and you have a DLL, you can use that > DLL like any other. The only requirement is that the cygwin runtime > DLL is available on the target machine also, since non-Windows API > functions are implemented by cygwin. > > > > > > On 8/29/07, Duncan McQueen <dwm...@gm...> wrote: > > > > > > It is certainly something to brag about. The more platforms we cover, > > > the closer we get to world domination :-) > > > > > > I've made only a few changes to the patch. First, I've noticed that > > > Makefile.w32 erroneously used -ldbi twice in the XY_LIBS definitions, > > > and I've also removed the second one from the SQLITE3_LIBS definition > > > that your patch added. Second, I've changed the definition of > > > _POSIX_PATH_MAX to 256. I inserted 512 off the top of my head, but > > > limits.h on FreeBSD uses 256 which is more likely to be correct. > > > > > > > Sounds good to me. I was hacking at that Makefile to get it to work > > > > > Just to make sure I understand what you're doing. Is it exactly the > > > same procedure to build Win32 DLLs using MinGW as it is on Cygwin? In > > > that case I'd like to change a few comments in the Makefiles, readmes, > > > and other docs which now only talk about Cygwin. > > > > Yes, it is the same procedure - at least close. Under MinGW you must > > use MSYS (if you use the Makefile.w32) as compare dot the Cygwin > > shell. Benefit is - not dependencies on some cygwin dll for runtime. > > > > > > > > Finally, did you try and run "make check"? It'll ask you for a > > > particular driver and then run a couple of tests with this database > > > engine. Could you please send me the outputs of this command for each > > > database engine you use, just to make sure everything works as > > > intended? > > > > > > > I will run a make check on each one. I have used the resulting dlls > > for each of the three (postgresql, mysql and sqlite3) in a basic > > application with success. But I can send you the results of a make > > check. > > > > > regards, > > > Markus > > > > > > > > > > > > > > On 8/28/07, Duncan McQueen <dwm...@gm...> wrote: > > > > > On 8/28/07, Markus Hoenicka <mar...@mh...> wrote: > > > > > > Quoting Duncan McQueen <dwm...@gm...>: > > > > > > > > > > > > > Part of the problem may be I am compiling using GCC 4.2.1 - and > > > > > > > excessive warning messages seem to be the norm there. My dbd.h is > > > > > > > from CVS as of two days ago. > > > > > > > > > > > > > > > > > > > In that case it might help to manually cast the int variable to const > > > > > > int, like this: > > > > > > > > > > > > _dbd_internal_error_handler(conn, "could not open database", (const > > > > > > int) sqlite3_errcode); > > > > > > > > > > > > Does your GCC like this better? > > > > > > > > > > > > > > > > > > > > > > I will check tonight on both of these. > > > > > > > > > > > > I will look on the POSIX_PATH_MATH and try to add it. I know I have > > > > > > > seen other source where it was defined as you mentioned. > > > > > > > > > > > > > >> ifndef _POSIX_PATH_MAX > > > > > > >> #define _POSIX_PATH_MAX 512 > > > > > > >> endif > > > > > > >> > > > > > > > > > > > > This should of course read: > > > > > > > > > > > > #ifndef _POSIX_PATH_MAX > > > > > > #define _POSIX_PATH_MAX 512 > > > > > > #endif > > > > > > > > > > > > regards, > > > > > > Markus > > > > > > > > > > > > -- > > > > > > Markus Hoenicka > > > > > > mar...@ca... > > > > > > (Spam-protected email: replace the quadrupeds with "mhoenicka") > > > > > > http://www.mhoenicka.de > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > > > Still grepping through log files to find problems? Stop. > > > > > > Now Search log events and configuration files using AJAX and a browser. > > > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > > > _______________________________________________ > > > > > > libdbi-devel mailing list > > > > > > lib...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/libdbi-devel > > > > > > > > > > > > > > > Index: Makefile.w32 > > > > =================================================================== > > > > RCS file: /cvsroot/libdbi-drivers/libdbi-drivers/Makefile.w32,v > > > > retrieving revision 1.8 > > > > diff -u -w -b -i -p -r1.8 Makefile.w32 > > > > --- Makefile.w32 21 Nov 2005 21:18:15 -0000 1.8 > > > > +++ Makefile.w32 29 Aug 2007 01:57:01 -0000 > > > > @@ -39,19 +39,22 @@ MSQL_LIBS = -L /usr/local/lib -L /usr/lo > > > > MYSQL_LIBS = -L /usr/local/lib -ldbi -lmysqlclient -liberty -lz > > > > PGSQL_LIBS = -L /usr/local/lib -ldbi -ldbi -lpq -liberty > > > > SQLITE_LIBS = -L /usr/local/lib -ldbi -ldbi -lsqlite -liberty > > > > +SQLITE3_LIBS = -L /usr/local/lib -ldbi -ldbi -lsqlite3 -liberty > > > > driverdir = ${exec_prefix}/lib/dbd > > > > > > > > LIBMSQL_DLL_NAME = libdbdmsql.dll > > > > LIBMYSQL_DLL_NAME = libdbdmysql.dll > > > > LIBPGSQL_DLL_NAME = libdbdpgsql.dll > > > > LIBSQLITE_DLL_NAME = libdbdsqlite.dll > > > > +LIBSQLITE3_DLL_NAME = libdbdsqlite3.dll > > > > > > > > LIBMSQL_DLL_EXP_LIB = libdbdmsql.dll.a > > > > LIBMYSQL_DLL_EXP_LIB = libdbdmysql.dll.a > > > > LIBPGSQL_DLL_EXP_LIB = libdbdpgsql.dll.a > > > > LIBSQLITE_DLL_EXP_LIB = libdbdsqlite.dll.a > > > > +LIBSQLITE3_DLL_EXP_LIB = libdbdsqlite3.dll.a > > > > > > > > -all: libmysql-dll libpgsql-dll libsqlite-dll libmsql-dll > > > > +all: libmysql-dll libpgsql-dll libsqlite-dll libsqlite3-dll libmsql-dll > > > > > > > > libmsql-dll: $(top_srcdir)/drivers/msql/dbd_msql.o > > > > $(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_EXP_LIB) -o $(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_NAME) -L$(top_srcdir)/src/.libs $(LDFLAGS) $(top_srcdir)/drivers/msql/*.o $(MSQL_LIBS) > > > > @@ -65,7 +68,10 @@ libpgsql-dll: $(top_srcdir)/drivers/pgsq > > > > libsqlite-dll: $(top_srcdir)/drivers/sqlite/dbd_sqlite.o > > > > $(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_EXP_LIB) -o $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_NAME) $(LDFLAGS) $(top_srcdir)/drivers/sqlite/*.o $(SQLITE_LIBS) > > > > > > > > -install: install-libmysql install-libpgsql install-libsqlite install-libmsql > > > > +libsqlite3-dll: $(top_srcdir)/drivers/sqlite3/dbd_sqlite3.o > > > > + $(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_EXP_LIB) -o $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_NAME) $(LDFLAGS) $(top_srcdir)/drivers/sqlite3/*.o $(SQLITE3_LIBS) > > > > + > > > > +install: install-libmysql install-libpgsql install-libsqlite install-libsqlite3 install-libmsql > > > > > > > > install-libmsql: > > > > cp $(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_NAME) $(driverdir) && \ > > > > @@ -83,8 +89,13 @@ install-libsqlite: > > > > cp $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_NAME) $(driverdir) && \ > > > > cp $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_EXP_LIB) $(driverdir) > > > > > > > > +install-libsqlite3: > > > > + cp $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_NAME) $(driverdir) && \ > > > > + cp $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_EXP_LIB) $(driverdir) > > > > + > > > > + > > > > > > > > -.PHONY: libdbdmysql.dll libdbdpgsql.dll libdbdsqlite.dll libdbdmsql.dll install install-libmysql install-libpgsql install-libsqlite > > > > +.PHONY: libdbdmysql.dll libdbdpgsql.dll libdbdsqlite.dll libdbdsqlite3.dll libdbdmsql.dll install install-libmysql install-libpgsql install-libsqlite install-libsqlite3 > > > > > > > > > > > > # Tell versions [3.59,3.63) of GNU make to not export all variables. > > > > cvs diff: Diffing debian > > > > cvs diff: Diffing doc > > > > cvs diff: Diffing doc/include > > > > cvs diff: Diffing drivers > > > > cvs diff: Diffing drivers/firebird > > > > cvs diff: Diffing drivers/freetds > > > > cvs diff: Diffing drivers/ingres > > > > cvs diff: Diffing drivers/msql > > > > cvs diff: Diffing drivers/mysql > > > > cvs diff: Diffing drivers/oracle > > > > cvs diff: Diffing drivers/pgsql > > > > cvs diff: Diffing drivers/sqlite > > > > cvs diff: Diffing drivers/sqlite3 > > > > Index: drivers/sqlite3/dbd_sqlite3.c > > > > =================================================================== > > > > RCS file: /cvsroot/libdbi-drivers/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c,v > > > > retrieving revision 1.15 > > > > diff -u -w -b -i -p -r1.15 dbd_sqlite3.c > > > > --- drivers/sqlite3/dbd_sqlite3.c 20 Feb 2007 00:00:25 -0000 1.15 > > > > +++ drivers/sqlite3/dbd_sqlite3.c 29 Aug 2007 01:41:51 -0000 > > > > @@ -204,11 +204,11 @@ int _real_dbd_connect(dbi_conn_t *conn, > > > > access rights or an existing database is corrupted or created > > > > with an incompatible version */ > > > > if (sq_errmsg) { > > > > - _dbd_internal_error_handler(conn, sq_errmsg, sqlite3_errcode); > > > > + _dbd_internal_error_handler(conn, sq_errmsg, (const int) sqlite3_errcode); > > > > free(sq_errmsg); > > > > } > > > > else { > > > > - _dbd_internal_error_handler(conn, "could not open database", sqlite3_errcode); > > > > + _dbd_internal_error_handler(conn, "could not open database", (const int) sqlite3_errcode); > > > > } > > > > return -1; > > > > } > > > > @@ -408,7 +408,7 @@ dbi_result_t *dbd_list_dbs(dbi_conn_t *c > > > > } > > > > > > > > if (sq_errmsg) { > > > > - _dbd_internal_error_handler(conn, sq_errmsg, retval); > > > > + _dbd_internal_error_handler(conn, sq_errmsg, (const int) retval); > > > > free(sq_errmsg); > > > > break; > > > > } > > > > Index: drivers/sqlite3/dbd_sqlite3.h > > > > =================================================================== > > > > RCS file: /cvsroot/libdbi-drivers/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.h,v > > > > retrieving revision 1.1 > > > > diff -u -w -b -i -p -r1.1 dbd_sqlite3.h > > > > --- drivers/sqlite3/dbd_sqlite3.h 29 Apr 2005 20:42:39 -0000 1.1 > > > > +++ drivers/sqlite3/dbd_sqlite3.h 29 Aug 2007 01:39:41 -0000 > > > > @@ -33,6 +33,10 @@ enum enum_field_types { FIELD_TYPE_DECIM > > > > other systems use limits like 32 (PostgreSQL) and 64 (MySQL) */ > > > > #define MAX_IDENT_LENGTH 128 > > > > > > > > +#ifndef _POSIX_PATH_MAX > > > > > > > +#define _POSIX_PATH_MAX 512 > > > > +#endif > > > > + > > > > #define SQLITE3_RESERVED_WORDS { \ > > > > "ACTION", \ > > > > "ADD", \ > > > -- > > > Markus Hoenicka > > > mar...@ca... > > > (Spam-protected email: replace the quadrupeds with "mhoenicka") > > > http://www.mhoenicka.de > > > > > > > > > |