[Gdal-dev] No python support for x86_64 with kakadu?

Alessandro Amici alexamici at fastwebnet.it
Mon Nov 1 14:42:48 EST 2004


Chris,

On Friday 29 October 2004 00:49, Chris Hodgson wrote:
> Ok, here is the end of the compile output after setting LD_SHARED = g++
> -shared (and running a make clean beforehand):
>
> make ./libgdal.a ./libgdal.so
> make[1]: Entering directory `/usr/local/src/gdal'
> ar r ./libgdal.a ./frmts/o/*.o ./gcore/*.o ./port/*.o ./alg/*.o
> ./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/swq.o
> ./ogr/ogr_srs_validate.o ./ogr/ogr_srs_xml.o ./ogr/ograssemblepolygon.o
> ./ogr/ogr2gmlgeometry.o ./ogr/gml2ogrgeometry.o
> ar: creating ./libgdal.a
> ranlib ./libgdal.a

ok. you have the static library. better than nothing :-)
if you can do without the gdal shared library you may configure 
--without-ld-shared in order to have a clean build and install.

> g++ -shared  ./frmts/o/*.o ./gcore/*.o ./port/*.o ./alg/*.o
> ./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/swq.o
> ./ogr/ogr_srs_validate.o ./ogr/ogr_srs_xml.o ./ogr/ograssemblepolygon.o
> ./ogr/ogr2gmlgeometry.o ./ogr/gml2ogrgeometry.o ./libgdal.a
> -L/usr/local/pgsql/lib -lpq  ./libgdal.a -lgif -ljpeg -lpng -lz -lm -ldl
> -lkdu -L/usr/local/pgsql/lib -lpq \
>         -o ./libgdal.so
> /usr/bin/ld: ./frmts/o/args.o: relocation R_X86_64_32 can not be used
> when making a shared object; recompile with -fPIC
> ./frmts/o/args.o: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[1]: *** [libgdal.so] Error 1
> make[1]: Leaving directory `/usr/local/src/gdal'
> make: *** [check-lib] Error 2

args.o is part of the kakadu library an it is copied into the gdal tree during 
the build.

> I re-made kakadu, and made certain that -fPIC was in the CC_OPTS, and it
> seems to wrk correct, with -fPIC on every command line shown during the
> make. Kakadu succesfully builds as a 64-bit shared library... or at
> least AFAICT:
>
> [root at dragonfly gdal]# ldd /usr/local/lib64/libkdu_v42R.so
>         libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x0000002a956df000)
>         libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a958ba000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a959bd000)
>         libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95ac8000)
>         /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> (0x000000552aaaa000)

ok.

> I really don't know much about this stuff... being in 64-bit land makes
> everything more complicated. Any more ideas or help would be great!

my ability to help is further hindered by the fact that i have never seen the 
kadaku library ;-), but... it would be nice to see the gcc command line used 
to build the kadaku object files (e.g. args.o). that's the only thing i can 
think off.

cheers,
alessandro



More information about the Gdal-dev mailing list