[postgis-users] Error installing PostGis

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri May 11 10:56:18 PDT 2007


On Fri, 2007-05-11 at 11:13 -0300, postgreadm at ibge.gov.br wrote:
> 
> Hi everybody, I'm still looking for help !!!  
> 
> Since then I've found this explanation in an IBM's manual
> (http://www-306.ibm.com/software/htp/tpf/pages/gtpm1mst.pdf): 
> 
> Relocation error Problem: I received error message relocation
> truncated to fit :.  
> 
> Solution: This is actually a binutils error, but the error occurs when
> you make a call to tpf-gcc and specify the -shared command or the -or
> command, or both, to tell the compiler to make a call to the linker.
> This error is caused when your global offset table (GOT) size has
> exceeded 512 entries. When the GOT has reached this size, you must use
> the -fPIC option instead of the -fpic option when compiling your code.
> You must add the -fPIC option to the makefile for your library in all
> the correct areas because all source code in the shared object must
> have this option. You can mix and match the -fpic and -fPIC when your
> GOT contains fewer than 512 entries is allowed. However, you cannot
> mix and match these options when the GOT has 512 entries or more. 
> 
> It seems that make is using both options but I've found only the
> string "-fPIC" in files of /postgresql-8.1.4/contrib/postgis-1.0.6
> directory (using grep command).  
> 
> Could the option -fpic be a default value of a gcc parameter? How can
> I check or clear the content of  "global offset table"? 
> 
> lxpgtst:~/postgresql-8.1.4/contrib/postgis-1.0.6 # make 
> make -C lwgeom 
> make[1]: Entering directory
> `/root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom' 
> sh ../geos_version.sh /usr/local > postgis_geos_version.h 
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wendif-labels -fno-strict-aliasing -DUSE_VERSION=81
> -DPOSTGIS_LIB_VERSION='"1.0.6"' -DPOSTGIS_SCRIPTS_VERSION='"0.3.0"'
> -DPOSTGIS_BUILD_DATE='"2007-04-18 15:21:16"' -I/usr/local/include
> -DUSE_PROJ  -I/usr/local/include -DAUTOCACHE_BBOX=1  -g -O2 -fPIC
> -fexceptions -DUSE_GEOS -DUSE_STATS -fpic -shared
> -Wl,-soname,liblwgeom.so.1  measures.o box2d.o ptarray.o lwgeom_api.o
> lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o
> lwcollection.o lwgeom_geos_wrapper.o  wktunparse.o lwgparse.o
> wktparse.tab.o lex.yy.o vsprintf.o liblwgeom.o lwgeom_pg.o
> lwgeom_debug.o lwgeom_spheroid.o lwgeom_ogc.o
> lwgeom_functions_analytic.o lwgeom_geos .o lwgeom_inout.o
> lwgeom_estimate.o lwgeom_functions_basic.o lwgeom_gist.o
> lwgeom_btree.o lwgeom_transform.o stringBuffer.o lwgeom_box.o
> lwgeom_box3d.o lwgeom_box2dfloat4.o lwgeom_chip.o lwgeom_svg.o
> lwgeom_gml.o lwgeom_triggers.o lwgeom_dump.o
> -L/root/postgresql-8.1.4/contrib/postgis-1.0.6/../../src/port
> -L/usr/local/lib -L/usr/local/lib
> -L/root/postgresql-8.1.4/contrib/postgis-1.0.6/../../src/port -lstdc++
> -lgeos -lproj -Wl,-rpath,/usr/local/pgsql/lib -o liblwgeom.so.1.0 
> measures.o(.text+0xbd8): In function `pt_in_ring_2d': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/measures.c:28:
> relocation truncated to fit: R_390_GOT12 lwerror 
> ptarray.o(.text+0x572): In function `ptarray_addPoint': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/ptarray.c:289:
> relocation truncated to fit: R_390_GOT12 lwerror 
> ptarray.o(.text
> +0x592):/root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/ptarray.c:296: relocation truncated to fit: R_390_GOT12 lwerror 
> lwgeom_api.o(.text+0x25e): In function `box3d_to_box2df_p': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:192:
> relocation truncated to fit: R_390_GOT12 lwnotice 
> lwgeom_api.o(.text+0x3da): In function `getPoint_internal': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:667:
> relocation truncated to fit: R_390_GOT12 lwerror 
> lwgeom_api.o(.text+0x554): In function
> `lwgeom_getsubgeometry_inspected': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:1071:
> relocation truncated to fit: R_390_GOT12 lwerror 
> lwgeom_api.o(.text+0x5f2): In function `printBOX3D': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:1590:
> relocation truncated to fit: R_390_GOT12 lwnotice 
> lwgeom_api.o(.text+0x674): In function `printType': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:1685:
> relocation truncated to fit: R_390_GOT12 lwnotice 
> lwgeom_api.o(.text+0xa26): In function `printBYTES': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:1635:
> relocation truncated to fit: R_390_GOT12 lwnotice 
> lwgeom_api.o(.text
> +0xa8e):/root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:1641: relocation truncated to fit: R_390_GOT12 lwnotice 
> lwgeom_api.o(.text+0xac2): In function `parse_lwgeom_wkt': 
> /root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom/lwgeom_api.c:2167:
> additional relocation overflows omitted from the output 
> collect2: ld returned 1 exit status 
> make[1]: *** [liblwgeom.so.1.0] Error 1 
> make[1]: Leaving directory
> `/root/postgresql-8.1.4/contrib/postgis-1.0.6/lwgeom' 
> make: *** [liblwgeom] Error 2 
> lxpgtst:~/postgresql-8.1.4/contrib/postgis-1.0.6 # 

AFAICT something must be changing the value of CFLAGS and/or CFLAGS_SL
to include the -fpic option - have these variables been set anywhere in
your environment before attempting the build?


Kind regards,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-users mailing list