The following bug has been logged online:
Bug reference: 5707
Logged by: Richard Evans
Email address: richard.evans@datanomic.com
PostgreSQL version: 9.0.1
Operating system: Linux (Fedora 12)
Description: Cross compilation for windows is broken
Details:
When cross compiling for Windows using a separate build area, libpq.dll does
not build because the .def file cannot be found.
This appears to be caused by these lines in Makefile.shlib:
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
# that. Else we build a temporary one here.
ifeq (,$(SHLIB_EXPORTS))
DLL_DEFFILE = lib$(NAME)dll.def
exports_file = $(DLL_DEFFILE)
$(exports_file): $(OBJS)
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^
else
DLL_DEFFILE = lib$(NAME)dll.def
endif
In Makefile.shlib from 8.4.5, the lines read:
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
# that. Else we build a temporary one here.
ifeq (,$(SHLIB_EXPORTS))
DLL_DEFFILE = lib$(NAME)dll.def
exports_file = $(DLL_DEFFILE)
$(exports_file): $(OBJS)
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^
else
DLL_DEFFILE = $(srcdir)/lib$(NAME)dll.def
endif
Note the reference fo ${srcdir). If Makefile.shlib in 9.0.1 is updated to
match this, the build succeeds.
The configure command was somethinglike:
~/misc/postgresql-9.0.1/configure --host=mingw32 --prefix=/tmp/pg9
--without-zlib