error compiling postgresql with fedora mingw

Jon Burgess jburgess777 at googlemail.com
Tue Nov 25 19:42:44 UTC 2008


On Tue, 2008-11-25 at 14:19 -0500, Tom Lane wrote:
> Jon Burgess <jburgess777 at googlemail.com> writes:
> > I think the problem with the .a above is due to the default 'ar' failing
> > to process the Windows style object symbols.
> 
> > I managed to build PostgreSQL a couple of weeks back with MinGW on F9. I
> > had to override a few of the default tools, e.g.
> 
> > $ make AR=i686-pc-mingw32-ar DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool
> > DLLWRAP=i686-pc-mingw32-dllwrap
> 
> That makes sense.  Could you have simplified matters by just prepending
> /usr/i686-pc-mingw32/bin to your PATH?

That seems to work OK but you still need the
DLLTOOL=/usr/i686-pc-mingw32/bin/dlltool

I forgot to mention that some of the Makefiles have hard coded
references to windres which need replacing
with /usr/bin/i686-pc-mingw32-windres

> > I also needed some tweaks to make it use i686-pc-mingw32-windres
> > and to execute the compiled "zic.exe" instead of just "./zic" (though in
> > the end I just skipped the whole timezone installation).
> 
> Agreed on skipping the timezone installation --- if you have
> /usr/share/zoneinfo that's being kept reasonably up2date then it's
> better to use that.
> 
> > I also ran into
> > a problem with a missing definition of UNICODE_STRING.
> 
> UNICODE_STRING?  I don't see anything like that in the Postgres sources.

The problem looked like it was in the MinGW header files. Some PG code
was pulling in sspi.h which includes the line:

typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;

I tweked a few things to #include <ntdef.h> which fixed it but I'm not
sure this is the right fix. The subauth.h headers file addresses this by
having an alternate definition of UNICODE_STRING which with an #ifdef
wrapper.

  Jon





More information about the devel mailing list