Operating System - HP-UX
1837007 Members
1973 Online
110111 Solutions
New Discussion

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

 
SOLVED
Go to solution
Eric Guerizec
Frequent Advisor

Perl 5.6.0 on HP-UX 11.23 Itanium

Hello

What is the minimum PERL version compatible with 11.23 Itanium ???

We want to test an application using PERL 5.6.0 + Sybperl 2.12 and actually running on PA-RISC. This application seems to be not fully compatible with Perl 5.8. So I need to know if I have a chance to compile successfully Perl 5.6.0 on Itanium.

Tanks.

eric
23 REPLIES 23
Joseph Loo
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

hi,

what is the pre-installed version of PERL in that system? Is it should be perl D.5.8.0.D?

if it is never pre-install with perl, u may like to download the binary from here:

http://hpux.connectisl.com/hppd/hpux/Languages/perl-5.8.6/

or

http://mirrors.develooper.com/hpux/#Perl

regards.
what you do not see does not mean you should not believe
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

perl-1 is doable. I just did:

[43] % uname -a
HP-UX spe191 B.11.23 U 9000/800 625848586 unlimited-user license
[44] % ./perl -v
$Header: perly.c,v 1.0.1.3 88/01/28 10:28:31 root Exp $
Patch level: 15
[45] %

So you'd have to be more clear about *why* you need to go back to 5.6, and what the problems in 5.8 are you are facing

[ I just wrote a much longer answer, but the itrc was unavailable when I hit submit, and the answer got lost. Basically I said: go for 5.8.7 and solve the problems you found ]

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi guys

You must know I'm a newbie in Perl. I just try to give a running package for our users on Itanium IA64 plateform.

Joseph,
yes the pre-installed version of PERL is 5.8.0.D.

With this version, if I try to compile Sybperl 2.12, "perl Makefile.PL" stops with this error :

Writing Makefile for Sybase::Sybperl
Can't use string ("pod/sybperl.pod") as a HASH ref while "strict refs" in use at /opt/perl/lib/5.8.0/ExtUtils/MM_Unix.pm line 541.

Now if I try to compile the lastest Sybperl version 2.18, "perl Makefile.PL" is OK. To run "make", I installed gcc 3.4.3 from "the Porting And Archive Centre" because as Perl was compiled with gcc, sybperl must be compiled with gcc too. In this configuration, "make" stops with this error :

