Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Oracle DBD build error: missing oracle.xsi

Posted on 1998-07-06
Medium Priority
Last Modified: 2009-07-29
I tried to build DBI and DBD Oracle on Win NT using VC++ 4.2. I build and tested DBI successfully, but for DBD, it fails when the c compiler fails to find oracle.xsi (under the include in oracle.xs). I have sql net on my machine and can connect to oracle fine, and I have set oracle_home to c:\orant. Could anyone help me? I have no idea what this xs and xsi is. It seems that the xsi is constructed by concatenting a few files together (on solaris).

My Perl is 5.004 (standard perl).
Question by:enotsin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4

Expert Comment

ID: 1208286
Which perl are you using? (if you need to, send output of

perl -V

) Note that if you've got the ActiveWare version, you're out of luck, and you'll need to get the GURU version (see http://www.perl.com).  If you do have the GURU version, you need to have, well, some versions of 5.003 will work, but you're better off with 5.004 at the very least.

Also, what version of DBI and DBD::Oracle are you using?


Expert Comment

ID: 1208287
Ack!  Forgot about something.  DBD::Oracle doesn't require the ORACLE_HOME variable, but Makefile.PL does....  You need to set it to your oracle home directory.

Author Comment

ID: 1208288
Thanks for the info. As I said in the first post, I am using standard perl, which means it is not the activeware version, yes, it is gnu perl.

I also have mentioned in my first post that I have set ORACLE_HOME already. I think it would be very helpful if you could tell me what is that .xsi and .xs file for, whether I really need it or how do I get it (the xsi, I have the .xs already)

Both my DBD and DBI are the lastest version.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Expert Comment

ID: 1208289
You didn't say what specific versions of everything you're using.

By the way, perl is not gnu. It is liberally licensed, but doesn't necessarily fall under the GPL.

The xs file is split by MakeMaker to generate C and perl code for modules. xsi files are normally generated by MakeMaker...

One more thing.  Assuming you're using vc++ rather than the gnu compiler, (actually, even if you're using the gnu compiler), I hope you're using the standard command shell, rather than csh, zsh, or 4Dos....
LVL 84

Expert Comment

ID: 1208290
Perl can be redistributed under the terms of either the GPL or the Artistic License.

By "GURU version", do you mean the development versions?
If you're not inclined to dig into the internals, I'd suggest sticking with the latest released version (5.004_04 when last I checked)

Author Comment

ID: 1208291
The versions I am using are:
Perl 5.004-02

So what do I need to do in order to build the DBD successfully? I built and tested the DBI successfully.

Accepted Solution

