[gdal-dev] Problem Compiling with Oracle (--with-oci)

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Problem Compiling with Oracle (--with-oci)

Chris Hodgson
I'm trying to compile GDAL/OGR with support for Oracle/OCI. I have the
full oracle 11g server installed on CentOS 5.3.

# configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
# make
...
libtool:.....
g++: /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so: No
such file or directory

I think this path might be from the person who compiled the OCI
libraries for oracle 11? I have nothing remotely like it on my system.
If I add --with-expat=no to my configure line I get errors during
linking about undefined references to XML_... so I'm guessing the linked
OCI drivers need the expat lib linked in.

I added /opt/oracle/product/11.2.0/dbhome_1/lib to my LD_LIBRARY_PATH,
and there is a libexpat.so.1.5.2 there, as well as my
/lib/libexpat.so.0.5.0 which is from my CentOS standarad RPMS:

# rpm -qa | grep expat
expat-1.95.8-8.2.1
expat-devel-1.95.8-8.2.1

I also tried --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
are no headers there, among other problems.

How can I get this to work?

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

Re: Problem Compiling with Oracle (--with-oci)

Chris Hodgson
grep tells me that the /ade/smayer.../ path is not in any text file in
my gdal distribution (even after configuring) - which I grabbed the
latest 1.8.0 from osgeo.org.

Chris

Ivan Lucena wrote:

> Chris,
>
> I am not on my Linux machine now to confirm but I would never needed to use --with-expat pointing to Oracle's path. It is fanny that you found that smaver path. Sounds like you got a tar.gz package from someone, not from a GDAL distribution.
>
> The OCI driver should not depend in nothing but OCI apart from GDAL/OGR stuff.
>
> Regards,
>
> Ivan
>
>
>  
>>  -------Original Message-------
>>  From: Chris Hodgson <[hidden email]>
>>  To: [hidden email]
>>  Subject: [gdal-dev] Problem Compiling with Oracle (--with-oci)
>>  Sent: Jun 20 '11 17:43
>>  
>>  I'm trying to compile GDAL/OGR with support for Oracle/OCI. I have the
>>  full oracle 11g server installed on CentOS 5.3.
>>  
>>  # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
>>  # make
>>  ...
>>  libtool:.....
>>  g++: /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so: No
>>  such file or directory
>>  
>>  I think this path might be from the person who compiled the OCI
>>  libraries for oracle 11? I have nothing remotely like it on my system.
>>  If I add --with-expat=no to my configure line I get errors during
>>  linking about undefined references to XML_... so I'm guessing the linked
>>  OCI drivers need the expat lib linked in.
>>  
>>  I added /opt/oracle/product/11.2.0/dbhome_1/lib to my LD_LIBRARY_PATH,
>>  and there is a libexpat.so.1.5.2 there, as well as my
>>  /lib/libexpat.so.0.5.0 which is from my CentOS standarad RPMS:
>>  
>>  # rpm -qa | grep expat
>>  expat-1.95.8-8.2.1
>>  expat-devel-1.95.8-8.2.1
>>  
>>  I also tried --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
>>  are no headers there, among other problems.
>>  
>>  How can I get this to work?
>>  
>>  Thanks,
>>  Chris
>>  _______________________________________________
>>  gdal-dev mailing list
>>  [hidden email]
>>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>  
>>    

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

Re: Problem Compiling with Oracle (--with-oci)

nickos85
check the configure file it might need changes (vi configure)

you can add the elgis repo add the devel package and start getting involved with
the compile.

this is a src rpm:

http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm

if you are familiar with spec files I strongly suggest you to do it that way :)

--Nikos Hatzopoulos

On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson <[hidden email]> wrote:
grep tells me that the /ade/smayer.../ path is not in any text file in my gdal distribution (even after configuring) - which I grabbed the latest 1.8.0 from osgeo.org.

Chris

Ivan Lucena wrote:
Chris,

I am not on my Linux machine now to confirm but I would never needed to use --with-expat pointing to Oracle's path. It is fanny that you found that smaver path. Sounds like you got a tar.gz package from someone, not from a GDAL distribution.

The OCI driver should not depend in nothing but OCI apart from GDAL/OGR stuff.

Regards,

Ivan



 
 -------Original Message-------
 From: Chris Hodgson <[hidden email]>
 To: [hidden email]
 Subject: [gdal-dev] Problem Compiling with Oracle (--with-oci)
 Sent: Jun 20 '11 17:43
 I'm trying to compile GDAL/OGR with support for Oracle/OCI. I have the
 full oracle 11g server installed on CentOS 5.3.
 # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
 # make
 ...
 libtool:.....
 g++: /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so: No
 such file or directory
 I think this path might be from the person who compiled the OCI
 libraries for oracle 11? I have nothing remotely like it on my system.
 If I add --with-expat=no to my configure line I get errors during
 linking about undefined references to XML_... so I'm guessing the linked
 OCI drivers need the expat lib linked in.
 I added /opt/oracle/product/11.2.0/dbhome_1/lib to my LD_LIBRARY_PATH,
 and there is a libexpat.so.1.5.2 there, as well as my
 /lib/libexpat.so.0.5.0 which is from my CentOS standarad RPMS:
 # rpm -qa | grep expat
 expat-1.95.8-8.2.1
 expat-devel-1.95.8-8.2.1
 I also tried --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
 are no headers there, among other problems.
 How can I get this to work?
 Thanks,
 Chris
 _______________________________________________
 gdal-dev mailing list
 [hidden email]
 http://lists.osgeo.org/mailman/listinfo/gdal-dev
   

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


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