In file included from /opt/perl/lib/5.8.0/IA64.ARCHREV_0-thread-multi/CORE/perl.h:3950,
from CTlib.xs:20:
/usr/include/sys/ipc.h:51: error: parse error before "cid_t"
/usr/include/sys/ipc.h:56: error: parse error before '}' token
In file included from /opt/perl/lib/5.8.0/IA64.ARCHREV_0-thread-multi/CORE/perl.h:3951,
from CTlib.xs:20:
/usr/include/sys/sem.h:91: error: field `sem_perm' has incomplete type
*** Error exit code 1

I found this thread speaking about the same problem:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=877710

May be another solution to resolve this problem with gcc is to compile gcc.4.0...

I copied /usr/include/sys/ipc.h from an 11iv1 PA-RISC system and the compilation finished with success.

But now if I try to start the application, I have several messages like this :
Can't use string ("509") as a HASH ref while "strict refs" in use at /home/pblink/PROD/scriptImpSwift/InitTabRefImp.pm line 339.

We also have ANSI C on our hpux 11.23 itanium system. I tried to compile Perl.5.6.0 with cc:
sh Configure -Dcc=cc -Dprefix=/opt/perl
but this version seems not to be "aware" ;) that it's running on IA64 architecture.
I'm facing a problem with the libraries. "Configure" is recognizing PA-RISC libs and not IA libs even if I specify the libs dir and force .so extension instead of .sl.

Eric
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

If you choose to go for your own build perl, which is a good choice to make when you have ANSI cc, please take 5.6.2

We have gone through a lot of trouble to make things work out of the box.

5.8.7 should build painless, and I'm curious what the offending code looks like

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi procura

You're right. Perl 5.6.2 works better in configure step.

sh Configure -Dcc=cc -Dprefix=/opt/perl -Duse64bitint -Duse64bitall

but now I have an error with make :

`sh cflags libperl.a miniperlmain.o` miniperlmain.c
CCCMD = cc -DPERL_CORE -c -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +DD64 -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +O2 +Onolimit
Error 172: "iperlsys.h", line 418 # Undeclared variable '__printf__'.
__attribute__((__format__ (__printf__, 3, 4)));
^^^^^^^^^^
*** Error exit code 2

Stop.

Any idea ?

eric
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

OK, this might sound as a stupid suggestion, but I know what I ask.

Could you download the source of 5.8.7

# cd perl-5.6.2
# mv Configure Configure.org
# mv config_h.SH config_h.SH.org
# mv hints/hpux.sh hints/hpux.sh.org
# cp ../perl-5.8.7/Configure .
# cp ../perl-5.8.7/config_h.SH config_h.SH
# cp ../perl-5.8.7/hints/hpux.sh

and see if that helps?
The errors you are seeing have to do with more strict ansi-ness of the compiler, and we did some work on that in detecting it automatically.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

No , no, it's not stupid ;)

# cd perl-5.6.2
# mv config.sh config.sh.old
# mv Policy.sh Policy.sh.old

# mv Configure Configure.org
# mv config_h.SH config_h.SH.org
# mv hints/hpux.sh hints/hpux.sh.org
# cp ../perl-5.8.7/Configure .
# cp ../perl-5.8.7/config_h.SH .
# cp ../perl-5.8.7/hints/hpux.sh hints/.

Configure is ok.

But make....

cc +DD64 -L/usr/local/lib -L/usr/lib/hpux64 -o miniperl \
miniperlmain.o opmini.o libperl.a -lnsl -lnm -ldl -ldld -lm -lsec -lc
./miniperl -w -Ilib -MExporter -e '' || make minitest
./miniperl configpm configpm.tmp
Use of uninitialized value in string eq at configpm line 476.
configpm: configpm.tmp not valid at configpm line 476.
*** Error exit code 255

Stop.

eric
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Though I *know* you want 5.6, I see that you are configuring to make a 64bit perl.

Are you *realy* *realy* sure that you want 5.6? Realy?
There are a lot of know 64bit bugs in 5.6 that wont's be fixed. Never.

Could you show me the failing code with the error message? Maybe I can either solve it, work around it or otherwise talk you into using 5.8.7 or convincing that help in solving the problem might be a better choice than going for 5.6

If you still want to go for 5.6.2, I might be able to build one for you on the spe191 (HP testdrive system), but I need to know the prefix you want to use

Enjoy, Have FUN! H.Merijn [ perl5 porter ]
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi Procura,

I used 64bit configure options to avoid some warnings like this :

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
^^^^^^^^

But of course, I don't need to have a 64bit perl.

Without 64bit options, I have the same error:

cc -L/usr/lib/hpux32 -o miniperl \
miniperlmain.o opmini.o libperl.a -lnsl -lnm -ldl -ldld -lm -lsec -lc
./miniperl -w -Ilib -MExporter -e '' || make minitest
./miniperl configpm configpm.tmp
Use of uninitialized value in string eq at configpm line 476.
configpm: configpm.tmp not valid at configpm line 476.
*** Error exit code 255

Find below the failing code of configpm :

# Now do some simple tests on the Config.pm file we have created
unshift(@INC,'lib');
require $config_pm;
import Config;

[line 476 starts here ->]die "$0: $config_pm not valid"
unless $Config{'CONFIGDOTSH'} eq 'true';

die "$0: error processing $config_pm"
if defined($Config{'an impossible name'})
or $Config{'CONFIGDOTSH'} ne 'true' # test cache
;

die "$0: error processing $config_pm"
if eval '$Config{"cc"} = 1'
or eval 'delete $Config{"cc"}'
;



==========================
Procura,
I would like to thank you for your help. :)

We have a program which nobody knows how it works because the developper left the company !!!
This program works well with Perl 5.6.0
But as I already said, the code doesn't work with 5.8.0 or later: some processes don't start, the error is :
Can't use string ("509") as a HASH ref while "strict refs" in use at .pm line 339.

I think there are some major differences between Perl 5.6 and 5.8 that could explain why we have this error.
But I don't know how to resolve this error, I don't know programming in Perl except making tiny code like "hello world"

This is why I try to have Perl 5.6 on hpux 11.23 (itanium), we have a chance That the code will work...

regards.
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Post lines 320-360 from that script please.
I think you're using soft references.

And if you *do* want me to try to build you 5.6.2 on 11.23, I need the installation prefix

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Find the perl program as attached file. I removed the comments and some IF conditions.
Procura, I don't want you spend all your time to help me ;) But if it's a pleasure for you, yes why not try to build Perl 5.6.2 on 11.23 Itanium. I suppose it's a great challenge for you, isn't it ? ;)) I use "/opt/perl" for installation prefix.

Regards

H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

my ($NatureSwift)=($FileCfg=~m/(.*)\..*/);

^ Here $NatureSwift is set to "509"

$TABLETYPE{$NatureSwift}=1;

# LINE 339 STARTS HERE

^ Position "a"

$$NatureSwift{"CleSequenceRef"}=[@CleSequence];

^ Here that is used as the *name* for a hash
"509" is not a *word* that is valid as an identifier, which should start with _ or an alphabetical

@CleSequence="";
$$NatureSwift{"CodeSwiftSequenceRef"}=[@CodeSwiftSequence];
:
:
$$NatureSwift{"PreTraitementCmd"}=ConstantesSwiftImp::returnPreTraitementCmd(
);

Change that code to:

my ($NatureSwift)=($FileCfg=~m/(.*)\..*/);
$TABLETYPE{$NatureSwift}=1;

# LINE 339 STARTS HERE

my %ns;
$ns{"CleSequenceRef"}=[@CleSequence];
@CleSequence="";
$ns{"CodeSwiftSequenceRef"}=[@CodeSwiftSequence];
@CodeSwiftSequence="";
$ns{"NbCarSequence"}=[@NbCarSequence];
@NbCarSequence="";
$ns{"OptionsTranscoSequenceRef"}=[@OptionsTranscoSequence];
@OptionsTranscoSequence="";
$ns{"Paterne_Id"}=ConstantesSwiftImp::RegExId();
$ns{"Table_account"} = ConstantesSwiftImp::returnAccountTable();
$ns{"Autorisation_verif_account"} = ConstantesSwiftImp::returnAutorisationAccount();
$ns{"Autorisation_Import_Swift"} = ConstantesSwiftImp::returnAutorisationIndi();
$ns{"Autorisation_Import_Swift2"} = ConstantesSwiftImp::returnAutorisationIndi2();
$ns{"RegExIndincateurImp"} = ConstantesSwiftImp::returnRegExIndincateurImp2();
$ns{"Paterne_Ncompte"}= ConstantesSwiftImp::RegExNCompte();
$ns{"Paterne_NcompteBis"}= ConstantesSwiftImp::RegExNCompteBis();
$ns{"Paterne_CodeBranche"}=ConstantesSwiftImp::RegExcodeBranche();
$ns{"Paterne_CodeBrancheOutput"}=ConstantesSwiftImp::RegExcodeBrancheOutput();

$ns{"Paterne_DeviCode"}=ConstantesSwiftImp::RegExcodeDevise();
$ns{"LibName"}=ConstantesSwiftImp::LibName();
$ns{"PostTraitementCmd"}=ConstantesSwiftImp::returnPostTraitementCmd();
$ns{"PreTraitementCmd"}=ConstantesSwiftImp::returnPreTraitementCmd();

{ no strict "refs";
%{$NatureSwift} = %ns;
}

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi Procura

It's better.
With your modification, more process can start now.
But we have another same eror:

Can't use string ("CRP564AN") as a HASH ref while "strict refs" in use at module.pm line 463.

sub renvoyerRegExBranche {
my $TypeMessage = shift (@_);
[line 463 here] return $$TypeMessage{Paterne_CodeBranche};
}

I don't know if I have to make the same modification here ?

Regards.
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

sub renvoyerRegExBranche {
my $TypeMessage = shift;
local *t = *{$::{$TypeMessage}};
*{$::t}{HASH} or return undef;
return *{$::t}{HASH}->{Paterne_CodeBranche};
}

Enjoy, Have FUN! H.Merijn [ who would shoot the coder of these scripts ]
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

It's a nightmare :(

Can't use string ("") as a symbol ref while "strict refs" in use at /home/pblink/PROD/scriptImpSwift/InitTabRefImp.pm line 463.

line 463 is :
local *t = *{$::{$TypeMessage}};
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Yes, a nightmare it is.

sub renvoyerRegExBranche {
my $TypeMessage = shift or return undef;
local *t = *{$::{$TypeMessage}};
*{$::t}{HASH} or return undef;
return *{$::t}{HASH}->{Paterne_CodeBranche};
}
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

sorry buy I still have the same problem on line:
local *t = *{$::{$TypeMessage}};

If I print the value of $TypeMessage before this line, I have the string :
CRP564AN

Eric
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Is it one single script?
Is it copyrighted?
If not, mail it to me, I will return you a copy that does not use symbolic references.

merijn at procura dot nl

Enjoy, Have FUN! H.Merijn [ who got dragged in the perl5 porting vortex by symbolic references ]
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi Procura,
I sent you a mail ;)

eric
H.Merijn Brand (procura
Honored Contributor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Modified file sent back. With - i hope - enough explanation.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

yes, 4 more points for your explanation!
you are a guru!

I have some work to apply your change on others modules.

but what is the solution for this :

my @listeDesTables;
...
undef %{$listeDesTables[$i]};

Tnanks!
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

my @listeDesTables;
...
undef %{$TM{$listeDesTables[$i]}};

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Eric Guerizec
Frequent Advisor

Re: Perl 5.6.0 on HP-UX 11.23 Itanium

Hi
Procura, 8 points more for your help!
Now the program is running. Thank you.

eric