[Gdal-dev] Compiling gdal 1.4.2 with HDF4.2 fails
Edward Fialkowski
wef1 at cec.wustl.edu
Tue Sep 11 15:01:53 EDT 2007
Hi list, I'm trying to rebuild gdal with hdf4 support and running into a
compilation error:
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 \
-o /usr/local/src/gdal-1.4.2/libgdal.so
/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
/usr/local/src/HDF4.2r1/NewHDF/lib/libmfhdf.a: could not read symbols: Bad
value
collect2: ld returned 1 exit status
I've seen this before, recompile with -fPIC, and from gdal configure I
included -fPIC:
Installation directory: /usr/local
C compiler: gcc -fPIC
C++ compiler: g++ -fPIC
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.
Anyone have any ideas?
Thanks!
-Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070911/e3b92eb4/attachment.html
More information about the Gdal-dev
mailing list