Please read the attached... 

The README.hpux may be more current than the one in your DBD-Oracle module.
The attached email contains information I was intending to include in the
next version of the README.hpux.  I would welcome a patch.  Someone who
builds with gcc, would be the perfect person to do this, since I do not use
Gcc on HP here.

Lincoln
 


-----Original Message-----
From: Adam Stuckey [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 19, 2002 6:46 PM
To: '[EMAIL PROTECTED]'
Subject: DBI installation problem on HP-UX

Hi All,

I am having difficulty installing DBI-1.21 on HP-UX 11
I am running perl v5.6.1 and gcc 3.04

Running "perl Makefile.PL CC=gcc" completes successfully but when I run make
it bombs out:

root:mv36_1# make
        cp Changes blib/lib/DBI/Changes.pm
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBI/Format.pm blib/lib/DBI/Format.pm
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
        /opt/perl5/bin/perl -p -e "s/~DRIVER~/Perl/g" <
blib/arch/auto/DBI/Drive r.xst > Perl.xsi
        /opt/perl5/bin/perl -I/opt/perl5/lib/5.6.1/PA-RISC1.1
-I/opt/perl5/lib/5 .6.1 /opt/perl5/lib/5.6.1/ExtUtils/xsubpp  -typemap
/opt/perl5/lib/5.6.1/ExtUtil s/typemap Perl.xs > Perl.xsc && mv Perl.xsc
Perl.c
        gcc -c  -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O +Onolimit
-
DVERSION=\"1.21\"  -DXS_VERSION=\"1.21\" +z
-I/opt/perl5/lib/5.6.1/PA-RISC1.1/CO
RE -DDBI_NO_THREADS Perl.c
gcc: +Onolimit: No such file or directory
gcc: +z: No such file or directory
<command line>: missing '(' after predicate
*** Error exit code 1

Stop.
root:mv36_1# 

Any Ideas??


Thanks.
Adam Stuckey 


Disclaimer
___________________________________________________________

The information contained in this e-mail and any attachments are
confidential. If you are not the intended recipient, then please notify us
immediately by reply e-mail. You may not disclose or use the information in
this e-mail or attached documents in any attachments, use the contents for
any purposes, or disclose the contents to any other person: to do so could
be a breach of confidence. The views or opinions expressed in this email are
the author's own and may not reflect the views or opinions of Marconi.
Marconi does not guarantee the integrity of any e-mails or attached files
and we suggest you scan all incoming e-mails for viruses.
___________________________________________________________



Attachment: README.hpux
Description: Binary data

--- Begin Message ---
On Tue, 9 Apr 2002 14:32:03 -0400 
[EMAIL PROTECTED] wrote:

> 
> Wow... that is ugly...  But then, why are you using Active perl
> instead of building your own?

I am not. I just wanted to check if this HP patch is working. My perl
_is_ linked with cl, pthread and java, so for that LD_PRELOAD doesn't
change anything. 

Also note, that not all people want to build its own perl binary, when
they have one prepackaged. Of course not all people would want to
install any patch on production machine also.

Anyway - I think it could go into the README.hpux, how to install
DBD::Oracle without too much troubles, when this patch is installed.

BTW - I used gcc 2.95.3 or gcc 3.0.4. gcc 2.8.1 won't work and gives
error, that it cannot handle BIG FILES (when building DBI).

Waldemar
--- End Message ---
--- Begin Message ---
Well - hello again.

I just checked that patch I have mentioned earlier. It seems, that at
last for HPUX 11.00 (but I don't expect any difference on HP 11.11) it
is really working as promised.

$ perl -V
  Locally applied patches:
        ActivePerl Build 627

This is normally shipped PERL with HP-UX.

$ ORACLE_USERID=xxx/xxx@xxx LD_PRELOAD=/usr/lib/libcl.2 make test

went without any problems.

So - with this patch, all scripts which uses DBD::Oracle should be
started like this:

LD_PRELOAD=/usr/lib/libcl.2 my-dbd-oracle.pl

It seems, that it is not possible to say just libcl.2 in LD_PRELOAD. I
cannot say way exactly. It could be either because ActivePerl's binary
wasn't built with option +s for linker (and it indeed is not), either
this is limitation this new functionality.

As documentation says, LD_PRELOAD should be unset as soon as possible.
That is one cannot set it in .profile (or .cshrc), because it would
affect all programs executed during all sessions. So all DBD::Oracle's
scripts should use some kind of wrapper, but that is obvious, I think.

Best regards,
  Waldemar
--- End Message ---
--- Begin Message ---
So, if I read this right, you have saved the world (by providing enough
detail to describe a successful gcc build of DBD-Oracle on HP-UX).  I will
be adding this to the README.hpux with my next rewrite, giving you credit OF
COURSE.

Thank you very much

Tim, please give me a couple weeks notice before the next version is
released.  I will try to get to this sooner than later, and if so will
distribute to the list ahead of time.  In any case, I think this info is
useful enough that it deserves getting into the next release.

Lincoln



-----Original Message-----
From: Waldemar Zurowski [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 09, 2002 5:59 AM
To: [EMAIL PROTECTED]
Subject: Re: :Oracle 1.12 (Oracle 8.1.7) on HPUX 11.11

On Mon, 8 Apr 2002 15:58:57 -0400 
[EMAIL PROTECTED] wrote:

> I will add this to the README.hpux file.
> Did you export LD_OPTS, at runtime or at build time?

Huh? So You are one of the manager of README.hpux? I didn't noticed.

Here is what I have done in detail.

Our built configuration:
1) Host information:
HP-UX hostname B.11.11 U 9000/800 XXXXXXXXX unlimited-user license

2) Oracle 8.1.7

3) Parameters to build perl:
../Configure -des -Uinstallusrbinperl -Uusethreads -Uuseithreads
-Duselargefiles -Dcc=gcc -Darchname=PA-RISC1.1 -Dprefix=/opt/perl-non-thread
-Dlibs='-lcl -lpthread -L${ORACLE_HOME}/JRE/lib/PA_RISC/native_threads
-ljava -lnsl -lnm -lndbm -ldld -lm -lc -lndir -lcrypt -lsec'