Re: Problem Compiling with Oracle (--with-oci)

Chris Hodgson
What would need changed in the configure file? There is no reference
there to the non-existent libexpat.

I'm not familiar with spec files... but if I wanted to learn - what
could I do there that I couldn't do in the configure/make process? The
spec file still uses the package's build system right?

It's not until the final linking with libtool that the problem happens,
I just don't know what I need to tell libtool to get it to smarten up...

Surely other people have compiled with support for oracle 11g? CentOS is
just repackaged RHEL.... I don't know what I'm doing that is out of the
ordinary here.

Chris

Nikolaos Hatzopoulos wrote:

> check the configure file it might need changes (vi configure)
>
> you can add the elgis repo add the devel package and start getting
> involved with
> the compile.
>
> this is a src rpm:
>
> http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm
>
> if you are familiar with spec files I strongly suggest you to do it
> that way :)
>
> --Nikos Hatzopoulos
>
> On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     grep tells me that the /ade/smayer.../ path is not in any text
>     file in my gdal distribution (even after configuring) - which I
>     grabbed the latest 1.8.0 from osgeo.org <http://osgeo.org>.
>
>     Chris
>
>     Ivan Lucena wrote:
>
>         Chris,
>
>         I am not on my Linux machine now to confirm but I would never
>         needed to use --with-expat pointing to Oracle's path. It is
>         fanny that you found that smaver path. Sounds like you got a
>         tar.gz package from someone, not from a GDAL distribution.
>
>         The OCI driver should not depend in nothing but OCI apart from
>         GDAL/OGR stuff.
>
>         Regards,
>
>         Ivan
>
>
>
>          
>
>              -------Original Message-------
>              From: Chris Hodgson <[hidden email]
>             <mailto:[hidden email]>>
>              To: [hidden email]
>             <mailto:[hidden email]>
>              Subject: [gdal-dev] Problem Compiling with Oracle
>             (--with-oci)
>              Sent: Jun 20 '11 17:43
>              I'm trying to compile GDAL/OGR with support for
>             Oracle/OCI. I have the
>              full oracle 11g server installed on CentOS 5.3.
>              # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
>              # make
>              ...
>              libtool:.....
>              g++:
>             /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so:
>             No
>              such file or directory
>              I think this path might be from the person who compiled
>             the OCI
>              libraries for oracle 11? I have nothing remotely like it
>             on my system.
>              If I add --with-expat=no to my configure line I get
>             errors during
>              linking about undefined references to XML_... so I'm
>             guessing the linked
>              OCI drivers need the expat lib linked in.
>              I added /opt/oracle/product/11.2.0/dbhome_1/lib to my
>             LD_LIBRARY_PATH,
>              and there is a libexpat.so.1.5.2 there, as well as my
>              /lib/libexpat.so.0.5.0 which is from my CentOS standarad
>             RPMS:
>              # rpm -qa | grep expat
>              expat-1.95.8-8.2.1
>              expat-devel-1.95.8-8.2.1
>              I also tried
>             --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
>              are no headers there, among other problems.
>              How can I get this to work?
>              Thanks,
>              Chris
>              _______________________________________________
>              gdal-dev mailing list
>              [hidden email] <mailto:[hidden email]>
>              http://lists.osgeo.org/mailman/listinfo/gdal-dev
>                
>
>
>     _______________________________________________
>     gdal-dev mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>

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

Re: Problem Compiling with Oracle (--with-oci)

Howard Butler
In reply to this post by Chris Hodgson

On Jun 20, 2011, at 5:43 PM, Chris Hodgson wrote:

> I'm trying to compile GDAL/OGR with support for Oracle/OCI. I have the full oracle 11g server installed on CentOS 5.3.
>
> # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
> # make
> ...
> libtool:.....
> g++: /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so: No such file or directory
>
> I think this path might be from the person who compiled the OCI libraries for oracle 11?

Yes, this is due to Oracle's inclusion of an ancient expat in their SDK. There's no headers there either, but it's too old to work with GDAL even if there was.  

> How can I get this to work?

not sure, I think I just fumbled through._______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling with Oracle (--with-oci)

Ivan Lucena
In reply to this post by Chris Hodgson
Hi Chris,

I would not advise changing the configuration file.

If you have a full installation of Oracle in your system you probably have a ORACLE_HOME environment variable, so if you run:

$ ./configure
...
checking for Oracle OCI headers in /oracle/path/... yes
checking for Oracle OCI libraries in /oracle/path/lib... yes
checking if Oracle OCI version is >= 8.1.7 ... yes
checking for Oracle version >= 10.x to use -lnnz10 flag... yes
checking if Oracle support is enabled... yes
...
  OCI support:               yes
  GEORASTER support:         yes
...

If you don't have ORACLE_HOME you can pass the path using

$ ./configure --with-oci=/oracle/path/...

Now, you system is CentOS and I have never build GDAL on it but I would guess that it doesn't have Expat installed yet. My Linux does, so configure finds it:

checking for XML_ParserCreate in -lexpat... yes
checking for Expat XML Parser headers in /usr/include... found
checking for Expat XML Parser... yes

