Re: Problems using pgxs on Win32

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: 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:07:33
Message-ID: thhal-0mrFhAknk3kA5aAHi9b3giY/sUqmDo5@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Fabien,
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. I started another thread that was not win32 related
also with the subject "Problems with pgxs" that I relate to here as well.

>>... the directory "include/port/win32" is not present in the PostgreSQL
>>binary installation. Without it, it's not possible to compile on win32.
>
> Indeed, this directory is not installed by the "install" target.
>
> If it is really needed, it is no big deal.

It's needed alright. It contains files included from c.h which in turn
is included from postgres.h.

> However if done so, it should
> be under "include/server/port/win32/", not "include/port/win32", but this
> should be taken care of by some macro, I guess.
>
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
...

> You can try to copy by hand the directory into include/server/port/ of
> your installation, and check whether it is the only issue.
>
Next problem is that the all-lib target is wrong (see other thread). I
can get around that by changing my local makefile and instead of the
recommended:

all: all-lib

use:

all: $(shlib)

Final issue is BE_DLLLIBS in Makefile.port. It's defined as:

BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres

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:

ifdef PGXS
BE_DLLLIBS= -lpostgres
else
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
endif

and everything build OK.

Regards,
Thomas Hallgren

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-11-01 11:29:03 Re: Problems using pgxs on Win32
Previous Message Fabien COELHO 2004-11-01 08:42:57 Re: Problems using pgxs on Win32

Browse pgsql-patches by date

  From Date Subject
Next Message Fabien COELHO 2004-11-01 11:29:03 Re: Problems using pgxs on Win32
Previous Message Zhenbang Wei 2004-11-01 10:09:54 Update 5 zh_TW files for 8.0