b2pi earned 200 total points
ID: 1208292
I know that you BUILT DBI, but did you install it?  There's a file that comes with DBI called  Driver.xst.  If that's in the correct location (I suppose that could be win32 install problem, but I don't think so) it is used to create Oracle.xsi

If you feel like it, you might be able to successfully manufacture it by hand.  Copy the Driver.xst file into your DBD-Oracle directory.  Then do:

perl -p -e "s/~DRIVER~/Oracle/g" <Driver.xst >Oracle.xsi

Remove Driver.xst, and make a copy of Oracle.xsi (it's removed by make clean).

Driver.xst is in a hardware dependent location, however... I didn't see anything that gets done to the file other than the above, but it would be best if this just worked.

Good luck.

Author Comment

ID: 1208293
I followed you instruction and built DBD, the make process was okay except that at the first time it complains about missing msvcrt.lib, I copied it to the oracle dbd installation directory and it links alright.

Then, I set the TWO_TASK env var to T:<my dbhost ip host name>:<sid> and
nmake test

It complains about
        C:\dev\bin\perl\bin\perl -Mblib -Ic:\dev\bin\perl\lib -Ic:\dev\bin\perl\
lib -e "use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;" t
\base.t t\general.t t\plsql.t
Using C:/download/DBD-Oracle-0.50/blib
t\base..............Had to create DBD::Oracle::dr::imp_data_size unexpectedly at
 C:\dev\bin\perl\lib\site/DBI.pm line 614.
Use of uninitialized value at C:\dev\bin\perl\lib\site/DBI.pm line 614.
Driver has not implemented the disconnect_all method. at C:\dev\bin\perl\lib\sit
e/DBI.pm line 762
        DBD::_::dr::disconnect_all('DBI::dr=HASH(0x908ea8)') called at C:\dev\bi
n\perl\lib\site/DBI.pm line 388
        DBI::disconnect_all('DBI') called at C:\dev\bin\perl\lib\site/DBI.pm lin
e 313
        DBI::END() called at t\base.t line 0
        eval {...} called at t\base.t line 0
END failed--cleanup aborted.
        Test returned status 0 (wstat 2)
        after all the subtests completed successfully
Failed Test  Status Wstat Total Fail  Failed  List of failed
t\base.t          0     2     5    0   0.00%  ??
t\general.t       0     2    ??   ??       %  ??
t\plsql.t         0     2    ??   ??       %  ??
Failed 3/3 test scripts, 0.00% okay. 0/5 subtests failed, 100.00% okay.
NMAKE : fatal error U1077: 'C:\dev\bin\perl\bin\perl' : return code '0x2'

I omitted the middle part of the error report.
Here are my questions:

1. The perldoc info on oracle::dbd ask me to set TWO_TASK and then use
sqlplus user/password

but I guess that doesn't work on NT. Is there another way to specify the user / password info to the test prog?

2. When I simply tried
use DBI;

$dbh = DBI->connect('dbi:Oracle:T:host:sid',user,password);

similar errors are reported
Had to create DBD::Oracle::dr::imp_data_size unexpectedly at c:\dev\bin\perl\lib
\site/DBI.pm line 614.
Had to create DBD::Oracle::db::imp_data_size unexpectedly at c:\dev\bin\perl\lib
\site/DBI.pm line 614.
Undefined subroutine &DBD::Oracle::db::_login called at c:\dev\bin\perl\lib\site
/DBD/Oracle.pm line 190.
Driver has not implemented the disconnect_all method. at c:\dev\bin\perl\lib\sit
e/DBI.pm line 762
        DBD::_::dr::disconnect_all('DBI::dr=HASH(0x90e0cc)') called at c:\dev\bi
n\perl\lib\site/DBI.pm line 388
        DBI::disconnect_all('DBI') called at c:\dev\bin\perl\lib\site/DBI.pm lin
e 313
        DBI::END() called at dbtest.pl line 0
        eval {...} called at dbtest.pl line 0
END failed--cleanup aborted.

Please advice

Expert Comment

ID: 1208294
This is getting ugly.  Are you sure you installed DBI ??
(i.e. you should have done

perl Makefile.PL
nmake test
nmake install

on DBI ...  Looking at all of that ugliness, and the fact that it couldn't find msvcrt.lib (which just should NOT happen) something is very wrong here...

Do you by any chance have two or more perl versions installed?

Author Comment

ID: 1208295
Your'e right, something must be quite wrong here. I am sure that I followed the steps
perl Makefile.PL
nmake test
nmake install
on DBI, and no errors were reported at all.
However, that was only true after I make minor modifications to the makefile. The reason is that the original makefile didn't specify the windows.h etc header file directory, so cl fails to compile. Then I added an extra -I switch to the makefile and the build was successful.

The next thing is that after perl Makfile.PL on DBD oracle, it complains failure to locate the windows.h header file again. That means I have to hand modify the makefile after I do perl Makefile.PL.

What's your opinion? why do you think the makefile has such error, failing to locate the windows.h file?
When I install perl 5.004_02, it asked me info about my VC++ library, headers etc, and I am sure I gave it all the correct information. Also, I do have more than one perl on my machine, the other one comes with the WindowsNT resource kit. However, when I typed perl -v, it is the 5.004_02 one, which means I should be working on the correct tool.


Expert Comment

ID: 1208296
OK, here's what I'd do...

1.) Remove entirely DBI and DBD::Oracle ! (Frankly, I'd be tempted to remove perl entirely, and start over from scratch... In fact, unless you have a lot of packages installed, I'd definitely do that.  While you're at it, grab perl 5.004_04, which includes a new makemaker, I think.

2.) Get the latest versions of DBI and DBD::Oracle (0.93 and 0.51, respectively).

3.)  Remember to untar DBI and DBD in entirely separate and distinct directories (NOT in perl source, NOT in perl directory)

4.) Proceed as normal.  If you have to hand edit a make file, stop there, and figure out what's wrong.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question