[postgis-devel] Compile PostGIS on SLES9 based 64-bit

Silke Reimer Silke.Reimer at intevation.de
Tue Apr 25 09:15:48 PDT 2006


Hallo!

I came across a problem with the configuration of PostGIS during the
build process when I am working on a SLES9 based 64-bit
architecture. The problem is that the libdir in SLES9 is
$prefix/lib64 and not, as it is assumed for postgis configuration
$prefix/lib. (Perhaps this problem occurs on other systems on 64-bit
architectures as well, I don't know).

For my build process I just patched the Makefile in lwgeom (see patch below).
Of course this cannot be the general solution. I think the best
solution would be to:

- introduce a two variables called GEOS_LIBDIR and PROJ_LIBDIR
  that are defined in Makefile.config
- Default value for both variables should be GEOS_DIR/lib resp. PROJ_DIR/lib
- During configure GEOS_LIBDIR can be defined as the libpath that is
  given by geos-config --libs. This doesn't work for PROJ_LIBDIR
  since proj has not proj-config. Perhaps somebody has another good idea?

Many  greetings,

    Silke


---------- Patch to build postgis on SLES9, 64-bit ----------

--- postgis-1.1.2/lwgeom/Makefile.orig  2006-04-24 16:07:51.386277720 +0200
+++ postgis-1.1.2/lwgeom/Makefile       2006-04-24 15:16:15.441932800 +0200
@@ -43,12 +43,12 @@
                CSTAR_FLAGS += -I$(GEOS_DIR)/include
                GEOS_WRAPPER=
                JTS_OBJ=lwgeom_geos_c.o
-               SHLIB_LINK += -L$(GEOS_DIR)/lib -lgeos_c
+               SHLIB_LINK += -L$(GEOS_DIR)/lib64 -lgeos_c
        else
                CXXFLAGS += -I$(GEOS_DIR)/include
                GEOS_WRAPPER=lwgeom_geos_wrapper.o
                JTS_OBJ=lwgeom_geos.o
-               SHLIB_LINK += -lstdc++ -L$(GEOS_DIR)/lib -lgeos
+               SHLIB_LINK += -lstdc++ -L$(GEOS_DIR)/lib64 -lgeos
                GEOS_RULES=detect_geos_version
        endif
 endif
@@ -63,7 +63,7 @@

 ifeq ($(USE_PROJ),1)
        override CFLAGS += -I$(PROJ_DIR)/include -DUSE_PROJ
-       SHLIB_LINK += -L$(PROJ_DIR)/lib -lproj
+       SHLIB_LINK += -L$(PROJ_DIR)/lib64 -lproj
 endif

 override CFLAGS += $(PGBEINCLUDES) -DAUTOCACHE_BBOX=$(AUTOCACHE_BBOX)

----------------------------


-- 
Silke Reimer   : www.intevation.de/~silke | GISpatcher: www.gispatcher.de
Intevation GmbH: www.intevation.de        | Thuban    : thuban.intevation.org
Georgstr.4     : 49074 Osnabrück          | FreeGIS   : www.freegis.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20060425/c10590eb/attachment.sig>


More information about the postgis-devel mailing list