symbol lookup error for DBD-Oracle 1.19 and Oracle instantclient 10.2.0.3

Hello all,

I'm trying to get an Oracle client working under Linux and I'm having 
problems running a test script. Here's the error:
[koczan@ator] lab $ perl oracle.pl
perl: symbol lookup error: 
/s/oracle/perl5/lib/site_perl/5.8.6/i686-linux-64int/auto/DBD/Oracle/Oracle.so: 
undefined symbol: OCINlsEnvironmentVariableGet

And here are details: I'm using Oracle's instantclient 10.2.0.3 and 
stock DBD-Oracle 1.19 (except for I downloaded Makefile-instantclient.PL 
and oracle-instantclient-config from 
http://jeanchristophe.duber.free.fr/dbd_oracle_instantclient_linux/ and 
changed paths in the config script as appropriate).

I used the .zip installers and changed some paths to fit better in our 
infrastructure (e.g. the lib*.so files are in /s/oracle/lib and properly 
symlinked).

I built using these commands:
perl Makefile-instantclient.PL PREFIX=/s/oracle/perl5
make
make install

It installed fine, but whenever I try to connect to a server, I get the 
aforementioned error.

I have to muck with a few environment variables to connect via SQL*Plus, 
specifically:
export ORACLE_HOME=/s/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TWO_TASK=INFOACCESS.CS.WISC.EDU
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin

sqlplus # which works after my username and password

So, in the perl script, I do this:
------------
#!/s/std/bin/perl

use DBI;
use lib '/s/oracle/perl5/lib';
use lib '/s/oracle/perl5/lib/site_perl';

use strict;

$ENV{ORACLE_HOME} ||= "/s/oracle";
$ENV{TWO_TASK} ||= "INFOACCESS.CS.WISC.EDU";
$ENV{LD_LIBRARY_PATH} ||= "$ENV{ORACLE_HOME}/lib";
$ENV{TNS_ADMIN} ||= "$ENV{ORACLE_HOME}/network/admin";

my $dbh = DBI->connect("dbi:Oracle:", [user], [password])
   || die "Couldn't connect to Oracle: $!";
#

# more stuff here that never executes
------------

The code after the connect attempt never executes because the script 
exits after said failure.

I think that's all the details I can provide for now. Any ideas? Thanks 
much.

Peter
0
koczan
9/24/2007 7:23:54 PM
perl.dbi.users 11100 articles. 1 followers. Follow

3 Replies
870 Views

Similar Articles

[PageSpeed] 50
Get it on Google Play
Get it on Apple App Store

I'm using 32-bit Linux. I believe I tried something like this before and 
it just wouldn't work (it didn't seem to like the instantclient) so I 
looked around for alternative compilation methods.

I'll try this again with the stock Makefile.PL. Thanks. *fingers crossed*

Peter

John Scoles wrote:
> Are you using a 64 bit Linux??
> 
> Though the instructions are ok at the link I do not think that makefile 
> will work.  I would stick with the Makefile.PL that comes with 1.19 as 
> it compiles fine against 32 bit Linux.  Just read the readmes and make 
> sure you set the
> export ORACLE_HOME=/s/oracle
> export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
> 
> before you do the compile
> 
> cheers John Scoles
> 
> Peter Koczan wrote:
>> Hello all,
>>
>> I'm trying to get an Oracle client working under Linux and I'm having 
>> problems running a test script. Here's the error:
>> [koczan@ator] lab $ perl oracle.pl
>> perl: symbol lookup error: 
>> /s/oracle/perl5/lib/site_perl/5.8.6/i686-linux-64int/auto/DBD/Oracle/Oracle.so: 
>> undefined symbol: OCINlsEnvironmentVariableGet
>>
>> And here are details: I'm using Oracle's instantclient 10.2.0.3 and 
>> stock DBD-Oracle 1.19 (except for I downloaded 
>> Makefile-instantclient.PL and oracle-instantclient-config from 
>> http://jeanchristophe.duber.free.fr/dbd_oracle_instantclient_linux/ 
>> and changed paths in the config script as appropriate).
>>
>> I used the .zip installers and changed some paths to fit better in our 
>> infrastructure (e.g. the lib*.so files are in /s/oracle/lib and 
>> properly symlinked).
>>
>> I built using these commands:
>> perl Makefile-instantclient.PL PREFIX=/s/oracle/perl5
>> make
>> make install
>>
>> It installed fine, but whenever I try to connect to a server, I get 
>> the aforementioned error.
>>
>> I have to muck with a few environment variables to connect via 
>> SQL*Plus, specifically:
>> export ORACLE_HOME=/s/oracle
>> export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
>> export TWO_TASK=INFOACCESS.CS.WISC.EDU
>> export TNS_ADMIN=$ORACLE_HOME/network/admin
>> export PATH=$PATH:$ORACLE_HOME/bin
>>
>> sqlplus # which works after my username and password
>>
>> So, in the perl script, I do this:
>> ------------
>> #!/s/std/bin/perl
>>
>> use DBI;
>> use lib '/s/oracle/perl5/lib';
>> use lib '/s/oracle/perl5/lib/site_perl';
>>
>> use strict;
>>
>> $ENV{ORACLE_HOME} ||= "/s/oracle";
>> $ENV{TWO_TASK} ||= "INFOACCESS.CS.WISC.EDU";
>> $ENV{LD_LIBRARY_PATH} ||= "$ENV{ORACLE_HOME}/lib";
>> $ENV{TNS_ADMIN} ||= "$ENV{ORACLE_HOME}/network/admin";
>>
>> my $dbh = DBI->connect("dbi:Oracle:", [user], [password])
>>   || die "Couldn't connect to Oracle: $!";
>> #
>>
>> # more stuff here that never executes
>> ------------
>>
>> The code after the connect attempt never executes because the script 
>> exits after said failure.
>>
>> I think that's all the details I can provide for now. Any ideas? 
>> Thanks much.
>>
>> Peter

