[gdal-dev] Build OGR with Oracle support

Andreas Neumann a.neumann at carto.net
Fri Jun 19 07:54:55 EDT 2009


Hi,

I was trying to get OCI support on my Ubuntu server and followed your
instructions.

I am struggling with the libnnz10.so: libnnz10.so is present and I also
set the LD_LIBRARY_PATH accordingly.

But the configure script still fails. In the config.log I get the
following messages:

----------------
/usr/bin/ld: warning: libnnz10.so, needed by
/usr/local/lib/instantclient_10_2/libclntsh.so, not found (try using
 -rpath or -rpath-link)
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_ModifyCipherSuites'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzosCipherSpecToStr'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_Initialize'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzosgpc_GetProtocolVer'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nztwOpenWallet'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`A_X931RandomInit'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzosGetSupportedCipher'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_ServiceWriteQueue'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_DisableClientAuthentication'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nztiGetSecInfo'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_Write'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzduui2_destroy_ui'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`_intel_fast_memset'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nztGetSubjectName'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzgbllsm_location_shared_memory'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_setThrUse'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzteMyCert'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzteDestroyPersona'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_RetrievePersonaCopy'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzosSCCS_SetCRLCacheSize'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nztnGCL_Get_Certificate_List'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_setCRLFile'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`A_X931RandomContextDestroy'
/usr/local/lib/instantclient_10_2/libclntsh.so: undefined reference to
`nzos_OToolkitContext'
..............
more messages ......
..............
collect2: ld returned 1 exit status
configure:24161: $? = 1
configure: failed program was:
|
|                 /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1

..............
more messages ......
..............

----------------

Any idea why it can't find libnnz10.so despite it being present and the
LD_LIBRARY_PATH set?

Here are my configure-params:
./configure --with-python --with-perl --with-php --with-curl --with-expat
--with-pg=/usr/local/pgsql/bin/pg_config --with-xerces
--with-grass=/usr/local/grass-6.4.0RC2/
--with-oci-include=/usr/local/lib/instantclient_10_2/sdk/include
--with-oci-lib=/usr/local/lib/instantclient_10_2

Thanks,
Andreas

On Thu, June 18, 2009 10:18 pm, Normand Savard wrote:
> Mateusz Loskot wrote:
>>
>>
>> ./configure generates a log file called config.log.
>> If something goes wrong, there should be some diagnostic in this file.
>> It would be helpful if you could share it, for instance, here:
>>
>> http://pastebin.com/
>>
>> This will help to find what's the problem.
>>
>>
> Maateusz,
>
> You were right, this help a lot.  I succeeded to build OGR with Oracle
> 10g and 11g but for those who may come on a similar issue in the future,
> I'm posting the process I went through.
>
> I downloaded
> oracle-instantclient-basic-10.2.0.4-1.i386.zip (library)
> oracle-instantclient-devel-10.2.0.4-1.i386.zip (headers)
>
> or
> instantclient-basic-linux32-11.1.0.7.zip (library)
> instantclient-sdk-linux32-11.1.0.7.zip (headers)
>
>
> As suggested I checked the config.log (see 1) and noticed that there was
> a link problem (-lclntsh).  I went to the instantclient directory to
> check for libclntsh.so, but it was not there.  So I added a link to
> libclntsh.so.11.1.
>
> I redid the configure and checked the config.log again (see 2).  I
> noticed that libnnz11.so library was not found.  I went to the
> instantclient directory but the library was present.  Since I use the
> fgs-dev environment the libraries are not in a traditional path so the
> linker could not find it.  To solve this issue, I added the path to
> where the library was installed to $LD_LIBRARY_PATH.  There was a
> problem with libaio.so.1 library.  For this particular issue I had to
> install libaio-dev on my system (Ubuntu:  apt-get install).
>
> It works fine after that.
>
> Thank you to both of you.
>
> Norm
>
>
>
> 1)config.log
> configure:23653: checking for Oracle OCI headers in
> /home/fgs/fgs-dev/built/ins\
> tantclient_11_1/sdk/include
> configure:23696: g++ -c -fPIC  -g -DDEBUG
> -I/home/fgs/fgs-dev/built/instantcli\
> ent_11_1/sdk/include conftest.cpp >&5
> configure:23702: $? = 0
> configure:23715: result: yes
> configure:23740: checking for Oracle OCI libraries in
> /home/fgs/fgs-dev/built/i\
> nstantclient_11_1
> configure:23743: result: norm:
> -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\
> lntsh
> configure:23745: result: norm:
> -I/home/fgs/fgs-dev/built/instantclient_11_1/sdk\
> /include
> configure:23781: g++ -o conftest -fPIC  -g -DDEBUG
> -I/home/fgs/fgs-dev/built/i\
> nstantclient_11_1/sdk/include
> -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\
> lntsh conftest.cpp -L/home/fgs/fgs-dev/built/jpeg
> -L/home/fgs/fgs-dev/built/jpe\
> g/lib -ljpeg -L/home/fgs/fgs-dev/built/libgeotiff/lib -lgeotiff
> -L/home/fgs/fgs\
> -dev/built/tiff/lib -ltiff -L/home/fgs/fgs-dev/built/libpng
> -L/home/fgs/fgs-dev\
> /built/libpng/lib -lpng -lpq -L/home/fgs/fgs-dev/built/postgresql/lib
> -lpq -lz \
> -L/home/fgs/fgs-dev/built/zlib -L/home/fgs/fgs-dev/built/zlib/lib  -lm
> -lrt -ld\
> l  >&5
> /usr/bin/ld: cannot find -lclntsh
> collect2: ld returned 1 exit status
> configure:23787: $? = 1
> configure: failed program was:
> |
> |                 /* confdefs.h.  */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
>
>
>
>
>
>
> 2) config.log
>
> configure:23740: checking for Oracle OCI libraries in
> /home/fgs/fgs-dev/built/i\
> nstantclient_11_1
> configure:23743: result: norm:
> -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\
> lntsh
> configure:23745: result: norm:
> -I/home/fgs/fgs-dev/built/instantclient_11_1/sdk\
> /include
> configure:23781: g++ -o conftest -fPIC  -g -DDEBUG
> -I/home/fgs/fgs-dev/built/i\
> nstantclient_11_1/sdk/include
> -L/home/fgs/fgs-dev/built/instantclient_11_1 -lc\
> lntsh conftest.cpp -L/home/fgs/fgs-dev/built/jpeg
> -L/home/fgs/fgs-dev/built/jpe\
> g/lib -ljpeg -L/home/fgs/fgs-dev/built/libgeotiff/lib -lgeotiff
> -L/home/fgs/fgs\
> -dev/built/tiff/lib -ltiff -L/home/fgs/fgs-dev/built/libpng
> -L/home/fgs/fgs-dev\
> /built/libpng/lib -lpng -lpq -L/home/fgs/fgs-dev/built/postgresql/lib
> -lpq -lz \
> -L/home/fgs/fgs-dev/built/zlib -L/home/fgs/fgs-dev/built/zlib/lib  -lm
> -lrt -ld\
> l  >&5
> /usr/bin/ld: warning: libnnz11.so, needed by
> /home/fgs/fgs-dev/built/instantcli\
> ent_11_1/libclntsh.so, not found (try using -rpath or -rpath-link)
> /usr/bin/ld: warning: libaio.so.1, needed by
> /home/fgs/fgs-dev/built/instantcli\
> ent_11_1/libclntsh.so, not found (try using -rpath or -rpath-link)
> /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined
> reference to\
>  `nzos_ServiceWriteQueue'
> /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined
> reference to\
>  `nzosCipherSpecToStr'
> /home/fgs/fgs-dev/built/instantclient_11_1/libclntsh.so: undefined
> reference to\
>  `C_SetCRLBER'
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Andreas Neumann
http://www.carto.net/neumann/
http://www.svgopen.org/



More information about the gdal-dev mailing list