[postgis-devel] Re: Compiling postgis with gcc3.3.2 on Solaris 7 - use of -fPIC C++ compiler option

strk strk at keybit.net
Tue May 4 09:56:33 PDT 2004

I've added -fPIC in the Makefile, as you suggested.
I don't think that will hurt.

On Tue, May 04, 2004 at 05:35:43PM +0200, Havard Tveite wrote:
> For your information:
> When running make, there were problems generating the shared
> library (libpostgis.so.0.8). GCC failed with something like:
> lots of lines of errors, and finally
> "ld: fatal: relocations remain against allocatable but non-writable sections"
> I found out that if I included -fPIC for C++ in the Makefile, as
> follows:
> "override CXXFLAGS += -fPIC"
> everything compiled fine. Without this option, the compile would
> succeed when I replaced the "-shared" option with the "-G" option.
> In both cases, the resulting libraries seemed to be OK, as my UMN
> Mapserver application was able to get data from PostGreSQL/PostGIS.
> I am on Solaris 7, and use the Solaris /usr/ccs/bin utils.
> My version of GCC is 3.3.2.
> -- 
> Håvard Tveite
> Department of Mathematical Sciences and Technology
> Agricultural University of Norway
> Drøbakveien 14, POBox 5003, N-1432 Ås, NORWAY
> Phone: +47 64948857 Fax: +47 64948810 http://www.nlh.no/imt

More information about the postgis-devel mailing list