Hi guys,
There seems to be quite a laundry list of things which have to be 
patched or otherwise massaged in order to get a cygwin build. Did these 
get fixed before 7.3.2 rolled out the door?
Paul



-------- Original Message --------
Subject: [postgis-users] Postgis-0.7.4 + PSQL-7.3.1- installation
Date: Tue, 18 Feb 2003 15:58:35 +0100
From: Barbara Olga Kastelliz <e8925927@stud4.tuwien.ac.at>
Reply-To: e8925927@stud4.tuwien.ac.at,	PostGIS Users Discussion 
<postgis-users@postgis.refractions.net>
To: 'PostGIS Users Discussion' <postgis-users@postgis.refractions.net>

Hello,
I have recently installed postgresql-7.3.1 with postgis-0.7.4,
on Windows 2000. Many thanks to the archiv and the group.
what had to be done, can be found in the archiv, but in different mails.

1. file: pstgresql/src/include/optimizer/cost.h: DLLIMPORT has to be 
added in
line:
extern DLLIMPORT double cpu_index_tuple_cost

2. compiling of postgresql:
postgresql-7.2.3-gcc3.patch
applying the patch with the executable patch is not necessary, the files
	/usr/share/postgresql/src/makefiles/Makefile.win	and
	/usr/share/postgresql/src/template/win to
  have to look like that: (archiv, mail form Assefa Yewondwossen, Jan 9th,
2003):

# $Header: /cvsroot/pgsql-server/src/makefiles/Makefile.win,v 1.18 
2002/09/05
18:28:46 petere Exp $
LDFLAGS+= -g
DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLLIBS= -L/usr/local/lib -lcygipc -lcrypt
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
DLLINIT = $(top_builddir)/src/utils/dllinit.o
MK_NO_LORDER=true
MAKE_DLL=true
# linking with -lm or -lc causes program to crash
# (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
LIBS:=$(filter-out -lm -lc, $(LIBS))

AROPT = crs
DLSUFFIX = .dll
CFLAGS_SL =

%.dll: %.o
	$(DLLTOOL) --export-all --output-def $*.def $<
	$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(SHLIB_LINK)
	rm -f $*.def

ifneq (,$(findstring backend,$(subdir)))
ifeq (,$(findstring conversion_procs,$(subdir)))
override CPPFLAGS+= -DBUILDING_DLL
endif
endif

ifneq (,$(findstring ecpg/lib,$(subdir)))
override CPPFLAGS+= -DBUILDING_DLL
endif

# required by Python headers
ifneq (,$(findstring src/pl/plpython,$(subdir)))
override CPPFLAGS+= -DUSE_DL_IMPORT
endif



#file: /usr/share/postgresql/src/template/win:

CFLAGS=-O2
SRCH_LIB=/usr/local/lib
LIBS=-lcygipc



next: configuring postgresql with:

$ LDFLAGS=-L/usr/local/lib ./configure --enable-multibyte
--with-CXX --with-perl --prefix=/usr --sysconfdir=/etc
--docdir=/usr/doc/postgresql-$version

I have no idea, if --with-perl is necessary, but
without it, I was not able to compile postgresql because I got the Error,
not able to make executables.
to the /etc directory I added the folder postgresql, there I copied
libpostgis.a and libpostgres.a,
maybe it had no effect on the result?
$ make

3.) Postgis installation

in the postgis makefile this line had to be added:
SHLIB_LINK := $(LDFLAGS) ../../src/backend/libpostgres.a
makefile:
.........
#---------------------------------------------------------------
# Add libraries that libpq depends (or might depend) on into the
# shared library link.  (The order in which you list them here doesn't
# matter.)

# next line added
SHLIB_LINK := $(LDFLAGS) ../../src/backend/libpostgres.a
#---------------------------------------------------------------
....


$ make
$ make install

in the resulting file postgis.sql I had to replace:
$libdir/postgis.dll
with the absolute path to the postgis.dll file:
/usr/share/postgresql/contrib/postgis/postgis.dll
again I don't know wether this was because of a misconfiguration in my case,
or if this occurs more often, but it worked.

hope this will help somebody,
greetings,
barbara



_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



Tue, 18 Feb 2003 08:06:06 -0800
Paul Ramsey <pramsey@refractions.net>
[Fwd: [postgis-users] Postgis-0.7.4 + PSQL-7.3.1- installation]