[gdal-dev] Linking error when building Informix OGR driver

Jeremy Palmer palmerjnz at gmail.com
Tue Aug 25 03:58:39 PDT 2020


Hi All,

I'm getting linking issues trying to build the Informix driver.

I've installed the informix SDK and added the following libraries
to /etc/ld.so.conf.d/informix-client-sdk.conf and then run sudo ldconfig:

/opt/IBM/Informix_Client-SDK/lib
/opt/IBM/Informix_Client-SDK/lib/dmi
/opt/IBM/Informix_Client-SDK/lib/esql
/opt/IBM/Informix_Client-SDK/lib/c++

Then configured GDAL:

./configure \
    --with-hide-internal-symbols=yes \
    --with-libtiff=internal \
    --with-geotiff=internal \
    --with-rename-internal-libtiff-symbols=yes \
    --with-rename-internal-libgeotiff-symbols=yes \
    --with-threads \
    --with-jpeg12  \
    --with-webp \
    --with-armadillo=yes \
    --with-cfitsio=no \
    --with-charls \
    --with-curl \
    --with-ecw=no \
    --with-epsilon=/usr \
    --with-freexl=yes \
    --with-geos \
    --with-geotiff=yes \
    --with-grass=no \
    --with-libkml=yes \
    --with-liblzma=yes \
    --with-libtiff=internal \
    --with-mrsid=no \
    --with-mysql \
    --with-netcdf \
    --with-odbc \
    --with-ogdi \
    --with-openjpeg=yes \
    --with-pg \
    --with-poppler=yes \
    --with-sosi=yes \
    --with-spatialite=/usr \
    --with-sqlite3 \
    --with-xerces \
    --with-zstd \
    --with-dods-root=/usr \
    --with-proj \
    --with-python=python3.6 \
    --with-idb=/opt/ifx/informix

Then I run make which is ok until linking of app tools:

/bin/bash /home/informix/dev/gdal/gdal/libtool --mode=link --silent g++
 gdalinfo_bin.lo  /home/informix/dev/gdal/gdal/libgdal.la  -o gdalinfo
/opt/IBM/Informix_Client-SDK/lib/c++/libifc++.so: undefined reference to
`mi_cleanup'
... heaps of informix function references
/opt/IBM/Informix_Client-SDK/lib/c++/libifc++.so: undefined reference to
`_ifx_gl_mbsrchr'
collect2: error: ld returned 1 exit status
GNUmakefile:90: recipe for target 'gdalinfo' failed
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory '/home/informix/dev/gdal/gdal/apps'
GNUmakefile:120: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2

The creation of the main gdal library seems to include the correct informix
SDK library link options:

/bin/bash /home/informix/dev/gdal/gdal/libtool --mode=link --silent g++
-lIlmImf -lImath -lHalf -lIex -lIexMath -lIlmThread -lpthread -lcryptopp
-larmadillo -lpoppler -lfreexl -lgeos_c -lwebp -L/usr/lib -lepsilon -lodbc
-lodbcinst -lkmlbase -lkmldom -lkmlengine -lkmlxsd -lkmlregionator -lexpat
-lxerces-c -lpthread -lopenjp2 -L/usr/lib/x86_64-linux-gnu/hdf5/serial
-lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl
-L/usr/lib/x86_64-linux-gnu/hdf5/serial -lhdf5 -lmfhdfalt -ldfalt -logdi
-lgif -lCharLS -ljpeg -lpng -lpq -lzstd -llzma  -lsqlite3 -lproj
-lsqlite3 -lz -lpthread -lm -lrt -ldl  -L/usr/lib -lspatialite -ldapclient
-ldapserver -ldap -lpcre   -lcurl       -lfyba -lfygm -lfyut     -lxml2
-lmysqlclient -lpthread -lz -lm -lrt -latomic -lssl -lcrypto -ldl
 -L/opt/IBM/Informix_Client-SDK/lib/
-L/opt/IBM/Informix_Client-SDK/lib/esql -lifsql -lifasf -lifgen -lifos
-lifgls -lifglx /opt/IBM/Informix_Client-SDK/lib/esql/checkapi.o
-L/opt/IBM/Informix_Client-SDK/lib/dmi -lifdmi
-L/opt/IBM/Informix_Client-SDK/lib/c++ -lifc++ -o libgdal.la \

I've checked all the references and they are located with
the /opt/IBM/Informix_Client-SDK libraries. e.g:

find /opt/IBM/Informix_Client-SDK/ -name '*.so*' -exec nm --print-file-name
--defined-only --dynamic {} \; | grep _ifx_gl_mbsrchr
/opt/IBM/Informix_Client-SDK/lib/esql/libifgls.so:0000000000028208 T
_ifx_gl_mbsrchr
/opt/IBM/Informix_Client-SDK/lib/esql/igl4a304.so:0000000000028208 T
_ifx_gl_mbsrchr
/opt/IBM/Informix_Client-SDK/lib/esql/libixgls.so:0000000000028208 T
_ifx_gl_mbsrchr

I'm compiling with:
* Ubuntu 18.04
* GDAL master
* IBM Informix Client-SDK 4.50.FC4W1 (
https://iwm.dhe.ibm.com/sdfdl/2v2/regs2/mstadm/informix/Xa.2/Xb.YBTN_DlRQlu95txYUUjNOjNrRzaQlAW03TtXUaXSBO8/Xc.ibm.csdk.4.50.FC4W1.LNX.tar/Xd./Xf.LPr.D1vk/Xg.10862767/Xi.ifxdl/XY.regsrvs/XZ.kFM8MiB-VbL9cNlfSPfj_mkY-YI/ibm.csdk.4.50.FC4W1.LNX.tar
)

Any help would be much appreciated.

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200825/0be579a4/attachment.html>


More information about the gdal-dev mailing list