Click here to get back home

Problem installing DBD-Oracle

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problem installing DBD-Oracle Monty 06-05-2008
Posted by Monty on June 5, 2008, 5:44 pm
Please log in for more thread options
I hope this is the right place to post.

I'm trying to install the DBD-Oracle module on a new solaris 10
system. I've installed the latest version of Perl downloaded from
sunfreeware.com and I've successfully installed DBI-1.604, which
appears to be a prerequisite for DBD-Oracle. When attempting to
'make' the module, it fails with the following error:

In file included from Oracle.xs:1:
Oracle.h:114: error: conflicting types for 'OCIXMLTypeCreateFromSrc'
Oracle.h:114: note: an argument type that has a default promotion
can't match an empty parameter name list declaration
/var/oracle/v9.2/rdbms/demo/ociap.h:10054: error: previous declaration
of 'OCIXMLTypeCreateFromSrc' was here
Oracle.h:114: error: conflicting types for 'OCIXMLTypeCreateFromSrc'
Oracle.h:114: note: an argument type that has a default promotion
can't match an empty parameter name list declaration
/var/oracle/v9.2/rdbms/demo/ociap.h:10054: error: previous declaration
of 'OCIXMLTypeCreateFromSrc' was here
*** Error code 1
make: Fatal error: Command failed for target `Oracle.o'

I've read the README and README.help.txt files and have followed all
instructions I understand. Does anyone know what this all means?

Thanks

Posted by sisyphus on June 5, 2008, 9:13 pm
Please log in for more thread options
=2E
=2E
> Oracle.h:114: error: conflicting types for 'OCIXMLTypeCreateFromSrc'
> Oracle.h:114: note: an argument type that has a default promotion
> can't match an empty parameter name list declaration
> /var/oracle/v9.2/rdbms/demo/ociap.h:10054: error: previous declaration
> of 'OCIXMLTypeCreateFromSrc' was here

Is the compiler that you're using to build DBD-Oracle the same
compiler that built perl ? (I've seen reports of problems on solaris
where perl has been built using sun's compiler, and gcc is being used
to build perl extensions. I don't know if that's relevant in your
case.)

I don't have solaris, and I don't use (or build) DBD-Oracle, but the
error messages suggest that Oracle.h and /var/oracle/v9.2/rdbms/demo/
ociap.h disagree on what 'OCIXMLTypeCreateFromSrc' should look like.

It seems odd that a header file in a directory named /var/oracle/v9.2/
rdbms/demo/ is even being included. I guess there are good reasons for
the inclusion of that file ?

First thing I would do is take a look at lines 114 and 10054 of
Oracle.h and ociap.h (respectively). Maybe there's something there
that will help make sense of the errors.

I think it's fair enough to post this sort of question here, though I
think you'd reach a larger audience (and therefore have a better
chance of success) if you posted on comp.lang.perl.misc or perlmonks.
Having said that, you may yet receive good advice on this forum ... so
stay tuned.

(I don't know why those error messages appear *twice*, btw.)

Cheers,
Rob


Posted by Monty on June 6, 2008, 9:15 am
Please log in for more thread options
> Is the compiler that you're using to build DBD-Oracle the same
> compiler that built perl ? (I've seen reports of problems on solaris
> where perl has been built using sun's compiler, and gcc is being used
> to build perl extensions. I don't know if that's relevant in your
> case.)
I really couldn't say. The version of perl I'm using was downloaded
from sunfreeware.com, and I'd bet there's a good chance it was
compiled with Suns' C compiler as opposed to gcc, but I can't say for
sure.
>
> I don't have solaris, and I don't use (or build) DBD-Oracle, but the
> error messages suggest that Oracle.h and /var/oracle/v9.2/rdbms/demo/
> ociap.h disagree on what 'OCIXMLTypeCreateFromSrc' should look like.
I will take a look at those.

> It seems odd that a header file in a directory named /var/oracle/v9.2/
> rdbms/demo/ is even being included. I guess there are good reasons for
> the inclusion of that file ?
Beats me, I'm just flollowing the directions included with the module.

> First thing I would do is take a look at lines 114 and 10054 of
> Oracle.h and ociap.h (respectively). Maybe there's something there
> that will help make sense of the errors.
Interesting difference in those two lines. From Oracle.h (included in
the DBD module):
sword OCIXMLTypeCreateFromSource (/*_ OCISvcCtx *svchp, OCIError
*errhp,
OCIDuration dur, ub1 src_type, dvoid src_ptr,
sb4 ind, OCIXMLType **retInstance _*/)

...and from ociap.h:
sword OCIXMLTypeCreateFromSource (OCISvcCtx *svchp, OCIError *errhp,
OCIDuration dur, ub1 src_type, dvoid src_ptr,
sb4 ind, OCIXMLType **retInstance)

It looks like Oracle.h has the parameters commented out, if I'm not
mistaken. I might try removing those comment characters and run the
thing again.

> I think it's fair enough to post this sort of question here, though I
> think you'd reach a larger audience (and therefore have a better
> chance of success) if you posted on comp.lang.perl.misc or perlmonks.
> Having said that, you may yet receive good advice on this forum ... so
> stay tuned.
Thanks, I'll keep that in mind for the future.

Ta!

Posted by rahed on June 6, 2008, 4:26 pm
Please log in for more thread options

> I really couldn't say. The version of perl I'm using was downloaded
> from sunfreeware.com, and I'd bet there's a good chance it was
> compiled with Suns' C compiler as opposed to gcc, but I can't say for
> sure.

I'd say everything from sunfreeware is gcc compiled.
Haven't had any problems with installing DBD::Oracle on solaris - perl
from sunfreeware and all perl modules compiled with gcc.

--
Radek

Posted by Joe Doe on June 13, 2008, 12:05 pm
Please log in for more thread options
Monty wrote:
>> Is the compiler that you're using to build DBD-Oracle the same
>> compiler that built perl ? (I've seen reports of problems on solaris
>> where perl has been built using sun's compiler, and gcc is being used
>> to build perl extensions. I don't know if that's relevant in your
>> case.)

It is relevant. IIRC, we built Perl from source because of this - the
Perl that comes with Solaris seems to be built with the solaris compiler
to get maximum performance.

>> It seems odd that a header file in a directory named /var/oracle/v9.2/
>> rdbms/demo/ is even being included. I guess there are good reasons for
>> the inclusion of that file ?

Who would know better, how the Oracle API shall look like than Oracle?

> Interesting difference in those two lines. From Oracle.h (included in
> the DBD module):
> sword OCIXMLTypeCreateFromSource (/*_ OCISvcCtx *svchp, OCIError
> *errhp,
> OCIDuration dur, ub1 src_type, dvoid src_ptr,
> sb4 ind, OCIXMLType **retInstance _*/)
>
> ...and from ociap.h:
> sword OCIXMLTypeCreateFromSource (OCISvcCtx *svchp, OCIError *errhp,
> OCIDuration dur, ub1 src_type, dvoid src_ptr,
> sb4 ind, OCIXMLType **retInstance)
>
> It looks like Oracle.h has the parameters commented out, if I'm not
> mistaken. I might try removing those comment characters and run the
> thing again.

Yes, this is a comment - the only explanation I have for this is,
that it would be compatible with a K&R-C-compiler, cause this very
old version of C doesn't support argument types for function declarations.
Therefore you may have a look at the compiler flags that are used,
and check whether there is another version of the prototype in the
header that gets used if some defines (flag -Dsomething) are set.
You may also run into trouble, if your version of Oracle is 64-bit,
while gcc produces/uses 32-bit libraries: check LD_LIBRARY_PATH then,
so you use the correct 32-bit oracle ABI with gcc.

Similar ThreadsPosted
Problem installing win32::OLE September 20, 2005, 12:52 pm
Problem installing Net::LDAP September 22, 2005, 12:54 pm
problem installing DBD-mysql January 10, 2005, 5:51 pm
Problem installing GD module April 4, 2006, 12:26 pm
Problem with installing modules November 24, 2006, 6:15 pm
Problem installing XML::Checker March 21, 2007, 2:15 pm
Problem Installing Module April 4, 2007, 10:02 am
Problem installing certain PERL modules October 15, 2004, 4:47 am
Problem Installing Win32::OLE under cygwin May 15, 2005, 9:45 pm
problem installing Gtk2 Module January 10, 2005, 1:44 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap