Re: Problems using pgxs on Win32 - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Problems using pgxs on Win32
Date
Msg-id Pine.LNX.4.61.0411011313290.1285@sablons.cri.ensmp.fr
Whole thread Raw
In response to Problems using pgxs on Win32  (Thomas Hallgren <thhal@mailblocks.com>)
Responses Re: Problems using pgxs on Win32  (Thomas Hallgren <thhal@mailblocks.com>)
List pgsql-hackers
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@cri.ensmp.fr


pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: Problems using pgxs on Win32
Next
From: Thomas Hallgren
Date:
Subject: Re: Problems using pgxs on Win32