[Gdal-dev] Work-arounds to build problems OCI and DWG
Dion Wooning
dion at west.nl
Wed Feb 22 11:12:29 EST 2006
Hello List,
I've been encountering a few problems building GDAL under Redhat Enterprise
Linux 3.0 (using cvs 2006.02.16), and found some workarounds.
* OCI
the --with-oci=path option doesn't seem to work when using
oracle instant-client (rpms). The issue is that the instant client
is structured differently (and doesn't have the rdbms/public dir).
The following patch adds the proper include path; build using the
--with-oci=path option, where path points to the instant client
binaries, e.g. --with-oci=/usr/lib/oracle/10.1.0.4/client :
--- configure 2006-02-22 16:59:31.000000000 +0100
+++ configure.new 2006-02-22 17:02:01.000000000 +0100
@@ -25743,7 +25743,8 @@
HAVE_OCI=yes
ORACLE_HOME="$with_oci"
- OCI_INCLUDE="-I$ORACLE_HOME/rdbms/demo -I$ORACLE_HOME/rdbms/public"
+ OCI_INCLUDE="-I`echo $ORACLE_HOME | sed -e 's;lib;include;'` \
+ -I$ORACLE_HOME/rdbms/demo -I$ORACLE_HOME/rdbms/public"
LIBS="-L$ORACLE_HOME/lib $LIBS"
echo "$as_me:$LINENO: result: using OCI library from $with_oci" >&5
* OpenDWG
linking won't work by default. Near the end of building, I get:
../.libs/libgdal.so: undefined reference to `OdDbHostAppServices::
getATTREQ() const'
I think the problem is that the DWG static libraries do not get included
when linking. I've used the following workaround, patching:
--- GDALmake.opt.in 2005-11-23 15:30:29.000000000 +0100
+++ GDALmake.opt.in.new 2005-12-13 13:20:33.000000000 +0100
@@ -230,6 +230,7 @@
DWG_LIBS =
HAVE_DWGDIRECT = no
endif
+LIBS += $(DWG_LIBS)
This works, but reveals a libtool-related problem later on:
/bin/sh ./libtool --mode=link [..] g++ DD_lnxX86pic_ModelerGeometry.a [..]
*** Warning: Linking the shared library libgdal.la against the
*** static library OpenDWG/lib/lnxX86pic/DD_lnxX86pic_ModelerGeometry.a is
not portable!
[...]
The problem is that libtool simply puts the opendwg .a archives into the
libgdal.a library, instead of the .o that are inside those .a archives.
I have currently no idea how to change that. Would I need opendwg .la
files for libtool to work? Can those be generated somehow?
By the way, when using rpmbuild, the mangled libgdal.a library leads to
a further problem further down the road:
+ /usr/lib/rpm/brp-strip-static-archive
strip:
/var/tmp/gdal-1.3.1-root/usr/lib/stG48OmH/DD_lnxX86pic_ModelerGeometry.a:
Invalidoperation
The solution is to take the brp-strip-static-archive step out (but it
would be preferable to fix the libtool problem).
Regards,
Dion.
--
-- Dion Wooning, dion at west.nl, West Consulting B.V., +31 15 219 1600
More information about the Gdal-dev
mailing list