[gdal-dev] HDF-Problems when compiling
Etienne Tourigny
etourigny.dev at gmail.com
Fri Sep 9 10:51:19 EDT 2011
the following error:
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
Means that the library you are linking to has not been compiled for
64-bit architecture.
I can see that it is trying to link to /usr/local/lib/libmfhdf.a
instead of your specified /hb/USER/lib/epd-7.1-1-x86_64, and something
similar for hdf5
Sometimes it's easier to use the default system libraries, or remove
them if you are using more recent ones avoid conflicts like these.
Have a look at config.log to see what is happening.
You might also have something bad in you LD_LIBRARY_PATH configuration,
try:
export LD_LIBRARY_PATH="/hb/USER/lib/epd-7.1-1-x86_64"
If still no luck you can post it here as an attachment (I think), or
at least the parts relevant to hdf4 and hdf5, also the output of
'export' to see you env variables.
Etienne
On Fri, Sep 9, 2011 at 11:20 AM, Andreas H. <lists at hilboll.de> wrote:
> Hi everyone,
>
> I'm trying to compile GDAL 1.8.1 from source on a x86_64 machine, compiling
> against the libraries which come shipped with Enthought's Python
> distribution.
>
> So, what I'm doing is this:
>
> $ export CFLAGS="-I/hb/USER/lib/epd-7.1-1-x86_64/include -fPIC"
> $ export CXXFLAGS="-I/hb/USER/lib/epd-7.1-1-x86_64/include -fPIC"
> $ export LDFLAGS="-L/hb/USER/lib/epd-7.1-1-x86_64/lib"
> $ ./configure --prefix=/hb/USER/.virtualenvs/pydoas
> --with-hdf5=/hb/USER/lib/epd-7.1-1-x86_64
> --with-netcdf=/hb/USER/lib/epd-7.1-1-x86_64
> --with-hdf4=/hb/USER/lib/epd-7.1-1-x86_64
> $ make
>
> I get the following error:
>
> relocation R_X86_64_32 against `a local symbol' can not be used when
> making a shared object; recompile with -fPIC
> /usr/local/lib/libmfhdf.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[1]: *** [libgdal.la] Error 1
> make[1]: Leaving directory `/gpfs/hb/USER/.virtualenvs/pydoas/tmp/gdal-1.8.1'
> make: *** [check-lib] Error 2
>
> I don't understand the error message, as -fPIC is part of my CFLAGS and
> CXXFLAGS?!
>
> When I instead just disable hdf4
>
> $ ./configure --prefix=/hb/USER/.virtualenvs/pydoas
> --with-hdf5=/hb/USER/lib/epd-7.1-1-x86_64
> --with-netcdf=/hb/USER/lib/epd-7.1-1-x86_64 --without-hdf4
> $ make
>
> I get the following:
>
> libtool: link: ranlib .libs/libgdal.a
> /usr/bin/sed: can't read /usr/lib/libhdf5_hl.la: No such file or directory
> libtool: link: `/usr/lib/libhdf5_hl.la' is not a valid libtool archive
> make[1]: *** [libgdal.la] Error 1
> make[1]: Leaving directory `/gpfs/hb/USER/.virtualenvs/pydoas/tmp/gdal-1.8.1'
> make: *** [check-lib] Error 2
>
> Why does the system try to access /usr/lib/libhdf5_hl.la even though I
> specified a different path to ./configure?
>
> Any help is more than welcome ...
>
> Cheers,
> Andreas.
>
>
> PS:
>
> $ gcc -v
> Using built-in specs.
> Target: x86_64-suse-linux
> Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
> --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
> --enable-languages=c,c++,objc,fortran,obj-c++,java,ada
> --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3
> --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
> --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap
> --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit
> --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
> --enable-version-specific-runtime-libs --program-suffix=-4.3
> --enable-linux-futex --without-system-libunwind --with-cpu=generic
> --build=x86_64-suse-linux
> Thread model: posix
> gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
More information about the gdal-dev
mailing list