Hi list, I'm trying to rebuild gdal with hdf4 support and running into a compilation error:<br><br>g++ -shared /usr/local/src/gdal-1.4.2/frmts/o/*.o /usr/local/src/gdal-1.4.2/gcore/*.o /usr/local/src/gdal-1.4.2/port/*.o /usr/local/src/gdal-
1.4.2/alg/*.o /usr/local/src/gdal-1.4.2/ogr/ogrsf_frmts/o/*.o ./ogr/ogrgeometryfactory.o ./ogr/ogrpoint.o ./ogr/ogrcurve.o ./ogr/ogrlinestring.o ./ogr/ogrlinearring.o ./ogr/ogrpolygon.o ./ogr/ogrutils.o ./ogr/ogrgeometry.o ./ogr/ogrgeometrycollection.o ./ogr/ogrmultipolygon.o ./ogr/ogrsurface.o ./ogr/ogrmultipoint.o ./ogr/ogrmultilinestring.o ./ogr/ogr_api.o ./ogr/ogrfeature.o ./ogr/ogrfeaturedefn.o ./ogr/ogrfeaturequery.o ./ogr/ogrfeaturestyle.o ./ogr/ogrfielddefn.o ./ogr/ogrspatialreference.o ./ogr/ogr_srsnode.o ./ogr/ogr_srs_proj4.o ./ogr/ogr_fromepsg.o ./ogr/ogrct.o ./ogr/ogr_opt.o ./ogr/ogr_srs_esri.o ./ogr/ogr_srs_pci.o ./ogr/ogr_srs_usgs.o ./ogr/ogr_srs_dict.o ./ogr/ogr_srs_panorama.o ./ogr/swq.o ./ogr/ogr_srs_validate.o ./ogr/ogr_srs_xml.o ./ogr/ograssemblepolygon.o ./ogr/ogr2gmlgeometry.o ./ogr/gml2ogrgeometry.o /usr/local/src/gdal-
1.4.2/libgdal.a /usr/local/src/gdal-1.4.2/libgdal.a -L/usr/local/lib -lgeos -lgeos_c -L/usr/local/src/xerces-c-src_2_7_0/lib -lxerces-c -lpthread -L/usr/local/src/HDF4.2r1/NewHDF/lib -lmfhdf -ldf -ljpeg -lnetcdf -lz -lm -lrt -ldl -L/usr/lib64 -lcurl -L/usr/kerberos/lib -L/usr/kerberos/lib64 -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -L/usr/kerberos/lib -L/usr/kerberos/lib64 -lidn -lssl -lcrypto -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz -lz \
<br> -o /usr/local/src/gdal-1.4.2/libgdal.so<br>/usr/bin/ld: /usr/local/src/HDF4.2r1/NewHDF/lib/libmfhdf.a(mfsd.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
<br>/usr/local/src/HDF4.2r1/NewHDF/lib/libmfhdf.a: could not read symbols: Bad value<br>collect2: ld returned 1 exit status<br><br><br>I've seen this before, recompile with -fPIC, and from gdal configure I included -fPIC:
<br><br> Installation directory: /usr/local<br> C compiler: gcc -fPIC <br> C++ compiler: g++ -fPIC <br><br><br>So, either it's another problem or the flags aren't getting picked up at this command, so I'm not quite sure where or how to include the flag in this command. I'm not so great with makefiles, but I'm trying.
<br><br>Anyone have any ideas?<br>Thanks!<br>-Ed<br>