Operating System - HP-UX
1748010 Members
5056 Online
108757 Solutions
New Discussion юеВ

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

 
SOLVED
Go to solution
Mukesh_4
Occasional Advisor

Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

Hello Everybody,
I am trying to install DBI 1.201 and DBD1.21 for Oracle in HP UX 11.11 for using Perl. Got the Ansi C compiler fixed up on the HP UX box here
Built perl and DBI and installed them
Some important info:- The HP UX 11.11 is of 64 bit whereas the Oracle 8.1.7.0.0 installed on it is on 32 bit.

OK.
Ran the configure for perl installationg using :-
sh Configure -Dprefix=/opt/perl5.8.0 -Duse64bitint -Duselargefiles -Uusemymalloc -Ubincompat5005 -de

Specified the following :-
ccflags='+z -D_HPUX_SOURCE +DD64 -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' (+ some more)

libs = -lcl -lpthread -lnsl -lnm -ldld -lm -lc -lsec (plus some more)

No problems with the compilation and installation. Even the DBI (1.201) installed gracefully. The ORacle DBD(1.12 or 1.07 ) failed to "make" .


The make for DBD fails. Following is the log for running the make for DBD:-
Is there an incompatibility of binaries which gives this problem.
Looking from some previous postings I suspect that it could be some issue related to the the Oracle 34 Bit /HP UX 64 bit libraries. If so, could you le me know where to get the Oracle 64 Bit libraries (for 8.1.7.0.0) from (or do I have to install 64 bit Oracle ?)
securesvr1]:/opt/perl5.8.0/DBD-Oracle-1.07 > make
rm -f blib/arch/auto/DBD/Oracle/Oracle.sl
LD_RUN_PATH="/sgx/oracle/sw/app/oracle/product/8.1.7/lib:/lib/pa20_64" /usr/bin/ld -b +vnocompatwarnings -L/usr/local/lib -L/lib/pa20_64 Oracle.o dbdimp.o oci7.o oci8.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib/ssdbaed.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib/defopt.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib/kpuadef.o -l:libcl.a -o blib/arch/auto/DBD/Oracle/Oracle.sl -L/sgx/oracle/sw/app/oracle/product/8.1.7/lib/ -lclntsh -lnbeq8 -lnhost8 -ln8 -lncrypt8 -lnidx8 -ln8 -lncrypt8 -lnus8 -ln8 -lncrypt8 -lnk58 -ln8 -lncrypt8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -ln8 -lncrypt8 -lnrad8 -ln8 -lncrypt8 -L/sgx/oracle/sw/app/oracle/product/8.1.7/JRE/lib/PA_RISC/native_threads -ln8 -lncrypt8 -lnsid8 -ln8 -lncrypt8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -ln8 -lncrypt8 -lnidx8 -ln8 -lncrypt8 -lnus8 -ln8 -lncrypt8 -lnk58 -ln8 -lncrypt8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -ln8 -lncrypt8 -lnrad8 -ln8 -lncrypt8 -L/sgx/oracle/sw/app/oracle/product/8.1.7/JRE/lib/PA_RISC/native_threads -ln8 -lncrypt8 -lnsid8 -ln8 -lncrypt8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lnbeq8 -lnhost8 -ln8 -lncrypt8 -lnidx8 -ln8 -lncrypt8 -lnus8 -ln8 -lncrypt8 -lnk58 -ln8 -lncrypt8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -ln8 -lncrypt8 -lnrad8 -ln8 -lncrypt8 -L/sgx/oracle/sw/app/oracle/product/8.1.7/JRE/lib/PA_RISC/native_threads -ln8 -lncrypt8 -lnsid8 -ln8 -lncrypt8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 -lnbeq8 -lnhost8 -ln8 -lncrypt8 -lnidx8 -ln8 -lncrypt8 -lnus8 -ln8 -lncrypt8 -lnk58 -ln8 -lncrypt8 -lnldap8 -lldapclnt8 -lnsslb8 -ln8 -lncrypt8 -ln8 -lncrypt8 -lnoname8 -ln8 -lncrypt8 -lnrad8 -ln8 -lncrypt8 -L/sgx/oracle/sw/app/oracle/product/8.1.7/JRE/lib/PA_RISC/native_threads -ln8 -lncrypt8 -lnsid8 -ln8 -lncrypt8 -lntcp8 -lntcps8 -lnsslb8 -lnent8 -lntcp8 -lntns8 -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lrt -lpthread -ldld -lm
ld: Mismatched ABI (not an ELF file) for -lclntsh
Fatal error.
*** Error exit code 1

Is there any way to compile perl on the 64 bit HP UX Box so as to obtain 32 bit binaries?

Any help would be highly appreciated.
Many Thanks
Mukesh
8 REPLIES 8
Ravi_8
Honored Contributor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

Hi Mukesh

We did this sometime back. We found that we could not build the 32 Bit using the HP provided Perl5.6.1. We had to recompile and build the latest stable 5.6.1 from the GNU perl site using dynamic linking. After that the DBI and DBD re-compiled for both 32 and 64 bit.
Works real slick too, our applications folks are pretty happy now.

One other thing. The Notes on the Perl build specifically mention Oracle on HP-UX because it uses libpthreads.

look at this URL
http://support.sas.com/techsup/unotes/SN/001/001875.html
never give up
Steven E. Protter
Exalted Contributor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

There is a migration process for the oracle data.

