Page 1 of 2

Unable to install DBD::Oracle

Posted: Wed Apr 23, 2014 8:27 am
by jstoddart
Trying to get the Oracle Plugins working on a Nagios XI Server running CentOS 5 but the cpan -i DBD::Oracle returns this:

dbdimp.c: In function ‘fb_ary_cb_alloc’:
dbdimp.c:322: warning: comparison is always false due to limited range of data type
dbdimp.c:323: warning: comparison is always false due to limited range of data type
dbdimp.c:324: warning: comparison is always false due to limited range of data type
dbdimp.c:325: warning: comparison is always false due to limited range of data type
dbdimp.c:326: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘fb_ary_alloc’:
dbdimp.c:342: warning: comparison is always false due to limited range of data type
dbdimp.c:343: warning: comparison is always false due to limited range of data type
dbdimp.c:344: warning: comparison is always false due to limited range of data type
dbdimp.c:345: warning: comparison is always false due to limited range of data type
dbdimp.c: In function ‘ora_st_FETCH_attrib’:
dbdimp.c:4355: error: ‘imp_dbh’ undeclared (first use in this function)
dbdimp.c:4355: error: (Each undeclared identifier is reported only once
dbdimp.c:4355: error: for each function it appears in.)
make: *** [dbdimp.o] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

Have attached the full output

Re: Unable to install DBD::Oracle

Posted: Wed Apr 23, 2014 9:38 am
by slansing
You need to install MAKE first, so that you can compile the module. You should have it already on the XI server, It's curious you are getting this error. What is the output of:

Code: Select all

yum list installed | grep make

Re: Unable to install DBD::Oracle

Posted: Thu Apr 24, 2014 2:12 am
by jstoddart
[:main.Centos5_641 ~]# yum list installed | grep make
automake.noarch 1.9.6-2.1 installed
automake14.noarch 1.4p6-13 installed
automake15.noarch 1.5-16 installed
automake16.noarch 1.6.3-8 installed
automake17.noarch 1.7.9-7 installed
imake.x86_64 1.0.2-3 installed
make.x86_64 1:3.81-3.el5 installed

Re: Unable to install DBD::Oracle

Posted: Thu Apr 24, 2014 9:39 am
by slansing
What instant client version did you install, and what is the output of:

Code: Select all

cat /proc/version

Code: Select all

echo $ORACLE_HOME
echo $LD_LIBRARY_PATH

Re: Unable to install DBD::Oracle

Posted: Fri Apr 25, 2014 1:50 pm
by jstoddart
Linux version 2.6.18.8-xenU (root@applogicbuild64) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Wed Feb 3 11:28:48 PST 2010
[KANA-LON-NAGIOSX1:main.Centos5_641 ~]# echo $ORACLE_HOME
/usr/lib/oracle/11.2/client64
[KANA-LON-NAGIOSX1:main.Centos5_641 ~]# echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client64/lib/
[KANA-LON-NAGIOSX1:main.Centos5_641 ~]#

Re: Unable to install DBD::Oracle

Posted: Fri Apr 25, 2014 1:54 pm
by slansing
Sorry, I should have had you run this as well:

Code: Select all

lscpu | grep Architecture

Code: Select all

ll /usr/lib/oracle/11.2/
I just wanted to verify that you had the correct env variables and paths for your architecture.

Re: Unable to install DBD::Oracle

Posted: Fri Apr 25, 2014 2:00 pm
by jstoddart
No problem.

lscpu does not exist on the server?

[KANA-LON-NAGIOSX1:main.Centos5_641 ~]# ll /usr/lib/oracle/11.2/
total 4.0K
drwxr-xr-x 4 root root 4.0K Apr 23 10:33 client64/

Re: Unable to install DBD::Oracle

Posted: Mon Apr 28, 2014 12:56 pm
by tmcdonald
Odd that lscpu is not listed. Try this:

Code: Select all

cat /proc/version

Re: Unable to install DBD::Oracle

Posted: Mon Apr 28, 2014 12:59 pm
by scottwilkerson
I believe there was a bug in CPAN's DBD::Oracle
https://github.com/pythian/DBD-Oracle/issues/14

Not 100% sure, but it looks like it may have just been fixed based on the above thread. Can you try the install again to see if it works correctly for you now?

Re: Unable to install DBD::Oracle

Posted: Tue Apr 29, 2014 2:28 am
by jstoddart
Ok will try:

cat /proc/version
Linux version 2.6.18.8-xenU (root@applogicbuild64) (gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)) #1 SMP Wed Feb 3 11:28:48 PST 2010