[postgis-users] undefined symbol: DirectFunctionCall2 ?

Greg Allensworth gregor at greeninfo.org
Tue Sep 27 13:09:04 PDT 2011


When trying to install PostGIS into a new database, or to upgrade it 
within an existing database, I am getting this error:

ERROR:  could not load library "/usr/lib/liblwgeom.so.1.3": 
/usr/lib/liblwgeom.so.1.3: undefined symbol: DirectFunctionCall2

Any ideas on what that error means? Google wasn't any help.

A little background: We had PostGIS 1.2 and needed 1.5, which meant 
upgrading PostgreSQL from 8.2 to 9.1 and then doing a PostGIS hard upgrade.

The large majority of the process works out just fine, so I can at least 
hobble along with the PostGIS functions I need. But these functions 
specifically (see below), generate that error.



CREATE FUNCTION asgml(geometry, integer, integer) RETURNS text
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_asGML'
     LANGUAGE c IMMUTABLE STRICT;


CREATE FUNCTION asukml(geometry, integer, integer) RETURNS text
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_asKML'
     LANGUAGE c IMMUTABLE STRICT;

CREATE FUNCTION st_asukml(geometry, integer, integer) RETURNS text
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_asKML'
     LANGUAGE c IMMUTABLE STRICT;




CREATE FUNCTION box2d_contain(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_contain'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_contained(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_contained'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_intersects(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_intersects'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_left(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_left'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_overlap(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_overlap'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_overleft(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_overleft'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_overright(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_overright'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_right(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_right'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION box2d_same(box2d, box2d) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'BOX2D_same'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION cache_bbox() RETURNS "trigger"
     AS '/usr/lib/liblwgeom.so.1.3', 'cache_bbox'
     LANGUAGE c;
CREATE FUNCTION collect_garray(geometry[]) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_collect_garray'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION collector(geometry, geometry) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_collect'
     LANGUAGE c IMMUTABLE;
CREATE FUNCTION geom_accum(geometry[], geometry) RETURNS geometry[]
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_accum'
     LANGUAGE c IMMUTABLE;
CREATE FUNCTION geosnoop(geometry) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'GEOSnoop'
     LANGUAGE c STRICT;
CREATE FUNCTION st_addbbox(geometry) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_addBBOX'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION st_dropbbox(geometry) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_dropBBOX'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION st_hasbbox(geometry) RETURNS boolean
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_hasBBOX'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION st_max_distance(geometry, geometry) RETURNS double precision
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_maxdistance2d_linestring'
     LANGUAGE c IMMUTABLE STRICT;
CREATE FUNCTION st_noop(geometry) RETURNS geometry
     AS '/usr/lib/liblwgeom.so.1.3', 'LWGEOM_noop'
     LANGUAGE c STRICT;



-- 
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+  ZCE-PHP
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org



More information about the postgis-users mailing list