Why don't you compile it on a 32 bit box and migrate the binaries. They might work right.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mukesh_4
Occasional Advisor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

 
Colin Topliss
Esteemed Contributor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

I had to build a perl distribution on a 32 bit system before I could get DBD to compile - I always had the same problem you are reporting now.

Check out this earlier discussion:

http://forums.itrc.hp.com/cm/QuestionAnswer/0,,0xcb1036e69499d611abdb0090277a778c,00.html

You can also do a generic search on the Internet - there are other experiences people have had trying to do the same thing.

Col.
H.Merijn Brand (procura
Honored Contributor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

Wow, a long log.

What did you exactly change in config.sh?

sh Configure -Dprefix=/opt/perl5.8.0 -Duse64bitint -Duselargefiles -Uusemymalloc -Ubincompat5005 -de
Then edited the config.sh file and changed the following
ccflags='+z -D_HPUX_SOURCE +DD64 -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' (+some more)
libs = -lcl -lpthread -lnsl -lnm -ldld -lm -lc -lsec (+ ome more)
ran Configure -de

And I personally prefer +D2.0w over +DD64


for the 'ld' error,


ld: Mismatched ABI (not an ELF file) for -lclntsh

# find $ORACLE_HOME -name \*clntsh\* | xargs file | grep 64

should give at least one .1, .sh, or .2 file that should be useable for linking. If not, your Ora/64 install is not complete. Put the path to the lib in front of the other pathes in the makefile using -L/your/path/to/the/64bit/shared/libs

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Mukesh_4
Occasional Advisor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

Thanks Merijn!!
The second suggestion worked.

find $ORACLE_HOME -name \*clntsh\* | xargs file | grep 64 gave the following

/sgx/oracle/sw/app/oracle/product/8.1.7/bin/genclntsh64: commands text
/sgx/oracle/sw/app/oracle/product/8.1.7/lib64/clntsh.map: ascii text
/sgx/oracle/sw/app/oracle/product/8.1.7/lib64/libclntsh.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/sgx/oracle/sw/app/oracle/product/8.1.7/lib64/libclntsh.sl.8.0: ELF-64 shared object file - PA-RISC 2.0 (LP64)

There is no .sh, .1 or .2 file. Was wondering whether the Ora 64 was properly installed


Anyway, tried your next suggestion, that of putting the /sgx/oracle/sw/app/oracle/product/8.1.7/lib64/ before anything else before running the make.

I used the following sequence (borrowed from http://www.rosat.mpe-garching.mpg.de/mailing-lists/dbi/2002-03/msg00087.html)
(Ran it from the DBD-Oracle-1.12 folder)

LD_RUN_PATH="/sgx/oracle/sw/app/oracle/product/8.1.7/lib64:/opt/local/appdev/software/oracle/product/8.1.7/rdbms/lib:/lib/pa20_64" /usr/bin/ld +s -b +vnocompatwarnings -L/sgx/oracle/sw/app/oracle/product/8.1.7/lib64/ -L/lib/pa20_64 -L/usr/local/lib Oracle.o dbdimp.o oci7.o oci8.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib64/ssdbaed.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib64/defopt.o /sgx/oracle/sw/app/oracle/product/8.1.7/lib64/nautab.o /sgx/oracle/sw/app/oracle/product/8.1.7/lib64/naeet.o /sgx/oracle/sw/app/oracle/product/8.1.7/lib64/naect.o /sgx/oracle/sw/app/oracle/product/8.1.7/lib64/naedhs.o /sgx/oracle/sw/app/oracle/product/8.1.7/rdbms/lib64/kpuadef.o -l:libcl.a -o blib/arch/auto/DBD/Oracle/Oracle.sl -L/sgx/oracle/sw/app/oracle/product/8.1.7/lib -lclient8 -lclntsh -lcommon8 -lcore8 -ldld -lgeneric8 -lldapclnt8 -lm -lmm -ln8 -lnbeq8 -lncrypt8 -lnent8 -lnhost8 -lnl8 -lnldap8 -lnls8 -lnoname8 -lnro8 -lnsgr8 -lnsslb8 -lntcp8 -lntcps8 -lntns8 -lnus8 -lnzjs8 -lpls8 -lpthread -lrt -lsql8 -ltrace8 -lvsn8 -lwtc8

Ran make test (the tests went fine)
Ran make install (the install was graceful!)

I guess its correct (as mentioned by ulairi@csun.edu ..sorry dunno your name :-) ) that the "make" of DBD picks up too many -l libs to be passed on the command line when building Oracle.sl. We could make use of the above steps to limit them to the required paths

Its also important to specify the lib64 library paths (shared libs) ahead of anything else in the -L parameter (thanks Merijn!)

Thanks for the the others also, Colin, Steven and Ravi for chipping in !!

Have a Nice Day!
Mukesh
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

the .sh was a typo - of course - which should have been .sl
I'm glad I could help anyway, and yes, DBD::Oracle uses standard oracle tools to get the list of -l libs it could need, which includes a lot of unneeded ones, but these do not harm.

BTW you can express your thanks by asigning (8-10)points to the answers that helped and no (or 1-7) points to the answers that didn't help

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Mukesh_4
Occasional Advisor

Re: Oracle DBD compilation on HP UX 11.11(64 bit) using Oracle 8.1.7 (32 bit)

That was fast Merijn :-)
Points assigned already!
Enjoy!