Operating System - Linux
1828796 Members
2508 Online
109985 Solutions
New Discussion

perl 5.8.7 with threading

 
SOLVED
Go to solution
MikeL_4
Super Advisor

perl 5.8.7 with threading

I can install perl 5.8.7 without threading just fine, but when I try it with threading I receive join errors in the make test:

ext/threads/shared/t/0nothread............ok
ext/threads/shared/t/av_refs..............Can't call method "join" on an undefined
value at ../ext/threads/shared/t/av_refs.t line 50.
FAILED at test 4
ext/threads/shared/t/av_simple............Can't call method "join" on an undefined
value at ../ext/threads/shared/t/av_simple.t line 47.
FAILED at test 10
ext/threads/shared/t/cond.................Can't call method "join" on an undefined
value at ../ext/threads/shared/t/cond.t line 53.
FAILED at test 3
ext/threads/shared/t/disabled.............ok
ext/threads/shared/t/hv_refs..............Can't call method "join" on an undefined
value at ../ext/threads/shared/t/hv_refs.t line 45.
FAILED at test 4
ext/threads/shared/t/hv_simple............Can't call method "join" on an undefined
value at ../ext/threads/shared/t/hv_simple.t line 43.
FAILED at test 3
ext/threads/shared/t/no_share.............Can't call method "join" on an undefined
value at ../ext/threads/shared/t/no_share.t line 43.
FAILED at test 4

I need it with threading as when I try to include DBD-Oracle it complains thet Oracle is threaded and to recompile perl with threading..

Any ideas as to how to get perl with threading to compile properly ?
15 REPLIES 15
H.Merijn Brand (procura
Honored Contributor
Solution

Re: perl 5.8.7 with threading

Yes, I do.

1. DBD-Oracle does *NOT* need a threaded perl, it needs a perl that has the threads library linked in. I admid this may sound confusing, but just believe me.

2. Any special reason to build it yourself? I have all versions of perl available in 32 and 64bit for HP-UX 11.11 (11i), 11.00 and 10.20 and they all include the most recent DBI at the time of build, and are prepared to be linked to Oracle. A good reason to build yourself might be that you do have HP's C-ANSI-C, which compiles better than gcc.

Point 1 is verbosely explained in both perl's README.hpux and in DBD-Oracle's README.hpux

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

procura, Do you have 5.8.7 for hpux 11i in both 32 & 64 bit that can be loaded to /opt ?
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

That's an easy answer: yes

perl32 -> /opt/perl
perl64 -> /opt/perl64

Just go to my site. URL's in previous posts.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

procura, I downloaded from your recommended site: perl-5.8.7-dor-11.11.sd.bz which from the description will give me what the applications group is after.

If I am correct swinstall will install this depot in /opt/perl <32bit> and /opt/perl64 <64bit>

Our current production perl is loaded in /opt/perl and we don't want to overwrite that directory, is there a way around that ?
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

There is no way around /opt/perl and /opt/perl64

If you only want perl64, there is no problem. My site describes:

# bzip2 -d perl-5.8.7-dor-11.11.sd.bz
# swinstall -s `pwd`/perl-5.8.7-dor-11.11.sd perl64

Just make sure /opt/perl64/bin is in your $PATH before /opt/perl/bin

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

Thanks, I understand that for the 64bit, but on a couple of servers they are still using 32bit so if I install the 32bit depot it will over write there current production version that is currently in /opt/perl.

Can I tar my current production perl version in /opt/perl

Load the new 32bit depot which will overwrite /opt/perl.

Then say move the /opt/perl to /opt/perl32 and then reload the production tar backup into /opt/perl ??
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

in that case, a simple

# mv /opt/perl /opt/perl32

would suffice, but sorry, you cannot do that, because the default include tree (/opt/perl/lib) is compiled into the binary/ies

You *can* get it to work using PERL5LIB environment, but it's likely more trouble than it's worth

What is special about the current release that you want to keep it? Does it have modules installed that my build does not have?

Enjoy, Have FUN! H.Merijn [ who would not mind some points for my site support ]
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

This is on on production server and they won't allow me to overwrite what is currently working.

I guess I have no other option but to recompile perl from scratch and then I'm back to my origional problem.
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

In which case you should have no problem at all in the first place :)

