Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

HP-UX 10.20 Module installation

by peschkaj (Pilgrim)
on Oct 10, 2002 at 18:44 UTC ( [id://204276]=perlquestion: print w/replies, xml ) Need Help??

peschkaj has asked for the wisdom of the Perl Monks concerning the following question:

I have an HP-UX box running HP-UX 10.20 (as well as a few 11.00 and 11.i/11.11 machines). I have received a fair number of installation errors across a variety of modules during make. Most recently, I attempted to install Term::ReadKey (version 2.21) and I got the following output/errors:

cp ReadKey.pm blib/lib/Term/ReadKey.pm AutoSplitting blib/lib/Term/ReadKey.pm (blib/lib/auto/Term/ReadKey) /opt/perl5/bin/perl -I/opt/perl5/lib/5.6.1 genchars.pl Writing termio/termios section of cchars.h... Done. Checking for sgtty... Sgtty found. Checking sgtty... Checking symbols Writing sgtty section of cchars.h... Done. /opt/perl5/bin/perl -I/opt/perl5/lib/5.6.1/PA-RISC1.1 -I/opt/p +erl5/lib/5.6.1 /opt/perl5/lib/5.6.1/ExtUtils/xsubpp -noprototypes -ty +pemap /opt/perl5/lib/5.6.1/ExtUtils/typemap ReadKey.xs > ReadKey.xsc +&& mv ReadKey.xsc ReadKey.c cc -c -Ae -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O +Onol +imit -DVERSION=\"2.21\" -DXS_VERSION=\"2.21\" +z -I/opt/perl5/lib +/5.6.1/PA-RISC1.1/CORE ReadKey.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 539: + error 1000: Unexpected symbol: "elements". (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 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 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 declaratio +n. (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: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 540: + error 1573: Type of "nbytes" is undefined due to an illegal declarat +ion. (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 543: + error 1705: Function prototypes are an ANSI feature. (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 1940 +: error 1000: Unexpected symbol: "SV". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/iperlsys.h", line +417: warning 5: "const" will become a keyword. (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/iperlsys.h", line +417: error 1000: Unexpected symbol: "const". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/regexp.h", line 13 +: error 1000: Unexpected symbol: "U8". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/sv.h", line 339: e +rror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/sv.h", line 340: e +rror 1000: Unexpected symbol: "ANY". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/sv.h", line 341: e +rror 1000: Unexpected symbol: "GV". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/cv.h", line 25: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/cv.h", line 26: er +ror 1000: Unexpected symbol: "ANY". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/cv.h", line 27: er +ror 1000: Unexpected symbol: "GV". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 14: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 14: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 15: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 15: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 16: er +ror 1000: Unexpected symbol: "U32". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 16: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 17: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 17: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 18: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 18: er +ror 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/mg.h", line 23: er +ror 1000: Unexpected symbol: "MAGIC". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/utf8.h", line 25: +warning 5: "const" will become a keyword. (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/utf8.h", line 25: +error 1000: Unexpected symbol: "unsigned". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 1976 +: error 1000: Unexpected symbol: "CURCUR". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 2187 +: error 1000: Unexpected symbol: "*". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 2188 +: error 1000: Unexpected symbol: "I32". (Bundled) cc: "/opt/perl5/lib/5.6.1/PA-RISC1.1/CORE/perl.h", line 2188 +: error 1000: Unexpected symbol: "SV". (Bundled) cc: error 2017: Cannot recover from earlier errors, terminat +ing. *** Error exit code 1 Stop

(My apologies for the size of the errors.) I downloaded the module sources through cpan using

get Term::ReadKey
. Root ran perl makefile.pl, make, and make install. Are there any command line configuration options that can be used to compile on HP-UX, or is this a problem to direct towards HP?

I tried using

If you make something idiot-proof, eventually someone will make a better idiot.
I am that better idiot.

Replies are listed 'Best First'.
Re: HP-UX 10.20 Module installation
by robartes (Priest) on Oct 10, 2002 at 18:54 UTC
    The problem is that you are using the standard cc included with HPUX. Unfortunately, that compiler is just about sufficient to relink the kernel, and that's it. No fancy tricks and certainly no ANSI C, which is what this module's C code is using. You need to use a compiler that understands ANSI C by doing setting the CC environment variable before doing anything.

    To get such a beast on HPUX, you could either use HP's Ansi compiler, which, if installed on your system, should reside in /opt/ansic or /opt/aC++. You could also install gcc on your system. You can get gcc at the HPUX software porting centre or through HP's website (search for gcc). If you will be using gcc on HPUX 11.x, be sure to get HP's version, as the unpatched open source version barfs on some of HP's include files. Also do not forget to install GNU binutils as well if you install gcc, you'll get interesting results otherwise.

    CU
    Robartes- Three years of HPUX administration and the bruises to prove it.

Re: HP-UX 10.20 Module installation
by MZSanford (Curate) on Oct 10, 2002 at 18:53 UTC
    Usually on HP, i have better luck with gcc ... actually... it seems that way on most OS's :). You may want to check your path and make sure that the cc in root's path is the one you expect, as that has bitten me a few times.
    from the frivolous to the serious
Re: HP-UX 10.20 Module installation
by sch (Pilgrim) on Oct 10, 2002 at 18:52 UTC

    I had some similar problems and seem to remember I ended up having to install gcc.

    The problem is (iirc) is that the C compiler supplied is not ANSI C, you need to purchase one from HP for that - or use gcc, and play with some of the command line options in the makefile

Re: HP-UX 10.20 Module installation
by davis (Vicar) on Oct 11, 2002 at 08:29 UTC
    robertes is correct

    To add to what the others have said, I might also suggest compiling Perl fresh from source (using gcc), as Perl takes the environment under which it was compiled as the template for compiling modules1 - i.e. Perl will expect to be able to use the system's C compiler. If you don't have the ANSI/C product, then this will fail miserably; it is also difficult to make gcc work for compiling modules in some cases.

    Of course, this would be unnecessary if HP actually decided to use gcc for the whole of their software archive - currently about 50 per cent is compiled with gcc, and the remainder using their ANSI/C product.

    HtH
    1 - This is pure supposition from personal experience. Don't take that as fact.
    davis
    Is this going out live?
    No, Homer, very few cartoons are broadcast live - it's a terrible strain on the animator's wrist

      as Perl takes the environment under which it was compiled as the template for compiling modules1
      1 - This is pure supposition from personal experience. Don't take that as fact.

      I'll try and check into this - but I'm fairly certain this is stated as fact in some of the installation docs, and indeed what I ended up doing

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://204276]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-26 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found