0
koczan
9/25/2007 3:46:01 PM
I got some advice to try using the stock Makefile.PL, which I had 
problems with before, and I'm still having problems with. My best guess 
is that it's not linking properly, but I don't know how to fix it. Any 
help would be appreciated.

Peter

Details follow:

- I had to manually specify the .mk file.
- The header files are in /s/oracle/include, the Makefile doesn't seem 
to want to find them.
- Nothing in the READMEs pointed in the right directions.
- I know we're using an out of date DBI, though I doubt updating it will 
fix the problems.
- I had to build this way since there is no other .mk file provided with 
the instantclient.

[koczan@ator] DBD-Oracle-1.19 $ perl Makefile.PL PREFIX=/s/oracle/perl5 
-m /s/oracle/share/demo.mk
Using DBI 1.47 (for perl 5.008006 on i686-linux-64int) installed in 
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64int/auto/DBI/

Configuring DBD::Oracle for perl 5.008006 on linux (i686-linux-64int)

Remember to actually *READ* the README file! Especially if you have any 
problems.

Using Oracle in /s/oracle
DEFINE _SQLPLUS_RELEASE = "1002000300" (CHAR)
Oracle version 10.2.0.3 (10.2)
Found /s/oracle/share/demo.mk
Using /s/oracle/share/demo.mk
Your LD_LIBRARY_PATH env var is set to '/s/oracle/lib:'
Reading /s/oracle/share/demo.mk
Use of uninitialized value in substitution (s///) at Makefile.PL line 1333.
Use of uninitialized value in substitution (s///) at Makefile.PL line 1337.
Use of uninitialized value in substitution (s///) at Makefile.PL line 1340.
Use of uninitialized value in substitution (s///) at Makefile.PL line 1341.
Use of uninitialized value in substitution (s///) at Makefile.PL line 1342.
WARNING: Oracle /s/oracle/share/demo.mk doesn't define a 'build' rule.

WARNING: I will now try to guess how to build and link DBD::Oracle for you.
          This kind of guess work is very error prone and Oracle-version 
sensitive.
          It is possible that it won't be supported in future versions 
of DBD::Oracle.
          *PLEASE* notify dbi-users about exactly _why_ you had to build 
it this way.



*********************************************************
I can't find the header files I need in your Oracle installation.
You probably need to install some more Oracle components.
For Instant Client that means the SDK package.
I'll keep going, but the compile will probably fail.
See README.clients.txt for more information.
*********************************************************


Checking for functioning wait.ph


System: perl5.008006 linux thugbert.cs.wisc.edu 2.4.21-15.0.4.tlsmp #1 
smp tue aug 3 23:02:48 edt 2004 i686 unknown
Compiler:   gcc -O2 -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
Linker:     /usr/bin/ld
Sysliblist:
Oracle makefiles would have used these definitions but we override them:
   CC:       /usr/bin/g++296
   LDFLAGS:  -g
            [-g]
Linking with  -L../../ -locci -lclntsh -lpthread [from $(CCLIB)]


WARNING: If you have problems you may need to rebuild perl with 
threading enabled.
Warning: -L../../ changed to -L/s/oracle/src/DBD-Oracle-1.19/../../
LD_RUN_PATH=/s/oracle/lib
Using DBD::Oracle 1.19.
Using DBD::Oracle 1.19.
Using DBI 1.47 (for perl 5.008006 on i686-linux-64int) installed in 
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64int/auto/DBI/
Writing Makefile for DBD::Oracle

***  If you have problems...
      read all the log printed above, and the README and README.help.txt 
files.
      (Of course, you have read README by now anyway, haven't you?)

[koczan@ator] DBD-Oracle-1.19 $ make
cp Oracle.pm blib/lib/DBD/Oracle.pm
cp mkta.pl blib/lib/DBD/mkta.pl
cp oraperl.ph blib/lib/oraperl.ph
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp Oraperl.pm blib/lib/Oraperl.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
/afs/cs.wisc.edu/s/perl-5.8.6/i386_tao10/bin/perl -p -e 
"s/~DRIVER~/Oracle/g" 
/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64int/auto/DBI//Driver.xst 
 > Oracle.xsi
/afs/cs.wisc.edu/s/perl-5.8.6/i386_tao10/bin/perl 
/s/perl-5.8.6/i386_tao10/lib/5.8.6/ExtUtils/xsubpp  -typemap 
/s/perl-5.8.6/i386_tao10/lib/5.8.6/ExtUtils/typemap -typemap typemap 
Oracle.xs > Oracle.xsc && mv Oracle.xsc Oracle.c
gcc -c 
-I/s/perl-5.8.6/i386_tao10/lib/site_perl/5.8.6/i686-linux-64int/auto/DBI/ 
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\"1.19\" 
-DXS_VERSION=\"1.19\" -fpic 
"-I/s/perl-5.8.6/i386_tao10/lib/5.8.6/i686-linux-64int/CORE"  -Wall 
-Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT 
-DORA_OCI_VERSION=\"10.2.0.3\" Oracle.c
In file included from Oracle.h:15,
                  from Oracle.xs:1:
dbdimp.h:39:17: oci.h: No such file or directory
dbdimp.h:40:22: oratypes.h: No such file or directory
dbdimp.h:41:20: ocidfn.h: No such file or directory
In file included from Oracle.h:15,
                  from Oracle.xs:1:
dbdimp.h:54: error: parse error before "OCIEnv"
dbdimp.h:54: warning: no semicolon at end of struct or union
dbdimp.h:61: error: parse error before '}' token
dbdimp.h:75: error: parse error before "OCIEnv"
....Lots more parse errors, undefined variable errors, and dereferencing 
pointer errors in dbdimp.h, Oracle.h, Oracle.xsi, Oracle.xs, and Oracle.c

0
koczan
9/25/2007 8:26:34 PM
On 24/09/07 20:23, Peter Koczan wrote:
> Hello all,
> 
> I'm trying to get an Oracle client working under Linux and I'm having
> problems running a test script. Here's the error: [koczan@ator] lab $
> perl oracle.pl perl: symbol lookup error:
> /s/oracle/perl5/lib/site_perl/5.8.6/i686-linux-64int/auto/DBD/Oracle/Oracle.so:
> undefined symbol: OCINlsEnvironmentVariableGet
[snip]

> So, in the perl script, I do this:
> ------------
> #!/s/std/bin/perl
> 
> use DBI;
> use lib '/s/oracle/perl5/lib';
> use lib '/s/oracle/perl5/lib/site_perl';
> 
> use strict;
> 
> $ENV{ORACLE_HOME} ||= "/s/oracle";
> $ENV{TWO_TASK} ||= "INFOACCESS.CS.WISC.EDU";
> $ENV{LD_LIBRARY_PATH} ||= "$ENV{ORACLE_HOME}/lib";

The above is done too late. LD_LIBRARY_PATH must be set before
perl starts.

> $ENV{TNS_ADMIN} ||= "$ENV{ORACLE_HOME}/network/admin";
> 
> my $dbh = DBI->connect("dbi:Oracle:", [user], [password])
>   || die "Couldn't connect to Oracle: $!";
> #
> 
> # more stuff here that never executes
>
-- 
Charles Jardine - Computing Service, University of Cambridge
cj10@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679
0
cj10
5/18/2011 8:17:44 AM
Reply:

Similar Artilces:

DBD::Oracle 1.19 with Oracle instantclient 10.2.0.3
Hello, I wanted to contribute my experience with the compilation of DBD::Oracle 1.19 with the Oracle InstantClient 10.2.0.3 on Debian Etch. I mainly followed the guide on http://jeanchristophe.duber.free.fr/dbd_oracle_instantclient_linux/ That documentation is based on an older Oracle InstantClient v10.1.0.3, so I had to make some modifications... I will quickly point out my steps: - Download DBD::Oracle (http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.19.tar.gz) - Download Oracle InstantClient 10.2.0.3 (http://www.oracle.com/technology/software/tech/oci/instan...

Make error: DBD-Oracle-1.14 , DBI-1.39, Oracle rdbms 9.2.0.0.0 , solaris 9
------=_NextPart_000_0025_01C3BE5A.4F6A0C70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, When I make DBD-Oracle 1.14 , Makefile.PL generates a Makefile with "-o build" in the compiler string before blib/arch/auto/DBD/Oracle/Oracle.so and prevents Oracle.so from being built correctly. demo_rdbms.mk appears to be to supplying this: Attempting to discover Oracle OCI build rules^M gcc -B/usr/ccs/bin/ -c DBD_ORA_OBJ.c^M by executing: (make -f /export/home/oracle/ora9idbms/rdbms/demo/demo_rdbms.mk bu ild ECHODO=echo EC...

DBD-Oracle 1.19 with Oracle Instant Client 10.2.0.3 on Debian Etch won't install
--------------090703000606090406010703 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, I am having a problem setting up DBD::Oracle version 1.19 on a Debian Etch. I am running perl 5.8.8 and have dbi 1.53 (I believe) installed. I have instantclient-basic, instantclient-devel, and sqlplus installed. I can, without a problem, connect to my external DB Server via sqlplus. I have ORACLE_HOME and LD_LIB path set everything works great, and I am user root. I have several times installed DBD::Oracle 1.19 on Debian Etch without an...

DBD::Oracle 1.19 tests core against Oracle 10.2.0.1
Hi dbi-users, I'm trying to get DBD::Oracle to work on Solaris 9 but I'm getting core files during the test phase. I've tried all the hints suggested in both the README and README.help.txt files with the same result. Any suggestions? Info below: =20 # uname -a SunOS carnivore 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Fire-V240 =20 # perl Makefile.PL -v Using DBI 1.54 (for perl 5.008008 on sun4-solaris-thread-multi-64int) installed in /opt/VRTSperl/lib/site _perl/5.8.8/sun4-solaris-thread-multi-64int/auto/DBI/ =20 Configuring DBD::Oracle for perl 5.008008 on ...

DBD::Oracle 1.16 on OSX 10.3 running Oracle 10.1 (ORA 00600 error)
Hi, As described in the subject, I'm getting an ORA-00600 error. It is = intermittent (happening about 50%) of the time and is not dependent on having a long datatype in the table I'm selecting from. The = actual error is: DBD::Oracle::st execute failed: ORA-00600: internal error code, arguments: [kpofdr-long], [], [], [], [], [], [], [] which I get on doing various types of select statements. I believe this is a bug in Oracle 10.1 (Oracle bug note 3612581.8) . The = problem here is that Oracle 10 release 2 may not be released for a few = months. And there is no...

[dbd-oracle-1.19] Problem with Makefile.PL & Oracle XE 10.2.0
Hello, I got errors when compiling dbd-oracle-1.19. My server is running Linux Mandriva 2007 + Oracle Database 10g Express Edition with Perl 5.8.8 and DBI 1.52. Bellow you will find some more informations : * uname -a * perl -V * perl Makefile.PL * make * make test * make install Thanks for your help, Guillaume =================== uname -a =================== [root@oranux DBD-Oracle-1.19]# uname -a Linux oranux 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 EDT 2006 i686 Intel(R) Pentium(R) M processor 2.00GHz GNU/Linux =================== perl -V ===============...

EAServer 5.3.0, Oracle 8.1.7 Database with Oracle 10.1.0.2 client VARCHAR2(4000) problem
Hello! I'm having some problems in this configuration on Windows XP. I am developing websites on an Oracle database (8.1.7), with EAServer 5.3.0 (build 53016), Java objects using JSP as a front end. Here is my problem, I have a table with 2 VARCHAR2(4000), and when I access the webpage, the they are displayed as '?????????????'. If I debug the PB component, when I affect the DW field to a variable, it displays it as it doesn't "understand" a thing (each character is replaced by a square). The codeset of EAServer is UTF8, and on my client, it is AM...

Re: DBD::Oracle doesn't work with Oracle 10g (10.1.0.3) under Mac OS X (10.3.8) or how to make it working?
Hermez, et al, On Apr 9, 2005, Hermez <4Hertz@gmx.de> wrote: > After painful days and nights, trying to make DBD::Oracle working > with Oracle 10g Release 1 (10.1.0.3) on Mac OS X, I am at my wits' > end. > I have started the hard trip with the Oracle instant client and even > the above mentioned full version doesn't lead to a solution. > Afterwards, I have followed the advice mentioned in README.macosx > (included in DBD::Oracle), and installed Perl from scratch. Without > progress, unfortunately. > Let me describe the affected envir...

DBD::Oracle 1.12 on Oracle 9iR2 9.2.0.2 test errors
Hello. I am having some problems testing DBD-Oracle-1.12 in the following environment: Solaris 9 Perl 5.8.0 Oracle 9.2.0.2.0 DBI 1.32 Compilation is fine. Output from test stage is: PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/base.......ok t/general....ok t/long.......Unexpectedly had to drop old test table 'dbd_ora__drop_me' t/long.......ok 97/143Use of uninitialized value in numeric eq (==) at t/long.t line 230. # failed test 98 at line 230...

DBD::Oracle 1.12 on Oracle 9iR2 9.2.0.2 test errors (again)
Hello again, I am still not having any luck in getting the tests to pass. It appears to be the CLOB re-reading that is failing. I have checked all the usual places for help. I have also tried creating a test stub that does a similar thing to the failed tests. Below is the full set of information from the build and test as requested (note this is long). Anyone any ideas? Ben. > perl Makefile.PL -v Using DBI 1.32 installed in /usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/DBI Duplicate specification "S=s" for option "s" Configuring D...

Oracle 10.1.0.2, RedHat AS, and DBD::Oracle
We got a fancy new RedHat AS server here at work, and our Sys Admin installed the Oracle 10.1.0.2 client on it (although the Oracle server is running version "Oracle8i Release 8.1.7.4.0"). SQL*Plus seems to work fine for connecting to our Oracle servers, despite the version difference. I was attempting to install DBD::Oracle on this machine and, as you might expect, ran into a few problems. I guess my first question is: Should I even try to install DBD::Oracle (v 1.15) with Oracle 10.1.0.2 on RedHat AS? My sense of the situation is that this version of Oracle is too re...

DBD::Oracle 1.19 using instantclient 10.1.0.5 crashes under mod_perl
I am experiencing a problem with DBD::Oracle 1.19, when building against the Oracle "Instant Client" libraries version 10.1.0.5, with perl 5.8.8 on an Ubuntu "Edgy Eft" system. Everything works correctly when i use DBD::Oracle in perl scripts executed by /usr/bin/perl. However, when i attempt to run this same code from apache-mod_perl, apache crashes. I am using the distro's apache: $ /usr/sbin/apache -V Server version: Apache/1.3.34 (Ubuntu) Server built: Oct 25 2006 09:16:15 Server's Module Magic Number: 19990320:18 Server compiled wit...

Oracle Instant Client 10.1.0.3 SDK and DBD::Oracle
Hi! The latest patch set (10.1.0.3) for the Oracle Instant Client 10g includes the long awaited SDK. I had a quick look at it, and it seems Oracle decided to put the header = files in the traditional /usr/include and /usr/share directories. This won't = work out of the box with DBD::Oracle, as it's tuned to having the header files available relative to $ORACLE_HOME. These are the current locations of the library and header files for the Instant Client 10g: [###### oic]$ rpm -q -l -p oracle-instantclient-basic-10.1.0.3-1.i386.rpm /usr/lib/oracle/10.1.0.3/client/lib/c...

building DBD-Oracle-1.14 on Windows 2000 with Oracle 9.2.0.1.0
--------------000909050500020007070606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm trying to build DBD-Oracle-1.14 on a Windows 2000 machine with Oracle 9.2.0.1.0 Standard installed. I should also point out that I'm working within a unix environment (a product called Microsoft Windows Services for Unix) which runs under Windows and I'm trying to install DBD into the perl that came with the unix environment. I don't believe the unix environment under Windows has anything to do with my problems building...

Web resources about - symbol lookup error for DBD-Oracle 1.19 and Oracle instantclient 10.2.0.3 - perl.dbi.users

chrome/browser/instant/instant_client.h - Issue 11889003: Fixing ESC in instant-extended. - Code Review ...
Side by Side Diff Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments. Keyboard Shortcuts ...

chrome/browser/instant/instant_client.h - Issue 11889003: Fixing ESC in instant-extended. - Code Review ...
Keyboard Shortcuts File u : up to issue m : publish + mail comments M : edit review message j / k : jump to file after / before current file ...

Resources last updated: 2/6/2016 3:14:48 AM