[Gdal-dev] Compiling gdal 1.4.2 with HDF4.2 fails
Frank Warmerdam
warmerdam at pobox.com
Tue Sep 11 16:02:46 EDT 2007
Edward Fialkowski wrote:
> -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.
Edward,
I believe the problem is that the HDF4.2r1 libraries need to be rebuilt
with -fPIC. If you figure out what you need to do in the HDF build, you
might want to note it in the wiki at:
http://trac.osgeo.org/gdal/wiki/HDF
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 | President OSGeo, http://osgeo.org
More information about the Gdal-dev
mailing list