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

Chris Hodgson chodgson at refractions.net
Thu Oct 28 18:49:57 EDT 2004


>as a workaround you may try to hand edit GDALmake.opt (after configure) adding 
>the support for shared libraries. search fo LD_SHARED and change it to:
>LD_SHARED = g++ -shared
>(better if you make distclean before ;)
>  
>
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
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

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)

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!

Thanks,
Chris






More information about the Gdal-dev mailing list