Re: h2xs problem
[email protected] (Rob McMillin) Tue, 28 Aug 2001 10:10:40 -0700
| Newsgroups | perl.dbi.oracle-oci |
|---|---|
| Message-ID | <[email protected]> |
Tim Bunce wrote:
> On Mon, Aug 27, 2001 at 12:26:55PM -0700, Rob McMillin wrote:
> >
> > > Second of all, has Tim been in touch with you about the mysterious
> > > Running h2xs...
> > > Scanning typemaps...
> > > Scanning /usr/lib/perl5/5.6.1/ExtUtils/typemap
> > > Scanning /oracle/rdbms/demo/oci.h for functions...
> > > Expecting parenth after identifier in `fd_set *__restrict __readfds'
> > > after `fd_set *__restrict ' at /usr/lib/perl5/site_perl/5.6.1/C/Scan.pm line
> > > 797.
> > > h2xs failed at ./boot line 184
> > >
> > > problem? I'm against the wall on this one, too. Let me know if you've
> > > figured anything out.
> >
> > No, no joy on that yet, either, though apparently the 0.05 release is vapor at
> > this point. Perhaps we'll get more info once life for Tim settles down in Eire.
>
> I've got a new DBI release out and I'm working on DBD::Oracle now,
> before Oracle::OCI because some of the build/link issues also affect
> Oracle::OCI. I hope to get a DBD::Oracle release out in a day or so.
> Then I hope to get an Oracle::OCI release out a day or two after that.
>
> > I have a sneaking feeling that this is a C::Scan issue.
>
> It is. As far as I can make out restrict is a new ANSI C9X standard
> thingy and __restrict is an experimental version of the same.
>
> Here's the patch that I think will workaround it:
>
> diff -c -r1.7 h2xs
> *** 1.7 2001/07/08 01:47:27
> --- h2xs 2001/08/07 09:54:42
> ***************
> *** 575,580 ****
> --- 575,583 ----
> 'add_cppflags' => $addflags, 'c_styles' => [qw(C++ C9X)];
> $c->set('includeDirs' => [@dirs_h,"$Config::Config{archlib}/CORE"]);
>
> + # force addition of __restrict into keywords (asap)
> + $c->get('keywords')->{'__restrict'} = 1;
> +
> push @$fdecls_parsed, @{ $c->get('parsed_fdecls') };
> push(@$fdecls, @{$c->get('fdecls')});
>
> Let me know if that works for you. Thanks.
Gettin' warmer. It fails but at a different part:
cp OCI.pm blib/lib/Oracle/OCI.pm
AutoSplitting blib/lib/Oracle/OCI.pm (blib/lib/auto/Oracle/OCI)
/usr/bin/perl -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0
/usr/lib/perl5/5.6.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.6.0/ExtUtils/typemap
-typemap h2xs.typemap -typemap typemap OCI.xs > OCI.xsc && mv OCI.xsc OCI.c
Error: 'OCITrans *' not in typemap in OCI.xs, line 9568
Error: 'OCITrans *' not in typemap in OCI.xs, line 9571
Please specify prototyping behavior for OCI.xs (see perlxs manual)
make: *** [OCI.c] Error 1
Now, the interesting bit is this: I subsequently did a find-grep through the Oracle
sources, and discovered that OCITrans is a macro def in rdbms/demo/oci.h:
#define OCITrans ocitxnh
Okay, so where is ocitxnh defined? The answer seems to be that it isn't, at least
under Oracle 8.1.7.1.1! Ouch.
--
http://www.pricegrabber.com | Dog is my co-pilot.