DBD::Oracle:make error:undeclaration(首次在此函数中使用)



在过去的两天里,我一直在尝试在Linux 7.4(x86_64 x86_64 x86_64 GNU/Linux(中安装DBD::Oracle。这已成为其中一个关键项目的障碍。我已经尝试了我能想到的所有可能的方法,但收效甚微。

到目前为止,我已经做了以下工作:

1( 已成功安装 DBI。

2( 解压缩的 instantclient-sdk-linux.x64-12.2.0.1.0.zip、instantclient-basic-linux.x64-12.2.0.1.0.zip、instantclient-sqlplus-linux.x64-12.2.0.1.0.zip在目录/home/netauto/oracle/中,并将LD_LIBRARY_PATH和ORACLE_HOME设置为指向/home/netauto/oracle/instantclient_12_2

instantclient_12_2]# ls -ltr /home/netauto/oracle/instantclient_12_2
-rwxrwxr-x. 1 netauto netauto 124771800 Jan 26  2017 libociei.so
-rwxrwxr-x. 1 netauto netauto     57272 Jan 26  2017 genezi
-rwxrwxr-x. 1 netauto netauto    240476 Jan 26  2017 uidrvci
-rwxrwxr-x. 1 netauto netauto    116563 Jan 26  2017 liboramysql12.so
-r-xr-xr-x. 1 netauto netauto    380996 Jan 26  2017 libons.so
-r-xr-xr-x. 1 netauto netauto   6568149 Jan 26  2017 libnnz12.so
-rw-rw-r--. 1 netauto netauto       363 Jan 26  2017 BASIC_README
-rwxrwxr-x. 1 netauto netauto     44220 Jan 26  2017 adrci
-rw-rw-r--. 1 netauto netauto     74230 Jan 26  2017 xstreams.jar
-r--r--r--. 1 netauto netauto   4036257 Jan 26  2017 ojdbc8.jar
-r-xr-xr-x. 1 netauto netauto    158543 Jan 26  2017 libocijdbc12.so
-rwxrwxr-x. 1 netauto netauto   2218687 Jan 26  2017 libocci.so.12.1
-r-xr-xr-x. 1 netauto netauto    539065 Jan 26  2017 libmql1.so
-r-xr-xr-x. 1 netauto netauto   2981501 Jan 26  2017 libipc1.so
-rwxrwxr-x. 1 netauto netauto  71638263 Jan 26  2017 libclntsh.so.12.1
-rwxrwxr-x. 1 netauto netauto   8033199 Jan 26  2017 libclntshcore.so.12.1
-rw-rw-r--. 1 netauto netauto       367 Jan 26  2017 SQLPLUS_README
-r-xr-xr-x. 1 netauto netauto     22751 Jan 26  2017 sqlplus
-r-xr-xr-x. 1 netauto netauto   1559466 Jan 26  2017 libsqlplus.so
-r-xr-xr-x. 1 netauto netauto   1641005 Jan 26  2017 libsqlplusic.so
-r-xr-xr-x. 1 netauto netauto       342 Jan 26  2017 glogin.sql drwxrwxr-x. 5 netauto netauto      4096 Jan 26  2017 sdk 
lrwxrwxrwx. 1 netauto netauto        64 Sep  4 13:07 libclntsh.so -> /home/netauto/oracle/instantclient_12_2/libclntsh.so.12.1

头文件:

instantclient_12_2]# ls /home/netauto/oracle/instantclient_12_2/sdk/include
-r-xr-xr-x. 1 netauto netauto  24778 Jan 26  2017 occiObjects.h
-r-xr-xr-x. 1 netauto netauto   2115 Jan 26  2017 occi.h
-r-xr-xr-x. 1 netauto netauto  39934 Jan 26  2017 occiData.h
-r-xr-xr-x. 1 netauto netauto  72561 Jan 26  2017 occiControl.h
-r-xr-xr-x. 1 netauto netauto  35604 Jan 26  2017 occiCommon.h
-r-xr-xr-x. 1 netauto netauto 194752 Jan 26  2017 oci.h
-r-xr-xr-x. 1 netauto netauto   8953 Jan 26  2017 ociextp.h
-r-xr-xr-x. 1 netauto netauto  11782 Jan 26  2017 ocidfn.h
-r-xr-xr-x. 1 netauto netauto   4048 Jan 26  2017 ocidem.h
-r-xr-xr-x. 1 netauto netauto  43001 Jan 26  2017 ocidef.h
-r-xr-xr-x. 1 netauto netauto   6204 Jan 26  2017 ociapr.h
-r-xr-xr-x. 1 netauto netauto 438428 Jan 26  2017 ociap.h
-r-xr-xr-x. 1 netauto netauto  10361 Jan 26  2017 oci8dp.h
-r-xr-xr-x. 1 netauto netauto   7203 Jan 26  2017 oci1.h
-r-xr-xr-x. 1 netauto netauto  11649 Jan 26  2017 occiAQ.h
-r-xr-xr-x. 1 netauto netauto   9892 Jan 26  2017 xa.h
-r-xr-xr-x. 1 netauto netauto 123766 Jan 26  2017 ort.h
-r-xr-xr-x. 1 netauto netauto  42866 Jan 26  2017 oro.h
-r-xr-xr-x. 1 netauto netauto 158261 Jan 26  2017 orl.h
-r-xr-xr-x. 1 netauto netauto 102775 Jan 26  2017 ori.h
-r-xr-xr-x. 1 netauto netauto  15083 Jan 26  2017 orid.h
-r-xr-xr-x. 1 netauto netauto   6540 Jan 26  2017 oratypes.h
-r-xr-xr-x. 1 netauto netauto  32313 Jan 26  2017 odci.h
-r-xr-xr-x. 1 netauto netauto 111273 Jan 26  2017 ocixstream.h
-r-xr-xr-x. 1 netauto netauto   8138 Jan 26  2017 ocixmldb.h
-r-xr-xr-x. 1 netauto netauto   6494 Jan 26  2017 ocikpr.h
-r-xr-xr-x. 1 netauto netauto  78862 Jan 26  2017 nzt.h
-r-xr-xr-x. 1 netauto netauto  37493 Jan 26  2017 nzerror.h
-r-xr-xr-x. 1 netauto netauto  44851 Jan 26  2017 ldap.h

Perl MakeFile.PL 进展顺利

DBD-Oracle-1.23]# perl Makefile.PL
Using DBI 1.641 (for perl 5.016003 on x86_64-linux) installed in /home/netauto/perl_modules/lib/auto/DBI/
Configuring DBD::Oracle for perl 5.016003 on linux (x86_64-linux)
Remember to actually *READ* the README file! Especially if you have any problems.
Installing on a linux, Ver#3.10
Using Oracle in /home/netauto/oracle/instantclient_12_2
DEFINE _SQLPLUS_RELEASE = "1202000100" (CHAR)
Oracle version 12.2.0.1 (12.2)
Looks like an Instant Client installation, okay
Your LD_LIBRARY_PATH env var is set to '/home/netauto/oracle/instantclient_12_2/'
Oracle sysliblist:
Found header files in /home/netauto/oracle/instantclient_12_2/sdk/include.
Checking for functioning wait.ph

System: perl5.016003 linux ord12-p-noobprimt-firmsmt-01 3.10.0-693.11.6.el7.x86_64 #1 smp wed jan 3 18:59:47 pst 2018 x86_64 x86_64 x86_64 gnulinux
Compiler:   cc -O2 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Linker:     /bin/ld
Sysliblist:
Linking with -lclntsh.

WARNING: If you have problems you may need to rebuild perl with threading enabled.
LD_RUN_PATH=/home/netauto/oracle/instantclient_12_2
Using DBD::Oracle 1.23.
Using DBD::Oracle 1.23.
Using DBI 1.641 (for perl 5.016003 on x86_64-linux) installed in /home/netauto/perl_modules/lib/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Oracle
Writing MYMETA.yml and MYMETA.json
***  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?)

