Hi Even, Stefano, Ivan, Peter.

Thank you all for your quick replies!

Even's suggestion of using make clean did the trick!

After 'make clean' and building again the "OCI" label appeared in the ogrinfo -formats result. Indeed, I had many previously failed building attempts, specially before I completely decided which compile options
I truly needed!

Stefano suggestion of having /etc/ld.so.conf.d/oracle.conf: the file was already in place.

Also important was the advice from Peter Halls ([email protected]) to pay attention to have defined these two
env. variables: ORACLE_HOME and TNS_ADMIN.

ORACLE_HOME was set during Oracle Instant Client setup, but TNS_ADMIN was not. TNS_ADMIN should point to tnsnames.ora file directory, necessary to use TNS-based (simpler) connection strings to Oracle.

Again, thank you all very much!

On 04/30/2013 07:35 AM, Stefano Iacovella wrote:
You may also want to add path to instantclient in /etc/ld.so.conf.d
Just add a file, i.e oracle.conf, and insert inside it path to oracle instant client installation.
You may also want to check if
ldd /usr/local/bin/gdalinfo

lists reference to oracle libraries.


Cheers,

Stefano

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


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

http://twitter.com/#!/Iacovellas <http://twitter.com/#%21/Iacovellas>


2013/4/30 Even Rouault <[email protected] <mailto:[email protected]>>

    Le mardi 30 avril 2013 01:12:34, Rui Cavaco a écrit :
    > Hi Ivan, thanks for your quick reply!
    >
    > Yes, ogrinfo --formats doesn't list OCI.

    Did you try a "make clean" ? Because if you configured in serveral
    times, it is
    possible that the code that registers the driver didn't get
    recompiled.

    >
    > I'll check the thread in OTN you mentioned, it seems it has
    something
    > specific about Ubuntu. I'll feedback the results.
    >
    > Many thanks!
    > --
    > Rui Cavaco
    > ___________________________
    > SIG2000, Sist. de Infor. Geográfica, Lda.
    > Rua do Campo Alegre, 1306 Sala 308/107 4150 - 174 Porto
    > Tel.: + 351 22 606 75 77 <tel:%2B%20351%2022%20606%2075%2077>
    > Fax: + 351 22 606 75 78 <tel:%2B%20351%2022%20606%2075%2078>
    > Mail: [email protected] <mailto:[email protected]>
    > ________________________________________
    > De: Ivan Lucena [[email protected]
    <mailto:[email protected]>]
    > Enviado: segunda-feira, 29 de Abril de 2013 21:53
    > Para: Rui Cavaco; ""
    > Assunto: Re: [gdal-dev] Build GDAL with OCI support on Linux
    >
    > Hi Rui,
    >
    > >  -------Original Message-------
    > >  From: Rui Cavaco <[email protected] <mailto:[email protected]>>
    > >  To: [email protected] <mailto:[email protected]>
    > >  Subject: [gdal-dev] Build GDAL with OCI support on Linux
    > >  Sent: Apr 29 '13 15:29
    > >
    > >  Hello!
    > >
    > >  I'm trying to get OCI support in GDAL / OGR in Ubuntu 12.04
    32-bit.
    > >
    > >  I've successfully installed Oracle Instant Client 11_2 .
    SQLPlus works
    > >  flawlessly.
    > >  Building GDAL also ended with no errors.
    > >
    > >  But executing ogrinfo --formats, OCI format is not listed.
    > >
    > >  Building script is:
    > >
    > >  export LDFLAGS="-Wl,-no-as-needed"
    > >  ./configure \
    > >
    > >     --with-python --with-libkml=no --with-geotiff=internal \
    > >     --with-threads --with-libtiff=internal --with-geotiff=internal
    > >
    > >  --with-jpeg=internal --with-gif=internal --with-png=internal
    > >  --with-libz=internal \
    > >
    > >     --with-oci=yes \
    > >
    > >
     --with-oci-include=/usr/lib/oracle/instantclient_11_2/sdk/include \
    > >
    > > --with-oci-lib=/usr/lib/oracle/instantclient_11_2
    > >
    > >  make
    > >  sudo make install
    > >
    > >  Environment variables:
    > >
    > >
     LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/lib/oracle/instantclient_11_2:
    > >  /usr/local/lib:
    > >
     PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:
    > >  /usr/bin:/sbin:/bin:/usr/games:/usr/lib/oracle/instantclient_11_2
    > >
    > >  In Config.log, we can see:
    > >
    > >  configure:22485: checking for Oracle OCI headers in
    > >  /usr/lib/oracle/instantclient_11_2/sdk/include
    > >  configure:22518: g++ -c -g -O2
    > >  -I/usr/lib/oracle/instantclient_11_2/sdk/include conftest.cpp >&5
    > >  configure:22518: $? = 0
    > >  configure:22531: result: yes
    > >  configure:22552: checking for Oracle OCI libraries in
    > >  /usr/lib/oracle/instantclient_11_2
    > >  configure:22578: g++ -o conftest -g -O2
    > >  -I/usr/lib/oracle/instantclient_11_2/sdk/include
    -Wl,-no-as-needed
    > >  -L/usr/lib/oracle/instantclient_11_2 -lclntsh conftest.cpp
    -L/usr/lib
    > >  -lpq -lpthread -lm -lrt -ldl  >&5
    > >  configure:22578: $? = 0
    > >  configure:22582: result: yes
    > >  configure:22626: checking if Oracle OCI version is >= 10.0.1
    > >  configure:22646: result: yes
    > >  configure:22649: checking for Oracle version >= 10.x to use
    -lnnz10 flag
    > >  configure:22654: result: yes
    > >  configure:22675: checking if Oracle support is enabled
    > >  configure:22689: result: yes
    > >
    > >  configure:24105: checking for Oracle OCI headers in
    > >  /usr/lib/oracle/instantclient_11_2/sdk/include
    > >  configure:24138: g++ -c -g -O2
    > >  -I/usr/lib/oracle/instantclient_11_2/sdk/include conftest.cpp >&5
    > >  configure:24138: $? = 0
    > >  configure:24151: result: yes
    > >  configure:24172: checking for Oracle OCI libraries in
    > >  /usr/lib/oracle/instantclient_11_2
    > >  configure:24198: g++ -o conftest -g -O2
    > >  -I/usr/lib/oracle/instantclient_11_2/sdk/include
    -Wl,-no-as-needed
    > >  -L/usr/lib/oracle/instantclient_11_2 -lclntsh conftest.cpp
    -lexpat
    > >  -L/usr/lib -lpq -lpthread -lm -lrt -ldl  >&5
    > >  configure:24198: $? = 0
    > >  configure:24202: result: yes
    > >  configure:24246: checking if Oracle OCI version is >= 8.1.7
    > >  configure:24266: result: yes
    > >  configure:24269: checking for Oracle version >= 10.x to use
    -lnnz10 flag
    > >  configure:24274: result: yes
    > >  configure:24295: checking if Oracle support is enabled
    > >  configure:24309: result: yes
    > >
    > >  Apparently, no errors to be found.
    > >
    > >  But OGR tools cannot access Oracle datasources.
    >
    > What is the command line and the error message that tells you that?
    >
    > Can you see OCI as one of the driver when you run "ogrinfo
    --formats" ?
    >
    > There was a discussion about building GDAL on Ubuntu on OTN:
    >
    >
    https://forums.oracle.com/forums/thread.jspa?threadID=1128217&tstart=0&mess
    > ageID=10658264#10658264
    >
    > Regards,
    >
    > Ivan
    >
    > >  Hoping to get some help on this,
    > >
    > >  --
    > >  Rui Cavaco
    > >  Mail: [email protected] <mailto:[email protected]>
    > >  _______________________________________________
    > >  gdal-dev mailing list
    > > [email protected] <mailto:[email protected]>
    > > http://lists.osgeo.org/mailman/listinfo/gdal-dev
    >
    > _______________________________________________
    > gdal-dev mailing list
    > [email protected] <mailto:[email protected]>
    > http://lists.osgeo.org/mailman/listinfo/gdal-dev
    _______________________________________________
    gdal-dev mailing list
    [email protected] <mailto:[email protected]>
    http://lists.osgeo.org/mailman/listinfo/gdal-dev




--
Rui Cavaco
___________________________
SIG2000, Sist. de Infor. Geográfica, Lda.
Rua do Campo Alegre, 1306 Sala 308/107 4150 - 174 Porto
Tel.: + 351 22 606 75 77
Fax: + 351 22 606 75 78
Mail: [email protected]
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to