[gdal-dev] Fwd: Configure error with Oracle instantclient 11.2.0.3

Stefano Iacovella stefano.iacovella at gmail.com
Wed Apr 18 11:22:58 EDT 2012


As I can't understand what I'm doing wrong with the configuration of
instantclient I made I tried on an other linux box and It was
successfull.
As I made exactly the same step in both machines I'll guess the devils
should be in some release of gcc, make and other base build utils.

The box where I got the error is an ubuntu server 11.10 32 bit kernel
3.0.0-17 with gcc 4.6.1 and Gnu make 3.81

The other machine is a debian 6 32 bit kernel 2.6.32-5 with gcc 4.4.5
and Gnu make 3.81

Is there anything I can search in both config.log to explain the error?

thank you

Stefano



---------- Forwarded message ----------
From: Stefano Iacovella <stefano.iacovella at gmail.com>
Date: 2012/4/17
Subject: Configure error with Oracle instantclient 11.2.0.3
To: gdal-dev <gdal-dev at lists.osgeo.org>


Hello

I'm try to build gdal 1.9.0 on ubuntu server 11.10 32 bit.
I read the help at http://trac.osgeo.org/gdal/wiki/BuildingOnUnix and
also this thread on OTN forum:

https://forums.oracle.com/forums/thread.jspa?messageID=4570333

I downloaded the tree files for instantclient 11.2.0.3:

instantclient-basic-linux-11.2.0.3.0.zip
instantclient-sqlplus-linux-11.2.0.3.0.zip
instantclient-sdk-linux-11.2.0.3.0.zip

and unzip them in /home/stefano/oracle

then I made the soft links for libraries and added then
network/admin/tnsnames.ora file
I added at .bashrc:

ORACLE_HOME=/home/stefano/oracle/instantclient_11_2
PATH=/usr/local/pgsql/bin:$ORACLE_HOME:$PATH
LD_LIBRARY_PATH=/usr/local/pgsql/lib:$ORACLE_HOME:$LD_LIBRARY_PATH

and added also /etc/ld.so.conf/oracle.conf file containing:

/home/stefano/oracle/instantclient_11_2

My ORACLE_HOME folder looks like:

stefano at ubuntu1110vmsrv:~/oracle/instantclient_11_2$ ls -lh
total 171M
-rwxrwxr-x 1 stefano stefano  22K 2011-09-19 01:11 adrci
-rw-rw-r-- 1 stefano stefano  437 2011-09-19 01:11 BASIC_README
-rwxrwxr-x 1 stefano stefano  38K 2011-09-19 01:11 genezi
-r--r--r-- 1 stefano stefano  368 2011-09-19 01:12 glogin.sql
lrwxrwxrwx 1 stefano stefano   17 2012-04-16 18:06 libclntsh.so ->
libclntsh.so.11.1
-rwxrwxr-x 1 stefano stefano  42M 2011-09-19 01:11 libclntsh.so.11.1
-r-xr-xr-x 1 stefano stefano 6.8M 2011-09-19 01:11 libnnz11.so
lrwxrwxrwx 1 stefano stefano   15 2012-04-16 18:06 libocci.so -> libocci.so.11.1
-rwxrwxr-x 1 stefano stefano 1.8M 2011-09-19 01:11 libocci.so.11.1
-rwxrwxr-x 1 stefano stefano 113M 2011-09-19 01:11 libociei.so
-r-xr-xr-x 1 stefano stefano 149K 2011-09-19 01:11 libocijdbc11.so
-r-xr-xr-x 1 stefano stefano 1.5M 2011-09-19 01:12 libsqlplusic.so
-r-xr-xr-x 1 stefano stefano 1.2M 2011-09-19 01:12 libsqlplus.so
drwxrwxr-x 3 stefano stefano 4.0K 2012-04-17 09:21 network
-r--r--r-- 1 stefano stefano 2.0M 2011-09-19 01:11 ojdbc5.jar
-r--r--r-- 1 stefano stefano 2.6M 2011-09-19 01:11 ojdbc6.jar
drwxrwxr-x 4 stefano stefano 4.0K 2011-09-19 01:12 sdk
-r-xr-xr-x 1 stefano stefano 6.8K 2011-09-19 01:12 sqlplus
-rw-rw-r-- 1 stefano stefano  441 2011-09-19 01:12 SQLPLUS_README
-rwxrwxr-x 1 stefano stefano 157K 2011-09-19 01:11 uidrvci
-rw-rw-r-- 1 stefano stefano  66K 2011-09-19 01:11 xstreams.jar



