[gdal-dev] GDAL 2.0.2 doesn't compile with Kakadu 7.7.1

Andre Hollstein andre.hollstein at gfz-potsdam.de
Fri Feb 12 00:36:26 PST 2016


Dear GDAL developers,

I'm trying to build gdal with support to the Kakadu library. My problems 
occur both with gdal 2.0.2 as well which what I checked out from github. 
I have configured a minimal example:

./configure --prefix $prefix_opt \
--with-openjpeg=no --with-jasper=no \
--with-ecw=no \
--with-libtiff=no --without-libtool \
--with-hdf4=no --with-hdf5=no --with-netcdf=no \
--with-geotiff=internal \
--with-grass=no --with-sqlite3=no \
--with-kakadu=/misc/fluo6/andre/projekte/install_py_et_al/python_GFZ/opt
--with-pic \
--with-python=$prefix_python/bin/python \

Output:

GDAL is now configured for x86_64-pc-linux-gnu

   Installation directory: 
/misc/fluo6/andre/projekte/install_py_et_al/python_GFZ/opt
   C compiler:                gcc -fPIC -O3 -fPIC
   C++ compiler:              g++ -g -O2 -fPIC

   LIBTOOL support: no

   LIBZ support: external
   LIBLZMA support: no
   cryptopp support: no
   GRASS support: no
   CFITSIO support: no
   PCRaster support: internal
   LIBPNG support: external
   DDS support: no
   GTA support: no
   LIBTIFF support:           external (BigTIFF=yes)
   LIBGEOTIFF support: internal
   LIBJPEG support: external
   12 bit JPEG: no
   12 bit JPEG-in-TIFF: no
   LIBGIF support: external
   OGDI support: no
   HDF4 support: no
   HDF5 support: no
   Kea support: no
   NetCDF support: no
   Kakadu support: yes
   JasPer support: no
   OpenJPEG support: no
   ECW support: no
   MrSID support: no
   MrSID/MG4 Lidar support: no
   MSG support: no
   GRIB support: yes
   EPSILON support: no
   WebP support: no
   cURL support (wms/wcs/...):yes
   PostgreSQL support: yes
   MRF support: yes
   MySQL support: no
   Ingres support: no
   Xerces-C support: yes
   NAS support: yes
   Expat support: yes
   libxml2 support: no
   Google libkml support: no
   ODBC support: yes
   PGeo support: yes
   FGDB support: no
   MDB support: no
   PCIDSK support:            internal
   OCI support:               no
   GEORASTER support:         no
   SDE support:               no
   Rasdaman support:          no
   DODS support:              no
   SQLite support:            no
   PCRE support:              yes
   SpatiaLite support:        no
   DWGdirect support          no
   INFORMIX DataBlade support:no
   GEOS support:              yes
   QHull support:             internal
   Poppler support:           no
   Podofo support:            no
   PDFium support:            no
   OpenCL support:            no
   Armadillo support:         no
   FreeXL support:            yes
   SOSI support:              no
   MongoDB support:           no


   SWIG Bindings:             python

   Statically link PROJ.4:    no
   enable OGR building:       yes
   enable GNM building:       no
   enable pthread support:    yes
   enable POSIX iconv support:yes
   hide internal symbols:     no


After calling make, it throws an error:


make[1]: Entering directory 
`/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/apps'
g++  gdalinfo_bin.o 
-L/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal 
-lgdal  -lfreexl -L/usr/lib64 -lgeos_c -lodbc -lodbcinst -lexpat 
-lxerces-c -lpthread -lgif -ljpeg -Lno/lib -ltiff -lpng 
-L/usr/lib/postgresql92/lib64 -lpq -lz -lpthread -lm -lrt -ldl 
-L/misc/fluo6/andre/projekte/install_py_et_al/python_GFZ/opt/lib -lkdu 
-lpcre   -lcurl                  -o gdalinfo
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_horz_resample_float(int, 
float*, float*, unsigned int, unsigned int, unsigned int, int, void**, 
int, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to 
`kd_supp_simd::avx2_interleaved_transfer_fix16_to_bytes(void const*, 
void const*, void const*, void const*, int, int, int, int, unsigned 
char*, int, unsigned int, unsigned int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to 
`kd_supp_simd::avx2_convert_and_copy_to_fix16(void const**, int const*, 
int const*, int, int, int, void*, int, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to 
`kd_supp_simd::avx2_transfer_fix16_to_bytes_gap1(void const*, int, int, 
int, int, void*, int, int, bool, float)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_vert_resample_float(int, 
float**, float*, void*, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_horz_resample_fix16(int, 
short*, short*, unsigned int, unsigned int, unsigned int, int, void**, 
int, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_hshuf_fix16_2tap_expand(int, 
short*, short*, unsigned int, unsigned int, unsigned int, int, void**, 
int, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_white_stretch(short const*, 
short*, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_vert_resample_fix16(int, 
short**, short*, void*, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to `kd_supp_simd::avx2_hshuf_float_2tap_expand(int, 
float*, float*, unsigned int, unsigned int, unsigned int, int, void**, 
int, int, int)'
/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/libgdal.so: 
undefined reference to 
`kd_supp_simd::avx2_transfer_fix16_to_bytes_gap4(void const*, int, int, 
int, int, void*, int, int, bool, float)'
collect2: error: ld returned 1 exit status
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory 
`/misc/fluo6/andre/projekte/install_py_et_al/tmp/gdal/gdal-2.0.2/github/gdal/gdal/apps'
make: *** [apps-target] Error 2

I did communicate with the folks over at Kakadu and Professor David 
Taubman gave the following comment:

 >Looks like the GDAL build is not building or including the Kakadu 
"avx2_region_decompressor.o" file.
 >You will find this referenced in the standard Kakadu makefiles.  This 
makes sense since that file
 >was added after Kakadu version 7.5 was released. I have not looked 
into the GDAL build system,
 >but it may be selectively building or including Kakadu object files 
rather than using Kakadu's
 >build environment to do so.  The preferred way to include all the 
Kakadu API's is to link against
 >both libkdu_v77R.o and libkdu_a77R.o, where the latter is built by the 
"managed" makefiles.
 >
 >Anyway, it may be that all you have to do is add 
"avx2_region_deocmpressor.o" (and possibly
 >"avx2_region_compositor.o") to the GDAL build environment.

I checked the fmts/o directory and copied all *.o files from kakadu into 
this directory. Then, called make again which ran without errors. When 
using python, I was able to read a jpeg200 image with gdal. However, 
this worked only with 2.0.2, using the version from github, the gdal 
module was missing from python.

So it seems there is a bug in the gdal build system when compiling with 
kakadu 7.7.1

Kind Regards, André Hollstein



-- 
Dr. André Hollstein
Sektion 1.4 Fernerkundung
Tel.: +49 (0)331/288-28969
Fax: +49 (0)331/288-28969
E-Mail: andre.hollstein at gfz-potsdam.de
___________________________________

Helmholtz-Zentrum Potsdam
Deutsches GeoForschungsZentrum GFZ
Stiftung des öff. Rechts Land Brandenburg
Telegrafenberg, 14473 Potsdam
Haus 17, Raum 20.23



More information about the gdal-dev mailing list