My suggestion is to isolate the problem by running ./configure, make and gdalinfo without Expat once and then make clean, ./configure, make and gdalinfo without OCI, ex:

% ./configure --with-expat=NO
% ./configure --with-OCI=NO

Configure will setup your makefiles, then you run make based on those new settings.

Good luck.

Ivan


>  -------Original Message-------
>  From: Chris Hodgson <[hidden email]>
>  To: [hidden email]
>  Subject: Re: [gdal-dev] Problem Compiling with Oracle (--with-oci)
>  Sent: Jun 21 '11 12:38
>  
>  What would need changed in the configure file? There is no reference
>  there to the non-existent libexpat.
>  
>  I'm not familiar with spec files... but if I wanted to learn - what
>  could I do there that I couldn't do in the configure/make process? The
>  spec file still uses the package's build system right?
>  
>  It's not until the final linking with libtool that the problem happens,
>  I just don't know what I need to tell libtool to get it to smarten up...
>  
>  Surely other people have compiled with support for oracle 11g? CentOS is
>  just repackaged RHEL.... I don't know what I'm doing that is out of the
>  ordinary here.
>  
>  Chris
>  
>  Nikolaos Hatzopoulos wrote:
>  > check the configure file it might need changes (vi configure)
>  >
>  > you can add the elgis repo add the devel package and start getting
>  > involved with
>  > the compile.
>  >
>  > this is a src rpm:
>  >
>  > http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm
>  >
>  > if you are familiar with spec files I strongly suggest you to do it
>  > that way :)
>  >
>  > --Nikos Hatzopoulos
>  >
>  > On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson
>  > <[hidden email] <mailto:[hidden email]>> wrote:
>  >
>  >     grep tells me that the /ade/smayer.../ path is not in any text
>  >     file in my gdal distribution (even after configuring) - which I
>  >     grabbed the latest 1.8.0 from osgeo.org <http://osgeo.org>.
>  >
>  >     Chris
>  >
>  >     Ivan Lucena wrote:
>  >
>  >         Chris,
>  >
>  >         I am not on my Linux machine now to confirm but I would never
>  >         needed to use --with-expat pointing to Oracle's path. It is
>  >         fanny that you found that smaver path. Sounds like you got a
>  >         tar.gz package from someone, not from a GDAL distribution.
>  >
>  >         The OCI driver should not depend in nothing but OCI apart from
>  >         GDAL/OGR stuff.
>  >
>  >         Regards,
>  >
>  >         Ivan
>  >
>  >
>  >
>  >          
>  >
>  >              -------Original Message-------
>  >              From: Chris Hodgson <[hidden email]
>  >             <mailto:[hidden email]>>
>  >              To: [hidden email]
>  >             <mailto:[hidden email]>
>  >              Subject: [gdal-dev] Problem Compiling with Oracle
>  >             (--with-oci)
>  >              Sent: Jun 20 '11 17:43
>  >              I'm trying to compile GDAL/OGR with support for
>  >             Oracle/OCI. I have the
>  >              full oracle 11g server installed on CentOS 5.3.
>  >              # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
>  >              # make
>  >              ...
>  >              libtool:.....
>  >              g++:
>  >             /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so:
>  >             No
>  >              such file or directory
>  >              I think this path might be from the person who compiled
>  >             the OCI
>  >              libraries for oracle 11? I have nothing remotely like it
>  >             on my system.
>  >              If I add --with-expat=no to my configure line I get
>  >             errors during
>  >              linking about undefined references to XML_... so I'm
>  >             guessing the linked
>  >              OCI drivers need the expat lib linked in.
>  >              I added /opt/oracle/product/11.2.0/dbhome_1/lib to my
>  >             LD_LIBRARY_PATH,
>  >              and there is a libexpat.so.1.5.2 there, as well as my
>  >              /lib/libexpat.so.0.5.0 which is from my CentOS standarad
>  >             RPMS:
>  >              # rpm -qa | grep expat
>  >              expat-1.95.8-8.2.1
>  >              expat-devel-1.95.8-8.2.1
>  >              I also tried
>  >             --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
>  >              are no headers there, among other problems.
>  >              How can I get this to work?
>  >              Thanks,
>  >              Chris
>  >              _______________________________________________
>  >              gdal-dev mailing list
>  >              [hidden email] <mailto:[hidden email]>
>  >              http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  >                
>  >
>  >
>  >     _______________________________________________
>  >     gdal-dev mailing list
>  >     [hidden email] <mailto:[hidden email]>
>  >     http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  >
>  >
>  
>  _______________________________________________
>  gdal-dev mailing list
>  [hidden email]
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>  
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Problem Compiling with Oracle (--with-oci)

Chris Hodgson
Ivan I appreciate your help here, but I think I've already tried
everything you are suggesting. I dont' have an ORACLE_HOME set on the
user doing this compiling, so if I don't specify --with-oci=... I don't
get oracle support. I do have expat 1.95 installed (with -devel package
as well) and it is automatically picked up by configure.

I can build gdal successfully with no configure options, it builds with
expat support among other defaults.

If I specify --with-oci, I get the error about the funny libexpat path,
if I add --with-expat=no, I get past that error, but get an error later
when it can't find the XML_* symbols that the oracle library needs to be
linked to. In neither of these cases to i get a working version of
gdalinfo built.