Please note, that I added -L${ORACLE_HOME}/JRE/lib/PA_RISC/native_threads
-ljava,
just because DBD::Oracle wants to link with it (perhaps due to Oracle's own
build' rules picked up by Makefile.PL - I wasn't hunting for that too much)

4) I set environment variable LDOPTS to '+s' (see ld(1)). This holds
extra parameters to HPUX' ld command, as I don't use GNU ld (anybody does?).
This allows to build executable, which when run would search for
dynamic linked libraries using SHLIB_PATH (for 32-bit executable)
and LD_LIBRARY_PATH (for 64-bit executable). Obviously LDOPTS is
needed only when building perl _and_ DBI + DBD::Oracle.

Then, after building perl + DBI + DBD::Oracle and moving it
into production enviroment it was enough to add to SHLIB_PATH
${ORACLE_HOME}/lib and ${ORACLE_HOME}/JRE/lib/PA_RISC/native_threads,
for example:

SHLIB_PATH=${ORACLE_HOME}/lib:${ORACLE_HOME}/JRE/lib/PA_RISC/native_threads:
$SHLIB_PATH

Please note output of ldd command:

$ ldd -s ./perl
 [...]
  find library=/home/ora817/JRE/lib/PA_RISC/native_threads/libjava.sl;
required by ./perl
    search path=/home/ora817/lib:/home/ora817/JRE/lib/PA_RISC/native_threads
(SHLIB_PATH)
    trying path=/home/ora817/lib/libjava.sl
    trying path=/home/ora817/JRE/lib/PA_RISC/native_threads/libjava.sl
        /home/ora817/JRE/lib/PA_RISC/native_threads/libjava.sl =>
/home/ora817/JRE/lib/PA_RISC/native_threads/libjava.sl
 [...]

All of this mess is necessary because of weakness of shl_load(3X), explained
in current README.hpux and in some discuss forums at HP.com site. I have
learned,
that HP issued patch PHSS_24304 for HP-UX 11.11
and PHSS_24303 for HP-UX 11.00, which introduced variable LD_PRELOAD.
I haven't tried it yet, but it seems it is promising to completely
avoid of building own perl binary, as it would be enough to set
LD_PRELOAD to libjava.sl (for example) and all 'Cannot load XXXlibrary'
during
building of DBD::Oracle should be gone.

The documentation says, that setting this variable should have the same
effect
as linking binary with this library. Also please note, that this variable
is used only when binary is not setuid nor setgid binary (for obvious
security reasons).

It seems, that the best way to find out if You already have this patch
applied,
is to check if 'man 5 dld.sl' says anything about LD_PRELOAD environment
variable.

Best regards,
  Waldemar Zurowski
--- End Message ---
--- Begin Message ---
I found third simplest solution:
export LD_OPTS=+s

This way I can use SHLIB_PATH variable during execution of binary.

Waldemar

-- 
o Powiadam Wam, iz straszny czas nastal na ulicach po owym pamietnym
  zacmieniu Slonca. Albowiem wtedy wlasnie uzyskalem prawo jazdy.




-- 



Okresl Swoje potrzeby - my znajdziemy oferte za Ciebie!

[ http://oferty.onet.pl ]


--- End Message ---

Reply via email to