From README.hpux (I know, I wrote this myself):
--8<---
=head2 Oracle on HP-UX

Using perl to connect to Oracle databases through DBI and DBD::Oracle
has caused a lot of people many headaches. Read README.hpux in the
DBD::Oracle for much more information. The reason to mention it here
is that Oracle requires a perl built with libcl and libpthread, the
latter even when perl is build without threads. Building perl using
all defaults, but still enabling to build DBD::Oracle later on can be
achieved using

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

Do not forget the space before the trailing quote.

Also note that this does not (yet) work with all configurations,
it is known to fail with 64-bit versions of GCC.
-->8---

Ahh, and the last remark is not true anymore. I should remove it :)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

Merijn, thanks for all your help with this. I recompiled perl with following as you suggested: sh Configure -Dcc=gcc -Dprefix=/opt/perl-5.8.7 -A prepend:libswanted='cl pthread '
and all went good. Is there a way to verify that I have perl as needed for DBD-Oracle ?

MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

Merijn, I get to the DBD-Oracle make run and it's compile errors out...

I scripted it's Makefile.PL and make and was hoping you or someone might tell me what's going wrong ...

Thanks

H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

Thanks can be expressed in assigning points.

There is no better way to check than to build and install DBI and DBD::Oracle
I have full confidence in that the *perl* binary you just created is not causing that to fail

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

I'm afraid you don't have the include files installed

# find /opt/oracle/product/9.2.0.6.0 -name oci.h

If you cannot find it, you have to install the part that contains it (C development or something)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
MikeL_4
Super Advisor

Re: perl 5.8.7 with threading

Merijn, Thanks for your help aad patience, if I could give more points I would..

I ran through the entire setup on another server which had the files installed in the $ORACLE_HOME/rdbms/demo and everything installed without a problem, including the DBD-Oracle. So as soon as the DBA's give me a rdbms/demo directory with everything in it I install it on the problem server.

As a comment when you build new depots, the reason we couldn't over write our current production /opt/perl is that we are in the middle of an upgrade to a version 9 of Oracle. The production is running Version 8, so if I update /opt/perl with the ORACLE_HOME for Version 9 then the production application scripts will not work.

As a suggestion may I recommend that you build the depots to install in as an example: /opt/perl-5.8.7

Thanks Again..
H.Merijn Brand (procura
Honored Contributor

Re: perl 5.8.7 with threading

Thread closed, but I'll answer that anyway.

The solution to that problem is to NOT install DBD::Oracle in the default perl tree

I face the same problem, and since you can only install one single DBD::Oracle in the default tree, and I want to support multiple versions of Oracle on the same perl, I have a directory called 'perl' on $ORACLE_HOME (on *each* $ORACLE_HOME) and install your DBD::Oracle in there

When you then switch to the product, you set $PERL5LIB to find that first:

bev r3:/pro/po/bev/4gl 101 > echo $PERL5LIB
/pro/asql/o82C/lib/perl:/pro/po/bev/4gl/c19f000/vog
bev r3:/pro/po/bev/4gl 102 > perl -MV=DBI
DBI
/pro/lib/perl5/site_perl/5.8.5/PA-RISC2.0-LP64/DBI.pm: 1.48
bev r3:/pro/po/bev/4gl 103 > perl -MV=DBD::Oracle
DBD::Oracle
/pro/asql/o82C/lib/perl/5.8.5/DBD/Oracle.pm: 1.16
bev r3:/pro/po/bev/4gl 104 >

Another nice thing is that this works also for multiple versions of perl :)

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