Re: Problems using pgxs on Win32

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Problems using pgxs on Win32
Date: 2004-11-01 11:29:03
Message-ID: Pine.LNX.4.61.0411011313290.1285@sablons.cri.ensmp.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Dear Thomas,

> There's quite a few issues. Here's what I had to do in order to get my stuff
> working. I don't think it's any use for me to submit changes in form of a
> patch at this point since pgxs seems to be a bit on the drawing table still.

Well, it is supposed to work;-)

"pgxs" is just a reworking of the previous compilation infrastructure for
contribs so that it can be used outside of the main tree. So I don't feel
responsible for the actual dependency rules (say, whether all-lib make
sense), but I do feel responsible for the missing files, and the fixes
needed to adapt the infrastructure to the installation tree vs the source
tree.

> I started another thread that was not win32 related also with the
> subject "Problems with pgxs" that I relate to here as well.

Yep, I noticed.

> Yes, a special macro is needed for this, I made a change in Makefile.global
> (around line 176), like so:
>
> ifdef PGXS
> override CPPFLAGS := -I$(includedir_server)
> -I$(includedir_server)/port/win32 -I$(includedir_internal) $(CPPFLAGS)
> else # not PGXS
> ...

Why can't you #include "port/win32/some_file.h" which would (I think)
avoid the issue without adding a win32 specific -I to all architectures??
I'm not sure I'm happy if I see a win32 path when compiling under some
unix.

> Final issue is BE_DLLLIBS in Makefile.port. It's defined as:
>
> BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres

Argh.

> The src/backend is of course not present but what's worse, the libpostgres.a
> library is not included in the install. I copied it from src/backend into the
> <prefix>/lib directory and changed the Makefile.port to read:

It looks like another missing file.

It could be also installed into lib/pgxs/src/backend so that the previous
definition works, but If it is possible to install it in lib (that is
maintainers agreee about it), then it looks better.

I'll try to submit a patch this week.

--
Fabien Coelho - coelho(at)cri(dot)ensmp(dot)fr

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2004-11-01 12:40:12 Re: Problems using pgxs on Win32
Previous Message Thomas Hallgren 2004-11-01 11:07:33 Re: Problems using pgxs on Win32

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-01 12:17:35 Re: fix for Makefile.shlib multiply defined target
Previous Message Thomas Hallgren 2004-11-01 11:07:33 Re: Problems using pgxs on Win32