Operating System - HP-UX
1828658 Members
8193 Online
109983 Solutions
New Discussion

Need Perl with threads enabled and DBD Oracle module

 
wjhopkins
Occasional Advisor

Need Perl with threads enabled and DBD Oracle module

Hello all,
I have an Itanium 11.23 HP-UX server that the developers need Perl with DBI and DBD Oracle loaded. They also need it to be multi threaded. I am not a programmer/developer and am not Perl savvy. Just trying to find some Perl with all this built in that I can download and install as a depot. I've tried installing the DBD module from the Perl site and it fails the "make" piece.

I guess I don't know why this is so hard to do. Why isn't there a depot installation package for Perl with Oracle. Seems like a common combination of usage for Perl on an HP-UX server. Not something out of the ordinary.

I've read the man perlhpux and still not making sense to me.

Thanks
21 REPLIES 21
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>it fails the "make" piece.

Fails how?
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

Hello,
here's the output when I run the make. It's rather lengthy but didn't want to leave anything out.

ussata23:/opt/perl_stuff/DBD-Oracle-1.17 # make
cc -c -I/opt/oracle/product/9.2/rdbms/public -I/opt/oracle/product/9.2/rdbms/demo -I/opt/oracle/product/9.2/rdbms/demo -I/o
pt/oracle/product/9.2/rdbms/public -I/opt/oracle/product/9.2/plsql/public -I/opt/oracle/product/9.2/network/public -I/opt/perl_32/li
b/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi/auto/DBI -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarn
ings +DSitanium2 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Ofltacc=strict -DVERSION
=\"1.17\" -DXS_VERSION=\"1.17\" +Z "-I/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE" -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA
_OCI_VERSION=\"9.2.0.8\" Oracle.c
(Bundled) cc: warning 922: "-Ae" is unsupported in the bundled compiler, ignored.
(Bundled) cc: warning 922: "-fast" is unsupported in the bundled compiler, ignored.
(Bundled) cc: warning 922: "+Ofltacc=strict" is unsupported in the bundled compiler, ignored.
Warning 267: "/usr/include/sys/socket.h", line 535 # Inconsistent linkage in declarations of "long long sendfile(int,int,long
long,unsigned long long,const iovec *,int)"; previously was extern now is declared static.
static sbsize_t sendfile __((int, int, off_t, bsize_t, const struct iovec *, int
^^^^^^^^
Warning 267: "/usr/include/sys/socket.h", line 536 # Inconsistent linkage in declarations of "long long sendpath(int,char *,long
long,unsigned long long,const iovec *,int)"; previously was extern now is declared static.
static sbsize_t sendpath __((int, char *, off_t, bsize_t, const struct iovec *,
^^^^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perl.h", line 2700 # ',' expected before '__attribute__'.
void (*any_dxptr) (pTHX_ void*);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perl.h", line 2710 # ',' expected before '__attribute__'.
typedef I32 (*filter_t) (pTHX_ int, SV *, int);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 117 # ',' expected before '__attribute__'.
PERL_EXPORT_C void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 118 # ',' expected before '__attribute__'.
PERL_EXPORT_C PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name,
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 121 # ',' expected before '__attribute__'.
PERL_EXPORT_C PerlIO *PerlIO_push(pTHX_ PerlIO *f, PERLIO_FUNCS_DECL(*tab),
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 123 # ',' expected before '__attribute__'.
PERL_EXPORT_C void PerlIO_pop(pTHX_ PerlIO *f);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 124 # ',' expected before '__attribute__'.
PERL_EXPORT_C AV* PerlIO_get_layers(pTHX_ PerlIO *f);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 125 # ',' expected before '__attribute__'.
PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto,
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 220 # ',' expected before '__attribute__'.
PERL_EXPORT_C void PerlIO_init(pTHX);
^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 233 # ',' expected before '__attribute__'.
PERL_EXPORT_C PerlIO *PerlIO_openn(pTHX_ const char *layers, const char *mode,
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 351 # ',' expected before '__attribute__'.
PERL_EXPORT_C PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *, CLONE_PARAMS *, int);
^^^^^
Error 20: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 360 # ',' expected before '__attribute__'.
PERL_EXPORT_C int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode,
^^^^^
Error 699: "/opt/perl_32/lib/5.8.8/IA64.ARCHREV_0-thread-multi/CORE/perlio.h", line 360 # Error limit reached; halting
compilation.
PERL_EXPORT_C int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode,
^^^^^
*** Error exit code 2

Stop.
ussata23:/opt/perl_stuff/DBD-Oracle-1.17 #
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

Here's the perl -V info:
ssata23:/opt/perl_stuff/DBD-Oracle-1.17 # perl -V
ummary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=hpux, osvers=11.23, archname=IA64.ARCHREV_0-thread-multi-LP64
uname='hp-ux buzz b.11.23 u ia64 3101164512 unlimited-user license '
config_args='-Dmksymlinks -ders -Dcc=cc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -
use64bitall -Dsh=/usr/bin/sh -Dd_attribut=undef -Dd_attribute_warn_unused_result=undef -Dd_u32align=define -Aprepend:libswanted=cl
-Dvendorprefix=/opt/perl_64 -Doptimize=-fast +DSitanium2 +Ofltacc=strict -Accflags=+Z -Accflags=-DUSE_SITECUSTOMIZE -Duselargefiles
-Accflags=-DNO_HASH_SEED -Dprefix=/opt/perl_64 -Dinc_version_list=5.8.7/$archname 5.8.7 5.8.6/$archname 5.8.6 5.8.4/$archname 5.8.4
5.8.3/$archname 5.8.3 5.8.2/$archname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname 5.8.0 -Dsed=/usr/bin/sed -Duseshrplib -Dconfig_he
vy=Config_dynamic.pl'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags =' -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 +Z -DUSE_SITECUSTOMIZ
-DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ',
optimize='-fast +DSitanium2 +Ofltacc=strict',
cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD
4 +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/lib/hpux64'
libpth=/usr/lib/hpux64 /lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lcl -lnsl -lnm -ldl -ldld -lm -lsec -lpthread -lc
perllibs=-lcl -lnsl -lnm -ldl -ldld -lm -lsec -lpthread -lc
libc=/usr/lib/hpux64/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
cccdlflags='+Z', lddlflags='-b +vnocompatwarnings -L/usr/lib/hpux64'


haracteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API USE_SITECUSTOMIZE
Built under hpux
Compiled at Nov 28 2008 11:52:32
@INC:
/opt/perl_64/lib/5.8.8/IA64.ARCHREV_0-thread-multi-LP64
/opt/perl_64/lib/5.8.8
/opt/perl_64/lib/site_perl/5.8.8/IA64.ARCHREV_0-thread-multi-LP64
/opt/perl_64/lib/site_perl/5.8.8
/opt/perl_64/lib/site_perl
/opt/perl_64/lib/vendor_perl/5.8.8/IA64.ARCHREV_0-thread-multi-LP64
/opt/perl_64/lib/vendor_perl/5.8.8
/opt/perl_64/lib/vendor_perl
.
ssata23:/opt/perl_stuff/DBD-Oracle-1.17 #
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

Want to add that I also tried using the 32 bit version of Perl, same "make" errors.
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>here's the output when I run the make.

You can't use the bundled C compiler to build perl.
You might be able to use gcc to do it.
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

Dennis, not trying to compile Perl, trying to compile the DBD Oracle Module to install into Perl. As I said before, I did download the gcc Perl and was able to successfully compile and install the DBD Oracle module but the developers want the multi threaded Perl. The gcc compile Perl is not multithreaded. Hope this makes sense. I appreciate your taking time to help.
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>not trying to compile Perl, trying to compile the DBD Oracle Module

Sorry, you can't compile perl AND whatever you're trying to compile now.
Error 20: ".../perl.h", line 2700 # ',' expected before '__attribute__'.
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

I have the latest Perl already on the server. So not trying to compile Perl. Do you see an error that indicates that I'm trying to compile Perl?
Currently have the HP supplied 5.8.8.H Perl installed.

Is that what the error 20 is telling me? That it's trying to compile Perl? I followed the README.hpux.txt that came with the DBD source code tar ball. I did the
following:

downloaded this source code and put under /opt/perl_stuff/DBD-Oracle-1.17

cd DBD-Oracle-1.17
perl Makefile.PL -l
make "fails here"
make test
make install

Thanks again.
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>Is that what the error 20 is telling me?

It says the bundled C compiler doesn't support that syntax.
Also as I said: ... AND whatever you're trying to compile now.

Re: Need Perl with threads enabled and DBD Oracle module

No Dennis is trying to tell you that you can't compile _anything_ much with the bundled cc compiler... ther error 20 is just a symptom of this, you either need a copy of the proper ANSI C compiler for HP-UX:

http://www.hp.com/go/ansic

which will cost you... or you need to use gcc.

The built in (bundled) cc compiler is really just there to help compile and link certain kernel modules, it certainly can't compile a typical complex open source project like DBD Oracle...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

ok, I got it now. I missunderstood his reply. I do have the gcc compiler on the server. Now just need to figure out how to tell the "make" command to use that compiler instead of /bin/cc. I read somewhere that you need to use the same compiler as was used to compile the Perl itself. Is this not true?
James R. Ferguson
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

Hi:

> I read somewhere that you need to use the same compiler as was used to compile the Perl itself. Is this not true?

That's true.

Regards!

...JRF...
H.Merijn Brand (procura
Honored Contributor

Re: Need Perl with threads enabled and DBD Oracle module

First try to find out *WHY* your developers need a threaded perl. It is not needed for DBD::Oracle, and it only slows down unthreaded scripts.

DBD::Oracle-1.17 is rather old. Current is version 1.27.

Enjoy, Have FUN! H.Merijn [ who is *NOT* going to release threaded perl builds ]
Enjoy, Have FUN! H.Merijn
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>I read somewhere that you need to use the same compiler as was used to compile the Perl itself.

While this is true for aC++ vs g++, it's not true for C. Since you were compiling with cc, that's why I said you could use gcc.
James R. Ferguson
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

Hi (again(:

Regarding:

> I read somewhere that you need to use the same compiler as was used to compile the Perl itself. Is this not true?

Well, the compile-time options used to build Perl itself are stuffed in the 'Config' hash (which you can see with 'perl -V'). These options are reused when compiling a module that requires a C-compiler.

Hence, it is easiest to use the same compiler (HP's or gcc) to compile a module that requires C-compilation as was used to compile the Perl binary itself.

Regards!

...JRF...

Re: Need Perl with threads enabled and DBD Oracle module

Dennis,

> >I read somewhere that you need to use the same compiler as was used to compile the Perl itself.

> While this is true for aC++ vs g++, it's not true for C. Since you were compiling with cc, that's why I said you could use gcc.

Whilst it is possible, is it not true to say it is "easier" to use the same compiler?

(for a given definition of "easier" - I'm sure my definition is different from someone who works in the compiler lab! ;o) )

Duncan

I am an HPE Employee
Accept or Kudo
Dennis Handly
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

>Duncan: Whilst it is possible, is it not true to say it is "easier" to use the same compiler?

Except "easier" often falls prey to "$$". :-)

If not obvious, there is an Eval version of the aC++ compiler available:
http://www.hp.com/go/cpp
Order or update aC++
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

Hello everyone. Thanks for all the help and info. I will close this thread as my main objective was to be able to install the DBD Oracle module in the Perl that HP distributes. Since there is no clear cut directions on doing that, I'm not pursuing any it further. I don't have time to read all the Perl information that is everywhere. Just seems like this should be a no brainer and not such a pain in the butt to do.
Thanks again for the info.
James R. Ferguson
Acclaimed Contributor

Re: Need Perl with threads enabled and DBD Oracle module

Hi (again):

> Dennis: If not obvious, there is an Eval version of the aC++ compiler available:

Yes, but it would seem that advertising that fact, in order to circumvent those who purchase it to get the same job done, is hardly fair to the paying customer. Some things are better left unsaid.

Regards!

...JRF...
wjhopkins
Occasional Advisor

Re: Need Perl with threads enabled and DBD Oracle module

no solution, no way to do this with the current Perl that is installed. Not sure why HP doesn't have a Perl with the DBD Oracle module installed. It will just make the customer go to another vendor which will be more willing and accommodating. Big push now is Oracle on Linux and I can see why.
Misak
New Member

Re: Need Perl with threads enabled and DBD Oracle module

Hi All,

Can anyone please tell me advantages and disadvantages of thread-enabled Perl.

Thanks in advance.