[gdal-dev] Compiling GDAL 2.2.2 with Informix (IDB) driver on Ubuntu 16.04

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Compiling GDAL 2.2.2 with Informix (IDB) driver on Ubuntu 16.04

Roel Huybrechts
Dear list,

We'd like to use GDAL in combination with the Informix (IDB) driver to
copy data from an Informix database.

After applying some changes regarding linking [1], we're able to compile
GDAL + IDB driver on Debian Stretch and Testing and on Ubuntu 14.04.
However, it doesn't work on Ubuntu 16.04, which happens to be what we're
using on our servers..

The error on Ubuntu 16.04 seems to be related to the IDB driver:
compiling GDAL without IDB works fine.

The message we're seeing is:
make[1]: Entering directory '/home/roel/software/gdal_compile/gdal/apps'
/bin/bash /home/roel/software/gdal_compile/gdal/libtool --mode=link    
g++ -std=gnu++11  -L/opt/informix/lib/ -L/opt/informix/lib/esql -lifsql
-lifasf -lifgen -lifos -lifgls -lifglx /opt/informix/lib/esql/checkapi.o
-L/opt/informix/lib/dmi -lifdmi -L/opt/informix/lib/c++ -lifc++ -lcrypt
gdalinfo_bin.lo  /home/roel/software/gdal_compile/gdal/libgdal.la  -o
gdalinfo
libtool: link: g++ -std=gnu++11 /opt/informix/lib/esql/checkapi.o
.libs/gdalinfo_bin.o -o .libs/gdalinfo  -L/opt/informix/lib/
-L/opt/informix/lib/esql -L/opt/informix/lib/dmi -L/opt/informix/lib/c++
-lcrypt /home/roel/software/gdal_compile/gdal/.libs/libgdal.so
-L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -ljson-c -lfreexl
-lqhull -lgeos_c -lwebp /usr/lib/x86_64-linux-gnu/libsqlite3.so -lodbc
-lodbcinst -lkmlbase -lkmldom -lkmlengine -lkmlxsd -lkmlregionator
/usr/lib/x86_64-linux-gnu/libexpat.so -lxerces-c -lopenjp2 -lnetcdf
-lhdf5_hl -lsz -lhdf5 /usr/lib/libmfhdfalt.so /usr/lib/libdfalt.so
-logdi -lgif -ljpeg -lgeotiff -ltiff -lpng -lpq -lz -lpthread -lrt -ldl
-lpcre /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -lxml2 -lifsql
-lifasf -lifgen -lifos -lifgls -lifglx -lifdmi -lifc++ -pthread
/opt/informix/lib/c++/libifc++.so: undefined reference to `mi_cleanup'
(et cetera, the list of undefined references to informix libs goes on)

Running ldd also reveals:
$ ldd .libs/libgdal*.so
(...)
libifc++.so => not found
(...)

If anyone can spot an error we've made, or has a hint on how to proceed
with debugging that would be great!

Thanks in advance!
Roel

[1]:
https://github.com/johanvdw/gdal/commit/92fce0db7c61d907699135ea27032be3b72645e6
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling GDAL 2.2.2 with Informix (IDB) driver on Ubuntu 16.04

Even Rouault-2

Roel,

 

> /opt/informix/lib/c++/libifc++.so: undefined reference to `mi_cleanup'

> (et cetera, the list of undefined references to informix libs goes on)

>

> Running ldd also reveals:

> $ ldd .libs/libgdal*.so

> (...)

> libifc++.so => not found

> (...)

 

(blind guessing)

 

Is /opt/informix/lib/c++ in the search path for shared librariies ? That is: did you define LD_LIBRARY_PATH to point to it ? Or put it in /etc/ld.so.conf and ran ldconfig afterwards ?

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Compiling GDAL 2.2.2 with Informix (IDB) driver on Ubuntu 16.04

Roel Huybrechts
Hi Even,

Is /opt/informix/lib/c++ in the search path for shared librariies ? That is: did you define LD_LIBRARY_PATH to point to it ? Or put it in /etc/ld.so.conf and ran ldconfig afterwards ?


I didn't define LD_LIBRARY_PATH or put it in ld.so.conf, as I didn't have to do it in my Debian Testing VM and it worked there without that. In the output I see that the Informix folders and libraries are listed in the arguments of g++, so I don't think the problem has to do with LD_LIBRARY_PATH or ld.so.conf?

g++ -std=gnu++11 /opt/informix/lib/esql/checkapi.o .libs/gdalserver.o -o .libs/gdalserver  -L/opt/informix/lib/ -L/opt/informix/lib/esql -L/opt/informix/lib/dmi -L/opt/informix/lib/c++ -lcrypt /home/roel/software/gdal_compile/gdal/.libs/libgdal.so -L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -ljson-c -lfreexl -lqhull -lgeos_c -lwebp /usr/lib/x86_64-linux-gnu/libsqlite3.so -lodbc -lodbcinst -lkmlbase -lkmldom -lkmlengine -lkmlxsd -lkmlregionator /usr/lib/x86_64-linux-gnu/libexpat.so -lxerces-c -lopenjp2 -lnetcdf -lhdf5_hl -lsz -lhdf5 /usr/lib/libmfhdfalt.so /usr/lib/libdfalt.so -logdi -lgif -ljpeg -lgeotiff -ltiff -lpng -lpq -lz -lpthread -lrt -ldl -lpcre /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -lxml2 -lifsql -lifasf -lifgen -lifos -lifgls -lifglx -lifdmi -lifc++ -pthread

To be sure, I added the Informix folders to /etc/ld.so.conf, but the result is the same.

I then tried compiling with different versions of gcc/g++, also resulting in the same error:
./configure CC=gcc-4.7 CXX=g++-4.7 --with-idb=/opt/informix
./configure CC=gcc-4.8 CXX=g++-4.8 --with-idb=/opt/informix

To add to the puzzle: compiling with gcc-5 on Debian Testing works, but with gcc-5 on Ubuntu 16.04 doesn't.. Although the version is slightly different: gcc-5 (Debian 5.4.1-14) 5.4.1 20171003 versus gcc-5 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609.

Any hints on how to proceed with debugging would be very helpful. Thanks!

Kind regards,
Roel

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev