Re: pgxs/windows

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgxs/windows
Date: 2006-01-19 04:48:09
Message-ID: 200601190448.k0J4m9027872@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:
> Andrew Dunstan wrote:
> >
> >
> > Bruce Momjian wrote:
> >
> > >
> > >Could this be related to the fact that pre-8.2 makefiles were not
> > >space-safe? I am unsure how pgxs worked on Win32 without being
> > >space-safe.
> > >
> > >
> > >
> >
> > I don't see how. In fact, pgxs seems to use short form paths anyway.
> > Example (from previous email):
> >
> > > dllwrap -o rainbow.dll --def rainbow.def rainbow.o
> > > c:/PROGRA~1/POSTGR~1/8.1/lib/pgxs/src/MAKEFI~1/../../src/utils/dllinit.o
> > > -Lc:/PROGRA~1/POSTGR~1/8.1/bin -lpostgres
> >
> >
> > No spaces there. The problem is it says "bin" instead of "lib" before
> > "-lpostgres".
>
> OK, thanks. Next question --- are the installed file locations the same
> for a MinGW install and a pginstaller install? I don't think
> pginstaller does a MinGW install because it doesn't have the build
> environment in the tarball.
>
> However, the big difference seems to be that Magnus has -Llib and -Lbin,
> while you have only the -Lbin. I have MinGW and pginstaller installed
> here. How can I set things up to test this?

Now looking at the Makefile.global in the 8.1.2 pginstaller install, in
Makefile.global, $libdir is set in a pgxs-specific block:

libdir := $(shell pg_config --libdir)

and that seems to work:

C:\Program Files\PostgreSQL\8.1\bin>pg_config --libdir
C:/PROGRA~1/POSTGR~1/8.1/lib

and that is set to LDFLAGS, which is later propogated to SHLIB_LINK,
though SHLIB_LINK moves all the -L flags to the front, so what you see
on the link line is not the ordering used to create the value.

Andrew, can you try echoing $libdir and $SHLIB_LINK in the Makefile to
find those values?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-01-19 05:06:41 Re: Surrogate keys (Was: enums)
Previous Message Jim C. Nasby 2006-01-19 04:11:40 Re: suppress output for benchmarking

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2006-01-19 08:17:12 memset using long instead of int32
Previous Message Bruce Momjian 2006-01-19 03:03:33 Re: pgxs/windows