Re: pgxs/windows - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: pgxs/windows
Date
Msg-id 43CA755C.9030503@dunslane.net
Whole thread Raw
In response to pgxs/windows  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: pgxs/windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
SOme time ago I  wrote:

>... seems to be behaving oddly:
>
>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
>c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe:
>cannot find -lpostgres
>
>should we be pointing to the bin directory or the lib directory?
>
>ISTR we've seen something like this before.
>
>any thoughts?
>
>
>  
>

I think I've got to the bottom of this.

Makefiles.win32 contains this:

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


However, libpostgres.a isn't in $(DESTDIR)/$(bindir), it's in 
$(DESTDIR)/$(libdir) and when I make that change in the installed 
makefile my module builds happily.

My question is: if I make this change will anything else break? 
Alternatively, should we have both in this line? I see the cygwin 
makefile has a similar line. I haven't tried with cygwin because I am 
waiting for the upcoming cygwin release - my install is currently busted.

I also had to filter out -Wdeclaration-after-statement and 
-Wendif-labels from the CFLAGS, since they are not supported by my 
compiler. This is a bit of a PGXS gotcha, ISTM - we use the CFLAGS that 
were detected as valid on the original build machine rather than the 
current machine.

cheers

andrew


pgsql-hackers by date:

Previous
From: korry
Date:
Subject: Coding standards? Recommendations?
Next
From: James William Pye
Date:
Subject: Re: Coding standards? Recommendations?