但是,使命令出错

DBD-Oracle-1.23]# make
Skip blib/lib/DBD/Oracle.pm (unchanged)
Skip blib/lib/oraperl.ph (unchanged)
Skip blib/arch/auto/DBD/Oracle/dbdimp.h (unchanged)
Skip blib/arch/auto/DBD/Oracle/ocitrace.h (unchanged)
Skip blib/lib/Oraperl.pm (unchanged)
Skip blib/arch/auto/DBD/Oracle/Oracle.h (unchanged)
Skip blib/lib/DBD/Oracle/Object.pm (unchanged)
Skip blib/lib/DBD/Oracle/GetInfo.pm (unchanged)
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
Running Mkbootstrap for Oracle ()
chmod 644 "Oracle.bs"
"/home/netauto/program_files/perl/perl-5.16.3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs 644
cc -c  -I/home/netauto/oracle/instantclient_12_2/sdk/include -I/home/netauto/perl_modules/lib/auto/DBI -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION="1.23" -DXS_VERSION="1.23" -fPIC "-I/home/netauto/program_files/perl/perl-5.16.3/lib/5.16.3/x86_64-linux/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION="12.2.0.1" Oracle.c
Oracle.xs: In function ‘XS_DBD__Oracle__st_ora_bind_param_inout_array’:
Oracle.xs:175:6: error: ‘sv_yes’ undeclared (first use in this function)
? &sv_yes : &sv_no;
^
Oracle.xs:175:6: note: each undeclared identifier is reported only once for each function it appears in
Oracle.xs:175:16: error: ‘sv_no’ undeclared (first use in this function)
? &sv_yes : &sv_no;
^
Oracle.c: In function ‘XS_DBD__Oracle__st_ora_execute_array’:
Oracle.c:1679:14: error: ‘sv_undef’ undeclared (first use in this function)
cols = &sv_undef;
^
Oracle.xs: In function ‘XS_DBD__Oracle__st_cancel’:
Oracle.xs:253:41: error: ‘sv_yes’ undeclared (first use in this function)
ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
^
Oracle.xs:253:51: error: ‘sv_no’ undeclared (first use in this function)
ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_reauthenticate’:
Oracle.xs:289:59: error: ‘sv_yes’ undeclared (first use in this function)
ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
^
Oracle.xs:289:69: error: ‘sv_no’ undeclared (first use in this function)
ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_write’:
Oracle.xs:317:11: error: ‘sv_undef’ undeclared (first use in this function)
ST(0) = &sv_undef;
^
Oracle.xs:342:11: error: ‘sv_yes’ undeclared (first use in this function)
ST(0) = &sv_yes;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_append’:
Oracle.xs:373:11: error: ‘sv_undef’ undeclared (first use in this function)
ST(0) = &sv_undef;
^
Oracle.xs:396:14: error: ‘sv_yes’ undeclared (first use in this function)
ST(0) = &sv_yes;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_read’:
Oracle.xs:430:13: error: ‘sv_undef’ undeclared (first use in this function)
dest_sv = &sv_undef;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_trim’:
Oracle.xs:464:11: error: ‘sv_undef’ undeclared (first use in this function)
ST(0) = &sv_undef;
^
Oracle.xs:467:11: error: ‘sv_yes’ undeclared (first use in this function)
ST(0) = &sv_yes;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_length’:
Oracle.xs:482:11: error: ‘sv_undef’ undeclared (first use in this function)
ST(0) = &sv_undef;
^
Oracle.xs: In function ‘XS_DBD__Oracle__db_ora_lob_chunk_size’:
Oracle.xs:501:12: error: ‘sv_undef’ undeclared (first use in this function)
ST(0) = &sv_undef;
^
make: *** [Oracle.o] Error 1

对我来说,它似乎找不到一些头文件,但是,我需要将哪个文件和哪个路径添加到LD_LIBRARY_PATH(如果需要(,我一无所知。我真的无法理解它。

请让我知道我在这里做错了什么。

谢谢 普拉比尔

DBD::Oracle的 1.23 版已有 9 年历史,并且sv_undef现在被称为PL_sv_undef

看看带有sv_undef的旧CPAN模块。它是从2003年开始的,但它可能仍然相关

它归结为跑步

perl Makefile.PL POLLUTE=1

将旧定义添加到构建中sv_undefsv_yessv_no

相关内容

  • 没有找到相关文章

最新更新