[Gdal-dev] gdal on amd64 needs -fPIC?

Frank Warmerdam warmerdam at pobox.com
Tue Mar 30 10:01:55 EST 2004


Vincent Schut wrote:
> More info:
> both netcdf/hdf and gdal need -fPIC. I tried compiling gdal with -fPIC while 
> having hdf4 compiled without, and that didn't work out.
> Might be that gdal when compiled without hdf4 support doesn't need -fPIC, but 
> as I need hdf4 support I didn't try that yet.

Vincent,

The -fPIC causes object files to be produced using Position Independent Code.
Basically, all jump instructions are relative instead of absolute jumps.
This isn't normally an issue on Intel, but is required for shared libraries
on Space and several other platforms.   I'm not sure why it is required for
AMD 64bit; however, given that it is I am surprised that libtool doesn't
already take care of it.

In non-libtool builds we automatically try and add -fPIC and use it if it
doesn't cause a problem.

Alessandro, do we need to update our libtool to address this?

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list