pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #5707: Cross compilation for windows is broken
7+ messages / 4 participants
[nested] [flat]

* BUG #5707: Cross compilation for windows is broken
@ 2010-10-12 15:48  Richard Evans <richard.evans@datanomic.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Richard Evans @ 2010-10-12 15:48 UTC (permalink / raw)
  To: pgsql-bugs


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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2010-10-12 18:25  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Richard Evans <richard.evans@datanomic.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Alvaro Herrera @ 2010-10-12 18:25 UTC (permalink / raw)
  To: Richard Evans <richard.evans@datanomic.com>; +Cc: pgsql-bugs

Excerpts from Richard Evans's message of mar oct 12 12:48:45 -0300 2010:

> 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:

Hmm, apparently this was made to work here:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=26af72b4

and subsequently broken later:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=234c7ce9

I think the real fix is to make the DEF files be generated in the
builddir, to complete the intention of the latter patch.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2010-10-29 16:23  Robert Haas <robertmhaas@gmail.com>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2010-10-29 16:23 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Richard Evans <richard.evans@datanomic.com>; pgsql-bugs

On Tue, Oct 12, 2010 at 2:25 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Excerpts from Richard Evans's message of mar oct 12 12:48:45 -0300 2010:
>
>> 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:
>
> Hmm, apparently this was made to work here:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=26af72b4
>
> and subsequently broken later:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=234c7ce9
>
> I think the real fix is to make the DEF files be generated in the
> builddir, to complete the intention of the latter patch.

Is anyone working on that?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2010-10-29 21:08  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Alvaro Herrera @ 2010-10-29 21:08 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: Richard Evans <richard.evans@datanomic.com>; pgsql-bugs

Excerpts from Robert Haas's message of vie oct 29 13:23:39 -0300 2010:
> On Tue, Oct 12, 2010 at 2:25 PM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > Excerpts from Richard Evans's message of mar oct 12 12:48:45 -0300 2010:
> >
> >> 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:
> >
> > Hmm, apparently this was made to work here:
> > http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=26af72b4
> >
> > and subsequently broken later:
> > http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=234c7ce9
> >
> > I think the real fix is to make the DEF files be generated in the
> > builddir, to complete the intention of the latter patch.
> 
> Is anyone working on that?

Not me.  I tried, but mingw32-gcc doesn't work out of the box for me,
because configure is not testing for the right accept() arguments.
That's what I can do with the time I can dedicate to a problem like this
right now (i.e. not much).

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2011-02-26 07:14  Bruce Momjian <bruce@momjian.us>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Bruce Momjian @ 2011-02-26 07:14 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Robert Haas <robertmhaas@gmail.com>; Richard Evans <richard.evans@datanomic.com>; pgsql-bugs


Has this been addressed?

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Excerpts from Robert Haas's message of vie oct 29 13:23:39 -0300 2010:
> > On Tue, Oct 12, 2010 at 2:25 PM, Alvaro Herrera
> > <alvherre@commandprompt.com> wrote:
> > > Excerpts from Richard Evans's message of mar oct 12 12:48:45 -0300 2010:
> > >
> > >> 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:
> > >
> > > Hmm, apparently this was made to work here:
> > > http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=26af72b4
> > >
> > > and subsequently broken later:
> > > http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=234c7ce9
> > >
> > > I think the real fix is to make the DEF files be generated in the
> > > builddir, to complete the intention of the latter patch.
> > 
> > Is anyone working on that?
> 
> Not me.  I tried, but mingw32-gcc doesn't work out of the box for me,
> because configure is not testing for the right accept() arguments.
> That's what I can do with the time I can dedicate to a problem like this
> right now (i.e. not much).
> 
> -- 
> Álvaro Herrera <alvherre@commandprompt.com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2011-03-03 15:40  Robert Haas <robertmhaas@gmail.com>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Robert Haas @ 2011-03-03 15:40 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Richard Evans <richard.evans@datanomic.com>; pgsql-bugs

On Sat, Feb 26, 2011 at 2:14 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Has this been addressed?

Not me.  Sounds like no one cares enough to figure out how to do this.
 Perhaps this should be a TODO.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: BUG #5707: Cross compilation for windows is broken
@ 2011-03-10 03:49  Bruce Momjian <bruce@momjian.us>
  parent: Robert Haas <robertmhaas@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2011-03-10 03:49 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: Alvaro Herrera <alvherre@commandprompt.com>; Richard Evans <richard.evans@datanomic.com>; pgsql-bugs

Robert Haas wrote:
> On Sat, Feb 26, 2011 at 2:14 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > Has this been addressed?
> 
> Not me.  Sounds like no one cares enough to figure out how to do this.
>  Perhaps this should be a TODO.

Agreed.  TODO added:

	Fix cross-compiling on Windows
	
	    * http://archives.postgresql.org/pgsql-bugs/2010-10/msg00110.php 

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2011-03-10 03:49 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 15:48 BUG #5707: Cross compilation for windows is broken Richard Evans <richard.evans@datanomic.com>
2010-10-12 18:25 ` Alvaro Herrera <alvherre@commandprompt.com>
2010-10-29 16:23   ` Robert Haas <robertmhaas@gmail.com>
2010-10-29 21:08     ` Alvaro Herrera <alvherre@commandprompt.com>
2011-02-26 07:14       ` Bruce Momjian <bruce@momjian.us>
2011-03-03 15:40         ` Robert Haas <robertmhaas@gmail.com>
2011-03-10 03:49           ` Bruce Momjian <bruce@momjian.us>

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