I tried sqlplus successfully

stefano at ubuntu1110vmsrv:~$ sqlplus engis at ENGIS

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 17 10:47:30 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining
Scoring Engine options

SQL>


Then I ran the configure script:

stefano at ubuntu1110vmsrv:~/sources/gdal-1.9.0$ ./configure
--with-oci-include=/home/stefano/oracle/instantclient_11_2/sdk/include
--with-oci-lib=/home/stefano/oracle/instantclient_11_2

and here I get a library not found error

checking for Oracle OCI headers in
/home/stefano/oracle/instantclient_11_2/sdk/include... yes
checking for Oracle OCI libraries in
/home/stefano/oracle/instantclient_11_2... library not found
checking if Oracle support is enabled... no

Looking at the config.log I found this:

configure:22404: checking for Oracle OCI libraries in
/home/stefano/oracle/instantclient_11_2
configure:22430: g++ -o conftest -g -O2
-I/home/stefano/oracle/instantclient_11_2/sdk/include
-L/home/stefano/oracle/instantclient_11_2 -lclntsh conftest.cpp
-L/usr/local/pgsql/lib -lpq -lz -lpthread -lm -lrt -ldl  >&5
/tmp/ccijFcU1.o: In function `main':
/home/stefano/sources/gdal-1.9.0/conftest.cpp:71: undefined reference
to `OCIEnvCreate'
/home/stefano/sources/gdal-1.9.0/conftest.cpp:72: undefined reference
to `OCIHandleFree'
collect2: ld returned 1 exit status
configure:22430: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_LIBDL 1
| #define HAVE_LIBRT 1
| #define HAVE_LIBM 1
| #define STDC_HEADERS 1
| #define HAVE_ASSERT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_VALUES_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_LONG_LONG 1
| #define UNIX_STDIO_64 1
| #define VSI_LARGE_API_SUPPORTED 1
| #define VSI_FTELL64 ftello64
| #define VSI_FSEEK64 fseeko64
| #define VSI_STAT64 stat64
| #define VSI_STAT64_T stat64
| #define VSI_FOPEN64 fopen64
| #define VSI_FTRUNCATE64 ftruncate64
| #define SIZEOF_INT 4
| #define SIZEOF_UNSIGNED_LONG 4
| #define SIZEOF_VOIDP 4
| #define HAVE_IEEEFP 1
| #define HOST_FILLORDER FILLORDER_LSB2MSB
| #define HAVE_VPRINTF 1
| #define HAVE_SNPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_ATOLL 1
| #define HAVE_STRTOF 1
| #define HAVE_GETCWD 1
| #define HAVE_DECL_STRTOF 1
| #define HAVE_READLINK 1
| #define HAVE_GCC_ATOMIC_BUILTINS 1
| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1
| #define CPL_MULTIPROC_PTHREAD 1
| #define HAVE_ICONV 1
| #define ICONV_CONST
| #define ICONV_CPP_CONST
| #define HAVE_LIBPQ 1
| /* end confdefs.h.  */
|
|                 #include <oci.h>
| int
| main ()
| {
|
| OCIEnv* envh = 0;
| OCIEnvCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0);
| if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
|
|
|   ;
|   return 0;
| }
configure:22440: result: library not found
configure:22527: checking if Oracle support is enabled
configure:22541: result: no

Do you have any hint about the problem?

Thanks in advance for your help

Stefano
---------------------------------------------------
41.95581N 12.52854E


http://www.linkedin.com/in/stefanoiacovella

http://twitter.com/#!/Iacovellas


More information about the gdal-dev mailing list