It seems to me that I need to link in expat for the oracle library, but
I'm not sure if it is compatible with the 1.95 version the my system has
installed and that GDAL requires if I specify --with-expat  ... because
there is an libexpat.so.0.5 in the oracle lib directory. Since I don't
actually need GDAL's expat support, I'm fine with --with-expat=no ...
but then I need to somehow tell libtool to ignore the funny expat path
it is finding and use the expat in the oracle directory... perhaps the
best way to do this is just to copy the libtool command that is failing
in the build and tweak it manually to have the right path to the oracle
expat instead of the funny path... however I won't be able to get to the
next step of the build to see what other commands I need to run... is
there a way to modify the makefile or tell configure about this?

Thanks,
Chris

Ivan Lucena wrote:

> Hi Chris,
>
> I would not advise changing the configuration file.
>
> If you have a full installation of Oracle in your system you probably have a ORACLE_HOME environment variable, so if you run:
>
> $ ./configure
> ...
> checking for Oracle OCI headers in /oracle/path/... yes
> checking for Oracle OCI libraries in /oracle/path/lib... yes
> checking if Oracle OCI version is >= 8.1.7 ... yes
> checking for Oracle version >= 10.x to use -lnnz10 flag... yes
> checking if Oracle support is enabled... yes
> ...
>   OCI support:               yes
>   GEORASTER support:         yes
> ...
>
> If you don't have ORACLE_HOME you can pass the path using
>
> $ ./configure --with-oci=/oracle/path/...
>
> Now, you system is CentOS and I have never build GDAL on it but I would guess that it doesn't have Expat installed yet. My Linux does, so configure finds it:
>
> checking for XML_ParserCreate in -lexpat... yes
> checking for Expat XML Parser headers in /usr/include... found
> checking for Expat XML Parser... yes
>
> My suggestion is to isolate the problem by running ./configure, make and gdalinfo without Expat once and then make clean, ./configure, make and gdalinfo without OCI, ex:
>
> % ./configure --with-expat=NO
> % ./configure --with-OCI=NO
>
> Configure will setup your makefiles, then you run make based on those new settings.
>
> Good luck.
>
> Ivan
>
>
>  
>>  -------Original Message-------
>>  From: Chris Hodgson <[hidden email]>
>>  To: [hidden email]
>>  Subject: Re: [gdal-dev] Problem Compiling with Oracle (--with-oci)
>>  Sent: Jun 21 '11 12:38
>>  
>>  What would need changed in the configure file? There is no reference
>>  there to the non-existent libexpat.
>>  
>>  I'm not familiar with spec files... but if I wanted to learn - what
>>  could I do there that I couldn't do in the configure/make process? The
>>  spec file still uses the package's build system right?
>>  
>>  It's not until the final linking with libtool that the problem happens,
>>  I just don't know what I need to tell libtool to get it to smarten up...
>>  
>>  Surely other people have compiled with support for oracle 11g? CentOS is
>>  just repackaged RHEL.... I don't know what I'm doing that is out of the
>>  ordinary here.
>>  
>>  Chris
>>  
>>  Nikolaos Hatzopoulos wrote:
>>  > check the configure file it might need changes (vi configure)
>>  >
>>  > you can add the elgis repo add the devel package and start getting
>>  > involved with
>>  > the compile.
>>  >
>>  > this is a src rpm:
>>  >
>>  > http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm
>>  >
>>  > if you are familiar with spec files I strongly suggest you to do it
>>  > that way :)
>>  >
>>  > --Nikos Hatzopoulos
>>  >
>>  > On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson
>>  > <[hidden email] <mailto:[hidden email]>> wrote:
>>  >
>>  >     grep tells me that the /ade/smayer.../ path is not in any text
>>  >     file in my gdal distribution (even after configuring) - which I
>>  >     grabbed the latest 1.8.0 from osgeo.org <http://osgeo.org>.
>>  >
>>  >     Chris
>>  >
>>  >     Ivan Lucena wrote:
>>  >
>>  >         Chris,
>>  >
>>  >         I am not on my Linux machine now to confirm but I would never
>>  >         needed to use --with-expat pointing to Oracle's path. It is
>>  >         fanny that you found that smaver path. Sounds like you got a
>>  >         tar.gz package from someone, not from a GDAL distribution.
>>  >
>>  >         The OCI driver should not depend in nothing but OCI apart from
>>  >         GDAL/OGR stuff.
>>  >
>>  >         Regards,
>>  >
>>  >         Ivan
>>  >
>>  >
>>  >
>>  >          
>>  >
>>  >              -------Original Message-------
>>  >              From: Chris Hodgson <[hidden email]
>>  >             <mailto:[hidden email]>>
>>  >              To: [hidden email]
>>  >             <mailto:[hidden email]>
>>  >              Subject: [gdal-dev] Problem Compiling with Oracle
>>  >             (--with-oci)
>>  >              Sent: Jun 20 '11 17:43
>>  >              I'm trying to compile GDAL/OGR with support for
>>  >             Oracle/OCI. I have the
>>  >              full oracle 11g server installed on CentOS 5.3.
>>  >              # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
>>  >              # make
>>  >              ...
>>  >              libtool:.....
>>  >              g++:
>>  >             /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so:
>>  >             No
>>  >              such file or directory
>>  >              I think this path might be from the person who compiled
>>  >             the OCI
>>  >              libraries for oracle 11? I have nothing remotely like it
>>  >             on my system.
>>  >              If I add --with-expat=no to my configure line I get
>>  >             errors during
>>  >              linking about undefined references to XML_... so I'm
>>  >             guessing the linked
>>  >              OCI drivers need the expat lib linked in.
>>  >              I added /opt/oracle/product/11.2.0/dbhome_1/lib to my
>>  >             LD_LIBRARY_PATH,
>>  >              and there is a libexpat.so.1.5.2 there, as well as my
>>  >              /lib/libexpat.so.0.5.0 which is from my CentOS standarad
>>  >             RPMS:
>>  >              # rpm -qa | grep expat
>>  >              expat-1.95.8-8.2.1
>>  >              expat-devel-1.95.8-8.2.1
>>  >              I also tried
>>  >             --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
>>  >              are no headers there, among other problems.
>>  >              How can I get this to work?
>>  >              Thanks,
>>  >              Chris
>>  >              _______________________________________________
>>  >              gdal-dev mailing list
>>  >              [hidden email] <mailto:[hidden email]>
>>  >              http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>  >                
>>  >
>>  >
>>  >     _______________________________________________
>>  >     gdal-dev mailing list
>>  >     [hidden email] <mailto:[hidden email]>
>>  >     http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>  >
>>  >
>>  
>>  _______________________________________________
>>  gdal-dev mailing list
>>  [hidden email]
>>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>  
>>    

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

