[postgis-users] Problems building postgis using cygwin

Yewondwossen Assefa assefa at dmsolutions.ca
Thu Jan 9 13:24:10 PST 2003


Hi There,

I am trying to compile postgis using cygwin but I get some errors with
the dllwrap command . I have followed the NON-UNIX User's guide as well
as some hints that I found in the mailing list archive (specially the
last thread on the same subject between Norman Vine  and Klaus Benndorf
).

 Configuraion :
  - postgresql 7.3.1
 - postgis 0.7.3

 The steps I have done are :

  1) in the postgres root dir
  - apply the patch : postgresql-7.2.3-gcc3.patch to
src/Makefiles/Makefile.win and src/template/win (attached here)
  - add  extern DLLIMPORT double cpu_index_tuple_cost in
src/include/optimizer/cost.h
  - run LDFLAGS=-L/usr/local/lib ./configure --enable-multibyte
--with-CXX --prefix=/usr --sysconfdir=/etc
                           --docdir=/usr/doc/postgresql-$version
  -  make

 2) in postgis

  - make


 The errors that I get are the following :

dlltool --export-all --output-def postgis.def postgis_debug.o
postgis_ops.o post
gis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o
postgis_transform.o postg
is_gist_72.o
dllwrap -o postgis.dll --dllname postgis.dll --def postgis.def
postgis_debug.o p
ostgis_ops.o postgis_fn.o postgis_inout.o postgis_proj.o postgis_chip.o
postgis_
transform.o postgis_gist_72.o ../../src/utils/dllinit.o -L/usr/local/lib
-L/usr/
local/lib -L/usr/local/lib -L/usr/local/lib
postgis_debug.o(.text+0x2e0): In function `mem_size':
/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/postgis_debug.c:101:
undefined r
eference to `_pg_detoast_datum'
postgis_debug.o(.text+0x310): In function `numb_sub_objs':
/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/postgis_debug.c:110:
undefined r
eference to `_pg_detoast_datum'
postgis_debug.o(.text+0x40d): In function `summary':
/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/postgis_debug.c:119:
undefined r
eference to `_pg_detoast_datum'
postgis_debug.o(.text+0x418):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:132: undefined reference to `__imp__CurrentMemoryContext'
postgis_debug.o(.text+0x430):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:132: undefined reference to `_MemoryContextAlloc'
postgis_debug.o(.text+0x49e):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:180: undefined reference to `__imp__CurrentMemoryContext'
postgis_debug.o(.text+0x4af):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:180: undefined reference to `_MemoryContextAlloc'
postgis_debug.o(.text+0x4e1):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:183: undefined reference to `_pfree'
postgis_debug.o(.text+0x52e):/usr/src/postgresql-7.3-1/contrib/postgis-0.7.3/pos

tgis_debug.c:168: undefined reference to `_repalloc'
 ....


I have tried to modify the dllwrap command execution by adding manually
-L../../src/backend -lpostgres  but It did not change anything.

Any hints would be appreciated.


Thanks,





--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

-------------- next part --------------
# $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

override javadir := '$(shell cygpath -w $(javadir))'

sqlmansect = 7
-------------- next part --------------
CFLAGS=-O2
SRCH_LIB=/usr/local/lib
LIBS=-lcygipc


More information about the postgis-users mailing list