← Back to team overview

drizzle-discuss team mailing list archive

Re: Drizzle on MS windows

 

On 07/17/2010 01:15 PM, Jobin Augustine wrote:
> Was trying for a native compilation of libdrizzle without Cygwin1.dll
> but could not make much progress because of same simple reasons you were
> discussing.
> (no header and lib available)
> 
> libdrizzle looks very very light weight.
> I am affraid, any move for compatiblity may result more heavy library.
> and code is C. so boost?
> 
> cygwin1.dll is currently 2mb size. shipping it along with libdrizzle is
> not much sense.
> (and associated penalties)
> 
> scratching..
> do we need to complicate / fork the code base for M$

I had some work done in the libdrizzle code which had it almost
compiling natively with mingw. The only part that didn't work was the
poll() call, which doesn't exist on Windows. I think a single ifdef
around poll() to use WSAPoll instead on windows isn't terrible. Other
than that, there were a few places where we need to #include <windows.h>

I'm not worried about linking cygwin.dll. I see cygwin as mainly a
source-target for people already using cygwin... not really as a way to
ship a binary version of libdrizzle.

But check out lp:~mordred/libdrizzle/mingwport

It doesn't work yet, but gives you an idea of where I was going. You can
either do it in a mingw setup on windows, or you can cross-compile on
linux (if you have mingw and mingw-pthreads installed) by doing:

./configure --build=x86_64-unknown-linux-gnu --host=i586-mingw32msvc

Monty

> Thank you,
> Jobin.
> 
> On Sat, Jul 17, 2010 at 8:29 PM, Monty Taylor <mordred@xxxxxxxxxxxx
> <mailto:mordred@xxxxxxxxxxxx>> wrote:
> 
>     On 07/16/2010 07:57 PM, Stewart Smith wrote:
>     > On Wed, 14 Jul 2010 08:10:44 -0500, Monty Taylor
>     <mordred@xxxxxxxxxxxx <mailto:mordred@xxxxxxxxxxxx>> wrote:
>     >> Depends on how large of a task you want...
>     >>
>     >> the MinGW port will be a very large undertaking, because you'll
>     need to
>     >> fix networking code in libdrizzle, and then you'll need to
>     actually port
>     >> drizzle to Windows. (1 and 3 are actually essentially the same
>     amount of
>     >> work - there are like, 3 things you'll need to fix in the build
>     scripts
>     >> to get 3 to work)
> 
>     The libdrizzle thing that needs fixed is just the select/poll thing.
>     Shouldn't be a big patch... just needs to get done.
> 
>     > If you rewrite something like the my_socket abstraction that I did for
>     > NDB win32 port, socket code should be pretty easy.
> 
>     I would strongly prefer it if we would not have any wrappers such as
>     this. (although I understand that in the case of NDB and MySQL it was
>     required)
> 
>     We will not support any Windows before Windows 7 or Windows Server 2008.
> 
>     If, for some reason, we cannot port to windows without compatibility,
>     then we can put more code into gnulib/ and provide linux compat for the
>     windows build. Alternately, we can use the boost socket compat lib
>     that's in boost::asio (I believe we can use it directly without using
>     the rest of boost::asio)
> 
>     Essentially, any time we have the urge to write a my_ anything, we
>     should not.
> 
>     Monty
> 
> 




Follow ups

References