Re: Problem Compiling with Oracle (--with-oci)

nickos85
vi configure :)

--Nikos

On Tue, Jun 21, 2011 at 12:02 PM, Chris Hodgson <[hidden email]> wrote:
Ivan I appreciate your help here, but I think I've already tried everything you are suggesting. I dont' have an ORACLE_HOME set on the user doing this compiling, so if I don't specify --with-oci=... I don't get oracle support. I do have expat 1.95 installed (with -devel package as well) and it is automatically picked up by configure.

I can build gdal successfully with no configure options, it builds with expat support among other defaults.

If I specify --with-oci, I get the error about the funny libexpat path, if I add --with-expat=no, I get past that error, but get an error later when it can't find the XML_* symbols that the oracle library needs to be linked to. In neither of these cases to i get a working version of gdalinfo built.

It seems to me that I need to link in expat for the oracle library, but I'm not sure if it is compatible with the 1.95 version the my system has installed and that GDAL requires if I specify --with-expat  ... because there is an libexpat.so.0.5 in the oracle lib directory. Since I don't actually need GDAL's expat support, I'm fine with --with-expat=no ... but then I need to somehow tell libtool to ignore the funny expat path it is finding and use the expat in the oracle directory... perhaps the best way to do this is just to copy the libtool command that is failing in the build and tweak it manually to have the right path to the oracle expat instead of the funny path... however I won't be able to get to the next step of the build to see what other commands I need to run... is there a way to modify the makefile or tell configure about this?

Thanks,
Chris


Ivan Lucena wrote:
Hi Chris,

I would not advise changing the configuration file.

If you have a full installation of Oracle in your system you probably have a ORACLE_HOME environment variable, so if you run:

$ ./configure
...
checking for Oracle OCI headers in /oracle/path/... yes
checking for Oracle OCI libraries in /oracle/path/lib... yes
checking if Oracle OCI version is >= 8.1.7 ... yes
checking for Oracle version >= 10.x to use -lnnz10 flag... yes
checking if Oracle support is enabled... yes
...
 OCI support:               yes
 GEORASTER support:         yes
...

If you don't have ORACLE_HOME you can pass the path using

$ ./configure --with-oci=/oracle/path/...

Now, you system is CentOS and I have never build GDAL on it but I would guess that it doesn't have Expat installed yet. My Linux does, so configure finds it:

checking for XML_ParserCreate in -lexpat... yes
checking for Expat XML Parser headers in /usr/include... found
checking for Expat XML Parser... yes

My suggestion is to isolate the problem by running ./configure, make and gdalinfo without Expat once and then make clean, ./configure, make and gdalinfo without OCI, ex:

% ./configure --with-expat=NO % ./configure --with-OCI=NO

Configure will setup your makefiles, then you run make based on those new settings.
Good luck.

