Operating System - Linux
1754014 Members
7378 Online
108811 Solutions
New Discussion юеВ

Re: Compiling Perl on HP-UX 11.31

 
PatRoy
Regular Advisor

Compiling Perl on HP-UX 11.31

Hi. I'm having a heck of a hard time to get Perl to compile on HP-UX 11.31.

Ether it be with Perl 5.8.8 or Perl 5.10.0, with either GCC 4.2.1 from HP's DSPP site or GCC 4.2.3 from the 3rd party HP-UX porting centre (http://hpux.ee.ualberta.ca/), I keep ending up with the same problem: seems like it's the Time::HiRes module that doesn't want to compile.

See: http://pastebin.ca/964784

Does anyone have any clue has to what's going on?? Some libs missing or something?

Thanks a lot. Pat.
6 REPLIES 6
Tim Nelson
Honored Contributor

Re: Compiling Perl on HP-UX 11.31

PatRoy
Regular Advisor

Re: Compiling Perl on HP-UX 11.31

Well, for one thing, I don't like the fact the it installs under /opt/perl_32 and /opt/perl_64. We'll sometimes have multiple versions of perl installs, thus the reason I like to have it like /opt/perl-5.8.8.

Secondly, I've just always had a hell of a hard time compiling some additional modules (like DBD/DBI, OpenSP, etc.) when I wasn't the one who compile perl initially. Often modules seems to depend on the way perl was compile. Sometimes, with missing flags, other times, with the wrong compiler (module might expect gcc but it was compiled with ANSI/C). This DID happen to me a while back when I had done it on 11.11.

H.Merijn Brand (procura
Honored Contributor

Re: Compiling Perl on HP-UX 11.31

I have contacted the author of Time::HiRes.
I hope to be able to come back on this very soon.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
PatRoy
Regular Advisor

Re: Compiling Perl on HP-UX 11.31

Thank you :)
PatRoy
Regular Advisor

Re: Compiling Perl on HP-UX 11.31

Seems like I found the solution...

Had to vi perl-5.10.0/ext/Time/HiRes/HiRes.xs and go to line 74 and comment out the following 3 defines:

/* HP-UX has CLOCK_XXX values but as enums, not as defines.
* The only way to detect these would be to test compile for each. */
# ifdef __hpux
# define CLOCK_REALTIME CLOCK_REALTIME
# define CLOCK_VIRTUAL CLOCK_VIRTUAL
# define CLOCK_PROFILE CLOCK_PROFILE
# endif /* # ifdef __hpux */

Seems it wanted to redefine the constant or something while it wasn't supposed to, cause I'm guessing like it says, HP-UX already has them, but has enums. I ain't no C programmer here, so I can't really explain! Trial and error! ;)

Thanks all!
Pat
H.Merijn Brand (procura
Honored Contributor

Re: Compiling Perl on HP-UX 11.31

ftp://download.xs4all.nl/pub/mirror/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.9713.tar.gz

is the new version, and it tested out without problems on HP-UX 11.31 Itanium

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