Hi all, Well, I solved the problem! (Been 2 days on this already... :-/ - rebuilding the gcc was 5 hours alone)
Looks like nobody else has recently built postgres/gis on the s390x platform - or - at least - has not made public what they also found perhaps? There needs to be a case added to Makefile.linux for postgresql *that's postgres, not postgis* for s390x in addtion to SPARC that sets CFLAGS_SL to -fPIC because otherwise it sets to -fpic and then that gets added in silently to the shared lib builds. You can't mix and match -fpic and -fPIC. Soooo, now it's built! That was a *long* haul to find. Can whoever maintains postgres make that change please for future releases? Kind regards Derek Jones. On Dec 14, 2012, at 9:26 AM, Derek Jones wrote: > Hi all, > > I am trying to build postgis 2.0.2 on SUSE EL 10 SP 2 on an s390x > > I am getting the following: > > postgis_module.o: In function `_PG_fini': > /stats/build2/postgis-2.0.2/postgis/postgis_module.c:80:(.text+0x34): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `elog_finish' > lwgeom_accum.o: In function `pgis_geometry_accum_transfn': > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:130:(.text+0x1b8): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `CurrentMemoryContext' > lwgeom_accum.o: In function `pgis_geometry_accum_finalfn': > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:200:(.text+0x2ce): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `CurrentMemoryContext' > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:200:(.text+0x2d4): > relocation truncated to fit: R_390_GOT12 against symbol `pgis_accum_finalfn' > defined in .text section in lwgeom_accum.o > lwgeom_accum.o: In function `pgis_geometry_polygonize_finalfn': > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:273:(.text+0x334): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `CurrentMemoryContext' > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:274:(.text+0x350): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `DirectFunctionCall1Coll' > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:274:(.text+0x35e): > relocation truncated to fit: R_390_GOT12 against symbol `polygonize_garray' > defined in .text section in lwgeom_geos.o > lwgeom_accum.o: In function `pgis_geometry_makeline_finalfn': > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:296:(.text+0x400): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `CurrentMemoryContext' > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:297:(.text+0x420): > relocation truncated to fit: R_390_GOT12 against symbol > `LWGEOM_makeline_garray' defined in .text section in lwgeom_functions_basic.o > lwgeom_accum.o: In function `pgis_geometry_collect_finalfn': > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:248:(.text+0x478): > relocation truncated to fit: R_390_GOT12 against undefined symbol > `CurrentMemoryContext' > /stats/build2/postgis-2.0.2/postgis/lwgeom_accum.c:249:(.text+0x498): > additional relocation overflows omitted from the output > collect2: error: ld returned 1 exit status > make[1]: *** [postgis-2.0.so] Error 1 > make[1]: Leaving directory `/stats/build2/postgis-2.0.2/postgis' > > > I have rebuilt the whole gcc compiler chain from scratch to the latest 4.7.2 > gcc & friends. > > I have built the latest binutils (ld etc.) > > I have built the latest postgres. > > I have built the latest, proj, gdal, geos. > > I have the following CFLAGS > > -finline-limit=1000 -fPIC -fPIE -g -O2 > > > But I can't get postgis to link cleanly - as above. Been trying this every > which way for 2 days now. > > Has anyone else hit this or know how to resolve it? > > Kind regards > > Derek Jones. > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