Ivan


 
 -------Original Message-------
 From: Chris Hodgson <[hidden email]>
 To: [hidden email]
 Subject: Re: [gdal-dev] Problem Compiling with Oracle (--with-oci)
 Sent: Jun 21 '11 12:38
 What would need changed in the configure file? There is no reference
 there to the non-existent libexpat.
 I'm not familiar with spec files... but if I wanted to learn - what
 could I do there that I couldn't do in the configure/make process? The
 spec file still uses the package's build system right?
 It's not until the final linking with libtool that the problem happens,
 I just don't know what I need to tell libtool to get it to smarten up...
 Surely other people have compiled with support for oracle 11g? CentOS is
 just repackaged RHEL.... I don't know what I'm doing that is out of the
 ordinary here.
 Chris
 Nikolaos Hatzopoulos wrote:
 > check the configure file it might need changes (vi configure)
 >
 > you can add the elgis repo add the devel package and start getting
 > involved with
 > the compile.
 >
 > this is a src rpm:
 >
 > http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm
 >
 > if you are familiar with spec files I strongly suggest you to do it
 > that way :)
 >
 > --Nikos Hatzopoulos
 >
 > On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson
 > <[hidden email] <mailto:[hidden email]>> wrote:
 >
 >     grep tells me that the /ade/smayer.../ path is not in any text
 >     file in my gdal distribution (even after configuring) - which I
 >     grabbed the latest 1.8.0 from osgeo.org <http://osgeo.org>.
 >
 >     Chris
 >
 >     Ivan Lucena wrote:
 >
 >         Chris,
 >
 >         I am not on my Linux machine now to confirm but I would never
 >         needed to use --with-expat pointing to Oracle's path. It is
 >         fanny that you found that smaver path. Sounds like you got a
 >         tar.gz package from someone, not from a GDAL distribution.
 >
 >         The OCI driver should not depend in nothing but OCI apart from
 >         GDAL/OGR stuff.
 >
 >         Regards,
 >
 >         Ivan
 >
 >
 >
 >           >
 >              -------Original Message-------
 >              From: Chris Hodgson <[hidden email]
 >             <mailto:[hidden email]>>
 >              To: [hidden email]
 >             <mailto:[hidden email]>
 >              Subject: [gdal-dev] Problem Compiling with Oracle
 >             (--with-oci)
 >              Sent: Jun 20 '11 17:43
 >              I'm trying to compile GDAL/OGR with support for
 >             Oracle/OCI. I have the
 >              full oracle 11g server installed on CentOS 5.3.
 >              # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
 >              # make
 >              ...
 >              libtool:.....
 >              g++:
 >             /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so:
 >             No
 >              such file or directory
 >              I think this path might be from the person who compiled
 >             the OCI
 >              libraries for oracle 11? I have nothing remotely like it
 >             on my system.
 >              If I add --with-expat=no to my configure line I get
 >             errors during
 >              linking about undefined references to XML_... so I'm
 >             guessing the linked
 >              OCI drivers need the expat lib linked in.
 >              I added /opt/oracle/product/11.2.0/dbhome_1/lib to my
 >             LD_LIBRARY_PATH,
 >              and there is a libexpat.so.1.5.2 there, as well as my
 >              /lib/libexpat.so.0.5.0 which is from my CentOS standarad
 >             RPMS:
 >              # rpm -qa | grep expat
 >              expat-1.95.8-8.2.1
 >              expat-devel-1.95.8-8.2.1
 >              I also tried
 >             --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
 >              are no headers there, among other problems.
 >              How can I get this to work?
 >              Thanks,
 >              Chris
 >              _______________________________________________
 >              gdal-dev mailing list
 >              [hidden email] <mailto:[hidden email]>
 >              http://lists.osgeo.org/mailman/listinfo/gdal-dev
 >                 >
 >
 >     _______________________________________________
 >     gdal-dev mailing list
 >     [hidden email] <mailto:[hidden email]>
 >     http://lists.osgeo.org/mailman/listinfo/gdal-dev
 >
 >
 _______________________________________________
 gdal-dev mailing list
 [hidden email]
 http://lists.osgeo.org/mailman/listinfo/gdal-dev
   

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


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

Re: Problem Compiling with Oracle (--with-oci)

Smith, Michael ERDC-CRREL-NH
Re: [gdal-dev] Problem Compiling with Oracle (--with-oci) I have the expat 1.95 added via standed RHEL repo and using oracle instant client (11.2) without a problem with GDAL from SVN

I use

./configure \
    --with-libtiff=internal \
    --with-geotiff=internal \
    --with-jpeg=internal \
    --with-libz=internal \
    --with-png=internal \
    --with-oci=/oracle/instantclient_11_1 \
    --with-geos=/usr/local/bin/geos-config \
    --with-curl \
    --with-threads \
    --with-expat=yes \
    --with-libkml \
    --with-python


Mike


--
Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers
Hanover, NH



On 6/21/11  3:15 PM, "Nikolaos Hatzopoulos" <nhatzop@...> wrote:

vi configure :)

--Nikos

On Tue, Jun 21, 2011 at 12:02 PM, Chris Hodgson <chodgson@...> wrote:
Ivan I appreciate your help here, but I think I've already tried everything you are suggesting. I dont' have an ORACLE_HOME set on the user doing this compiling, so if I don't specify --with-oci=... I don't get oracle support. I do have expat 1.95 installed (with -devel package as well) and it is automatically picked up by configure.

I can build gdal successfully with no configure options, it builds with expat support among other defaults.

If I specify --with-oci, I get the error about the funny libexpat path, if I add --with-expat=no, I get past that error, but get an error later when it can't find the XML_* symbols that the oracle library needs to be linked to. In neither of these cases to i get a working version of gdalinfo built.

It seems to me that I need to link in expat for the oracle library, but I'm not sure if it is compatible with the 1.95 version the my system has installed and that GDAL requires if I specify --with-expat  ... because there is an libexpat.so.0.5 in the oracle lib directory. Since I don't actually need GDAL's expat support, I'm fine with --with-expat=no ... but then I need to somehow tell libtool to ignore the funny expat path it is finding and use the expat in the oracle directory... perhaps the best way to do this is just to copy the libtool command that is failing in the build and tweak it manually to have the right path to the oracle expat instead of the funny path... however I won't be able to get to the next step of the build to see what other commands I need to run... is there a way to modify the makefile or tell configure about this?

Thanks,
Chris


