pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Evans <richard.evans@datanomic.com>
To: pgsql-bugs@postgresql.org
Subject: BUG #5707: Cross compilation for windows is broken
Date: Tue, 12 Oct 2010 15:48:45 GMT
Message-ID: <201010121548.o9CFmjPa038535@wwwmaster.postgresql.org> (raw)


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



view thread (7+ messages)  latest in thread

Message-ID: <201010121548.o9CFmjPa038535@wwwmaster.postgresql.org>
Permalink:  ../201010121548.o9CFmjPa038535@wwwmaster.postgresql.org/
Also on:    postgresql.org/message-id/201010121548.o9CFmjPa038535@wwwmaster.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: richard.evans@datanomic.com
  Subject: Re: BUG #5707: Cross compilation for windows is broken
  In-Reply-To: <201010121548.o9CFmjPa038535@wwwmaster.postgresql.org>
  References: <201010121548.o9CFmjPa038535@wwwmaster.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox