Samba4 on Windows

Dan Shearer dan at shearer.org
Fri Sep 14 18:53:34 GMT 2007


On Fri, Sep 14, 2007 at 08:13:31PM +0200, Jelmer Vernooij wrote:

> Am Freitag, den 14.09.2007, 21:02 +0930 schrieb Dan Shearer:
> > Samba4 will compile under Cygwin (no, Cygwin is not ideal) without
> > modification, but also without shared library support. It just works.
> Wow, that's really surprising! What is blocking the shared library
> support?

Not much any more, just getting the filenames right so that "make
install" works. For example:

Linking bin/shared/libshare.DLL.0.0.1
param/share_ldb.o:share_ldb.c:(.text+0x7b): undefined reference to
`_system_session'
param/share_ldb.o:share_ldb.c:(.text+0xbf): undefined reference to
`_ldb_wrap_connect

I'm pretty sure the DLL

A DLL is very much not a shared library in the Unix sense. Last time I
was involved in one of these the differences were so great that we went
native instead. This time around Cygwin and MinWG are quite smart about
this.

If Samba used libtool there would be no problem, and all three of the 
somewhat different cases of Cyg/Min/ are automatically catered for. There's
a macro AC_LIBTOOL_WIN32_DLL that tells libtool to do it's stuff. I'm
trying to understand what libtool does right now. That's what two solid
reference packages (OpenLDAP and non-Lorikeet Heimdal) use.

We *really* want MSYS not Cygwin, however I thought I might as well do
it as a reference port. MSYS is more of a fiddle to set up at the
moment, you have to bootstrap the environment from the snapshot release
because of the version of autoconf that Samba wants as I discovered
today :-)

> > I'm looking at shared library support, but just for the record the instructions
> > are attached.
> What about mingw32 from Linux ? It would be nice if we could check
> whether compiling Windows binaries works from POSIX. 

Yes, cross-compiling is specifically supported and again libtool knows
about it. Ideally I'd like the Samba binary generating farm we don't
have to emit Windows binaries as well. 

-- 
Dan Shearer
dan at shearer.org


More information about the samba-technical mailing list