Ivan Lucena wrote:
Hi Chris,

I would not advise changing the configuration file.

If you have a full installation of Oracle in your system you probably have a ORACLE_HOME environment variable, so if you run:

$ ./configure
...
checking for Oracle OCI headers in /oracle/path/... yes
checking for Oracle OCI libraries in /oracle/path/lib... yes
checking if Oracle OCI version is >= 8.1.7 ... yes
checking for Oracle version >= 10.x to use -lnnz10 flag... yes
checking if Oracle support is enabled... yes
...
  OCI support:               yes
  GEORASTER support:         yes
...

If you don't have ORACLE_HOME you can pass the path using

$ ./configure --with-oci=/oracle/path/...

Now, you system is CentOS and I have never build GDAL on it but I would guess that it doesn't have Expat installed yet. My Linux does, so configure finds it:

checking for XML_ParserCreate in -lexpat... yes
checking for Expat XML Parser headers in /usr/include... found
checking for Expat XML Parser... yes

My suggestion is to isolate the problem by running ./configure, make and gdalinfo without Expat once and then make clean, ./configure, make and gdalinfo without OCI, ex:

% ./configure --with-expat=NO % ./configure --with-OCI=NO

Configure will setup your makefiles, then you run make based on those new settings.
Good luck.

Ivan


  
 -------Original Message-------
 From: Chris Hodgson <chodgson@...>
 To: gdal-dev@...
 Subject: Re: [gdal-dev] Problem Compiling with Oracle (--with-oci)
 Sent: Jun 21 '11 12:38
  What would need changed in the configure file? There is no reference
 there to the non-existent libexpat.
  I'm not familiar with spec files... but if I wanted to learn - what
 could I do there that I couldn't do in the configure/make process? The
 spec file still uses the package's build system right?
  It's not until the final linking with libtool that the problem happens,
 I just don't know what I need to tell libtool to get it to smarten up...
  Surely other people have compiled with support for oracle 11g? CentOS is
 just repackaged RHEL.... I don't know what I'm doing that is out of the
 ordinary here.
  Chris
  Nikolaos Hatzopoulos wrote:
 > check the configure file it might need changes (vi configure)
 >
 > you can add the elgis repo add the devel package and start getting
 > involved with
 > the compile.
 >
 > this is a src rpm:
 >
 > http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm <http://elgis.argeo.org/repos/testing/5/elgis/SRPMS/gdal-1.8.0-2.el5.elgis.src.rpm>
 >
 > if you are familiar with spec files I strongly suggest you to do it
 > that way :)
 >
 > --Nikos Hatzopoulos
 >
 > On Mon, Jun 20, 2011 at 4:49 PM, Chris Hodgson
 > <chodgson@... <[hidden email] <[hidden email]> >> wrote:
 >
 >     grep tells me that the /ade/smayer.../ path is not in any text
 >     file in my gdal distribution (even after configuring) - which I
 >     grabbed the latest 1.8.0 from osgeo.org <http://osgeo.org>  <http://osgeo.org>.
 >
 >     Chris
 >
 >     Ivan Lucena wrote:
 >
 >         Chris,
 >
 >         I am not on my Linux machine now to confirm but I would never
 >         needed to use --with-expat pointing to Oracle's path. It is
 >         fanny that you found that smaver path. Sounds like you got a
 >         tar.gz package from someone, not from a GDAL distribution.
 >
 >         The OCI driver should not depend in nothing but OCI apart from
 >         GDAL/OGR stuff.
 >
 >         Regards,
 >
 >         Ivan
 >
 >
 >
 >           >
 >              -------Original Message-------
 >              From: Chris Hodgson <chodgson@...
 >             <[hidden email] <[hidden email]> >>
 >              To: gdal-dev@...
 >             <[hidden email] <[hidden email]> >
 >              Subject: [gdal-dev] Problem Compiling with Oracle
 >             (--with-oci)
 >              Sent: Jun 20 '11 17:43
 >              I'm trying to compile GDAL/OGR with support for
 >             Oracle/OCI. I have the
 >              full oracle 11g server installed on CentOS 5.3.
 >              # configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
 >              # make
 >              ...
 >              libtool:.....
 >              g++:
 >             /ade/smayer_perl_510/perl_source/expat_home/lib/libexpat.so:
 >             No
 >              such file or directory
 >              I think this path might be from the person who compiled
 >             the OCI
 >              libraries for oracle 11? I have nothing remotely like it
 >             on my system.
 >              If I add --with-expat=no to my configure line I get
 >             errors during
 >              linking about undefined references to XML_... so I'm
 >             guessing the linked
 >              OCI drivers need the expat lib linked in.
 >              I added /opt/oracle/product/11.2.0/dbhome_1/lib to my
 >             LD_LIBRARY_PATH,
 >              and there is a libexpat.so.1.5.2 there, as well as my
 >              /lib/libexpat.so.0.5.0 which is from my CentOS standarad
 >             RPMS:
 >              # rpm -qa | grep expat
 >              expat-1.95.8-8.2.1
 >              expat-devel-1.95.8-8.2.1
 >              I also tried
 >             --with-expat=/opt/oracle/product/11.2.0/dbhome_1/ but there
 >              are no headers there, among other problems.
 >              How can I get this to work?
 >              Thanks,
 >              Chris
 >              _______________________________________________
 >              gdal-dev mailing list
 >              gdal-dev@... <[hidden email] <[hidden email]> >
 >              http://lists.osgeo.org/mailman/listinfo/gdal-dev <http://lists.osgeo.org/mailman/listinfo/gdal-dev>
 >                 >
 >
 >     _______________________________________________
 >     gdal-dev mailing list
 >     gdal-dev@... <[hidden email] <[hidden email]> >
 >     http://lists.osgeo.org/mailman/listinfo/gdal-dev <http://lists.osgeo.org/mailman/listinfo/gdal-dev>
 >
 >
  _______________________________________________
 gdal-dev mailing list
 gdal-dev@...
 http://lists.osgeo.org/mailman/listinfo/gdal-dev <http://lists.osgeo.org/mailman/listinfo/gdal-dev>
    

