Operating System - HP-UX
1827741 Members
3091 Online
109969 Solutions
New Discussion

Time::HiRes compilation error

 
SOLVED
Go to solution
Bosco Tsang
Valued Contributor

Time::HiRes compilation error

I've tried to compiled the perl module Time::HiRes on HPUX 11.11 but encounter problem, both using cc and gcc.

When I do the perl Makefile.PL, it reports,

Configuring Time::HiRes...
Have syscall(), looking for syscall.h... NOT found.
Looking for gettimeofday()... found.
Looking for setitimer()... NOT found.
Looking for getitimer()... NOT found.
You do not have interval timers.
Looking for ualarm()... NOT found.
Looking for usleep()... NOT found.
Let's see if you have select()... found.
We can make a Time::HiRes::usleep().
Looking for nanosleep()... testing... found.
You can mix subsecond sleeps with signals, if you want to.
(It's still not portable, though.)
Looking for clock_gettime()... NOT found.
Looking for clock_getres()... NOT found.
Writing Makefile for Time::HiRes
Now you may issue 'make'. Do not forget also 'make test'.

When I run make (using cc as default),

cc -c -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O +Onolimit -DVERSION=\"1.82\" -DXS_VERSION=\"1.82\" +z -I/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE -DTIME_HIRES_NANOSLEEP -DATLEASTFIVEOHOHFIVE HiRes.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +z option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 538: error 1000: Unexpected symbol: "nbytes".
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 538: error 1506: Parameters allowed in function definition only.
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 539: error 1000: Unexpected symbol: "elements".
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 539: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 539: error 1573: Type of "size" is undefined due to an illegal declaration.
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 540: error 1000: Unexpected symbol: "size_t".
(Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 540: error 1705: Function prototypes are an ANSI feature.
:::
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Then, when I try to run it under gcc, I got,

gcc -c -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O +Onolimit -DVERSION=\"1.82\" -DXS_VERSION=\"1.82\" +z -I/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE -DTIME_HIRES_NANOSLEEP -DATLEASTFIVEOHOHFIVE HiRes.c
gcc: +Onolimit: No such file or directory
gcc: +z: No such file or directory
:1:2: missing '(' after predicate
In file included from /opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h:713,
from HiRes.xs:16:
/usr/include/sys/socket.h:503: parse error before "__sendfile64"
/usr/include/sys/socket.h:503: parse error before "bsize_t"
/usr/include/sys/socket.h:504: parse error before "__sendpath64"
/usr/include/sys/socket.h:504: parse error before "bsize_t"
/usr/include/sys/socket.h:506: parse error before "sendfile"
/usr/include/sys/socket.h: In function `sendfile':
/usr/include/sys/socket.h:506: parse error before "bsize_t"
/usr/include/sys/socket.h: At top level:
/usr/include/sys/socket.h:507: parse error before "sendpath"
/usr/include/sys/socket.h: In function `sendpath':
/usr/include/sys/socket.h:507: parse error before "bsize_t"
*** Error exit code 1

Stop.

Anyone got an idea? and have the solution? Or, is there any HP compiled version of this perl Module available?

Bosco

1 REPLY 1
James R. Ferguson
Acclaimed Contributor
Solution

Re: Time::HiRes compilation error

Hi Bosco:

Perl's 'Time::HiRes' module is present in the 5.8x perl distributions:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL

Regards!

...JRF...