[gdal-dev] Error in libjasper.a during 'make' in gdal 1.5.2:
relocation R_X86_64_32 against `a local symbol' can not be used
gaffigan at sfos.uaf.edu
Fri Sep 12 12:20:16 EDT 2008
You want to build jasper with CFLAGS="-fPIC -m64", as you've done. But
you just want CXXFLAGS="-m64", without "-fPIC", for the gdal build. Be
sure to unset CFLAGS, or open a new terminal to get a fresh environment,
before gdal build. Also, might need to run ldconfig after building
jasper, before gdal build.
# cd jasper src dir
export CFLAGS="-fPIC -m64"
make; make install
# cd gdal src dir
>>Try rebuilding jasper as:
>> export CFLAGS="-fPIC"
>> ./configure --prefix=/usr/local
>> make; make install
>> unset CFLAGS
>>Then rebuild gdal as usual.
>>On our 64-bit systems we also compile gdal and related libraries (geos,
jasper, etc.) with "-m64" in the compiler flags environment variable
(CFLAGS and CXXFLAGS for jasper and geos/gdal, respectively). Not sure
>>you'll need to do this.
> Thanks for the hints. I tried rebuilding jasper with CFLAGS="-fPIC -m64"
and rebuilding gdal with CXXFLAGS="-fPIC -m64", with no luck; the failed
output from the gdal build is below.
> /usr/bin/ld: /usr/lib/libstdc++.a(functexcept.o): relocation R_X86_64_32
against `vtable for std::exception' can not be used when making a shared
object; recompile with -fPIC
> /usr/lib/libstdc++.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [libgdal.la] Error 1
> make: Leaving directory `/usr/local/gdal-1.5.2'
> make: *** [check-lib] Error 2
> Curious how it is prompting recompiling with -fPIC, as I've done that.
> other ideas?
> ~ Eric.
More information about the gdal-dev