_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev <http://lists.osgeo.org/mailman/listinfo/gdal-dev>



_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev

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

Re: Problem Compiling with Oracle (--with-oci)

Chris Hodgson
Thanks for the confirmation Mike. I'm guessing the oracle instant client
was compiled with a bit more care for the use of external developers.
However I have managed to get a successful compile after setting the
LDFLAGS environment variable to include the oracle lib folder (to get
their old expat onto the path):

export LDFLAGS=-L/opt/oracle/product/11.2.0/dbhome_1/lib/

and then configured with the gdal expat turned off (if I leave it on I
end up with the same original problem):

./configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/ --with-expat=no

I still have to test if this actually lets me connect to oracle. If not
I'll download the instant client and try configuring/compiling against that.

Thanks,
Chris

Smith, Michael D ERDC-CRREL-NH wrote:

> I have the expat 1.95 added via standed RHEL repo and using oracle
> instant client (11.2) without a problem with GDAL from SVN
>
> I use
>
> ./configure \
>     --with-libtiff=internal \
>     --with-geotiff=internal \
>     --with-jpeg=internal \
>     --with-libz=internal \
>     --with-png=internal \
>     --with-oci=/oracle/instantclient_11_1 \
>     --with-geos=/usr/local/bin/geos-config \
>     --with-curl \
>     --with-threads \
>     --with-expat=yes \
>     --with-libkml \
>     --with-python
>
>
> Mike
>
>
> --
> Michael Smith
> Remote Sensing/GIS Center
> US Army Corps of Engineers
> Hanover, NH
>
>
>

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

Re: Problem Compiling with Oracle (--with-oci)

Chris Hodgson
Just wanted to wrap this up with my final findings for anyone who
stumbles onto this thread in the future.

While the solution below did allow me to successfully build and connect
to oracle, I also wanted to build with support for PostgreSQL/PostGIS.
The PostgreSQL client also requires expat, and so my little
-with-expat=no trick didn't allow the postgres support to be included in
the build. The final solution was to download the oracle instant client
(for linux) - both the "basic" client package and the "SDK" package were
required.

Before configuring, I needed to do the following in the instant client
directory:

ln -s libclntsh.so.11.1 libclntsh.so
ln -s libocci.so.11.1 libocci.so

And then I needed to specify the paths to where I unzipped the instant
client packages (in /opt) to configure:

--with-oci-lib=/opt/instantclient_11_2
--with-oci-include=/opt/instantclient_11_2/sdk/include

And that's it (as it should be). No LDFLAGS or messing with
LD_LIBRARY_PATH, no ORACLE_HOME even, just here's the libs, here's the
includes, go. This works so much better because the instant client has
all of it's pre-req's statically linked in (it's a ridiculously huge
library as a result...) whereas the libraries that come in the /lib/ dir
of the full oracle package do not (and so are only somewhat less
ridiculously large).

Hope that helps someone, someday.

Cheers,
Chris


Chris Hodgson wrote:

> Thanks for the confirmation Mike. I'm guessing the oracle instant
> client was compiled with a bit more care for the use of external
> developers. However I have managed to get a successful compile after
> setting the LDFLAGS environment variable to include the oracle lib
> folder (to get their old expat onto the path):
>
> export LDFLAGS=-L/opt/oracle/product/11.2.0/dbhome_1/lib/
>
> and then configured with the gdal expat turned off (if I leave it on I
> end up with the same original problem):
>
> ./configure --with-oci=/opt/oracle/product/11.2.0/dbhome_1/
> --with-expat=no
>
> I still have to test if this actually lets me connect to oracle. If
> not I'll download the instant client and try configuring/compiling
> against that.
>
> Thanks,
> Chris
>
> Smith, Michael D ERDC-CRREL-NH wrote:
>> I have the expat 1.95 added via standed RHEL repo and using oracle
>> instant client (11.2) without a problem with GDAL from SVN
>>
>> I use
>>
>> ./configure \
>>     --with-libtiff=internal \
>>     --with-geotiff=internal \
>>     --with-jpeg=internal \
>>     --with-libz=internal \
>>     --with-png=internal \
>>     --with-oci=/oracle/instantclient_11_1 \
>>     --with-geos=/usr/local/bin/geos-config \
>>     --with-curl \
>>     --with-threads \
>>     --with-expat=yes \
>>     --with-libkml \
>>     --with-python
>>
>>
>> Mike
>>
>>
>> --
>> Michael Smith
>> Remote Sensing/GIS Center
>> US Army Corps of Engineers
>> Hanover, NH
>>
>>
>>
>
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

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