Operating System - HP-UX
1748171 Members
3991 Online
108758 Solutions
New Discussion юеВ

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

 
SOLVED
Go to solution
Ralph Grothe
Honored Contributor

Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

Hi,

sorry for boring you again,
but Oracle, HP-UX and DBI developers seem never come to terms in releasing products (i.e. libraries, compiler, API, configure scripts etc.) that even install properly without insane fiddling on the installers' behalf.

(how come that MySQL, PostgreSQL, Informix developers decently achieve this?)

I'm once again forced to build a new Perl only because of a seemingly minor release upgrade from 8.1.7 to 9i.

I compiled Perl with the HP-UX ANSI C compiler and the usual Configure mantra:

./Configure -A prepend:libswanted='cl pthread ' -Duselargefiles

Then I installed DBI-1.37.

Then I first attempted the latest DBD-Oracle-1.14
Of course taking care to correctly have the usual environment set
e.g.
ORACLE_HOME
ORACLE_SID
ORACLE_USERID
LD_LIBRARY_PATH
SHLIB_PATH
(a connect through Oracle9i's sqlplus with this environment works)

First of all the Makefile.PL from DBD-Oracle-1.14 seems buggy, since I get this:

Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lclntsh
Note (probably harmless): No library found for -l:libnss_dns.1
Undefined subroutine &MY::hpux_libdir called at Makefile.PL line 1338.

Having had a look at the Perl source of Makefile.PL it seems that hpux_libdir() is indeed defined outside the scope of the MY package (so Perl is complaining rightly).

Since I didn't feel inclined to fix this bug I tried an earlier release, viz. DBD-Oracle-1.12 where at least Makefile.PL works and produces a Makefile.
But a make from this exits like such:

LD_RUN_PATH="/app/oracle/product/9.2.0/lib" /usr/bin/ld -b +vnocompatwa
rnings -L/usr/local/lib Oracle.o dbdimp.o oci7.o oci8.o /app/oracle/product/9
.2.0/rdbms/lib/defopt.o -o blib/arch/auto/DBD/Oracle/Oracle.sl -L/app/oracle/
product/9.2.0/lib/ -lclntsh -lcl -lrt -lpthread -ldld -lm -lqsmashr
/usr/bin/ld: /app/oracle/product/9.2.0/rdbms/lib/defopt.o: Mismatched ABI. 64-bi
t PA object file found in 32-bit link.
*** Error exit code 1

Stop.


Has anyone achieved to install a working DBD::Oracle that connects to an Oracle9i instance?

If so, please tell me what is required.

Regards

Ralph
Madness, thy name is system administration
6 REPLIES 6
H.Merijn Brand (procura
Honored Contributor

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

I thought that Oracle-9 (whatever subversion) has dropped 32bit support completely forcing you (and other suffering and innocent users) to make all applications that should work with Oracle to be 64bit apps.

So rebuilding perl would be

# Configure -A prepend:libswanted='cl pthread ' -Duselargefiles -Duse64bitall

IIRC -Duselargefiles is default (I cannot imagine that -Duse64bitall would not force it anyway)

HTH Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Julio Yamawaki
Esteemed Contributor

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

Hi,
In Oracle 9.2, you have 32-bit libraries separated:

$ORACLE_HOME/lib32, use this to link old libraries with 32-bits and user $ORACLE_HOME/lib to link new libraries 64-bits.
Ralph Grothe
Honored Contributor

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

Merijn,

I feared I would have to use the -Duse64bitall.

But I was scared off when reading in the README that Perl isn't yet fully 64Bit ready.

I will run a new build after Whitsun.

Despite the t-storm yesterday our office still has 30??C so that I'm not really keen on continuing today.

To all have a nice holiday.

Ralph
Madness, thy name is system administration
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

README.hpux changed 3 minutes ago :) Thanks for noting the glitch.

--8<---
=head2 64-bit Perl on HP-UX

Beginning with HP-UX 11.00, programs compiled under HP-UX can take
advantage of the LP64 programming environment (LP64 means Longs and
Pointers are 64 bits wide).

Work is being performed on Perl to make it 64-bit compliant on all
versions of Unix. Once this is complete, scalar variables will be able
to hold numbers larger than 2^32 with complete precision.

As of the date of this document, Perl is fully 64-bit compliant on
HP-UX 11.00 and up for both ccc- and gcc builds.

Should a user wish to experiment with compiling Perl in the LP64
environment, use the -Duse64bitall flag to Configure. This will force
Perl to be compiled in a pure LP64 environment (via the +DD64 flag).
(Note that these flags will only work with HP's ANSI C compiler. If
you want to compile Perl using gcc, you will have to get a version of
the compiler that support 64-bit operations.)

You can also use the -Duse64bitint flag to Configure. Although there
are some minor differences between compiling Perl with this flag versus
the -Duse64bitall flag, they should not be noticeable from a Perl user's
perspective.

In both cases, it is strongly recommended that you use these flags when
you run Configure. If you do not use do this, but later answer the
questions about 64-bit numbers when Configure asks you, you may get a
configuration that cannot be compiled, or that does not function as
expected.
-->8---

FWIW 5.8.0 and up are 100% 64bit compliant as for perls view of the world.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ralph Grothe
Honored Contributor

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

Merijn,

this morning I rebuilt Perl with the additional flag -Duse64bitall.

After having reinstalled DBI, and reset the Oracle environment, DBD::Oracle compiled and most of the tests worked (see below).

What irritates me is the by the test: target reported "old-style deprecated usage of the connect() constructor"?

Should this bother me?
Would I have to modify my scripts regarding the instantiation of a db handle?
Do you think I can ignore the errors, and continue with "make install"?

It's really great that this forum has a Perl guru who is into portting issues with regard to HP-UX :-)



# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_har
ness(0, 'blib/lib', 'blib/arch')" t/*.t
t/base.......ok
t/general....ok
t/long.......ok
t/ph_type....ok 12/53expected 'trailing' but got 'trailing ' for VARCHAR2
t/ph_type....FAILED test 13
Failed 1/53 tests, 98.11% okay
t/plsql......DBI->connect using 'old-style' syntax is deprecated and will be an
error in future versions at t/plsql.t line 23
t/plsql......ok
t/reauth.....skipped
all skipped: no reason given
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/ph_type.t 53 1 1.89% 13
1 test skipped.
Failed 1/6 test scripts, 83.33% okay. 1/281 subtests failed, 99.64% okay.
*** Error exit code 2

Stop.
Madness, thy name is system administration
H.Merijn Brand (procura
Honored Contributor

Re: Oracle (9i), HP-UX 11.00, Perl that ole Trio Infernale

Shhh, don't tell Tim, but I don't like 1.37
Can you try going back to the wonderful stable DBI-1.35 and see if that fits your needs?

I do however expect 1.38 soon, and probably a DBD::Oracle-1.15 to fit. Don'
t hold your breath on that though. *I* (even as I love to live on the bleading edge) am still using DBI-1.35 in production.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn