Operating System - HP-UX
1748092 Members
5180 Online
108758 Solutions
New Discussion

Re: perl: Building Curses.pm fails

 
Mark Landin
Valued Contributor

perl: Building Curses.pm fails

I'm trying to get Curses.pm installed on my system, but the CPAN shell gets this error message when it tries to compile:

cc -c -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+
vnocompatwarnings +Z -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_F
ILE_OFFSET_BITS=64 -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0
-DVERSION=\"1.23\" -DXS_VERSION=\"1.23\" +Z "-I/opt/perl_32/lib/5.8.8/PA-RISC
1.1-thread-multi/CORE" Curses.c
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C pro
duct; ignored.
(Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C pro
duct; ignored.
(Bundled) cc: warning 422: Unknown option "f" ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANS
I C product; ignored.
(Bundled) cc: warning 480: The +Opromote_indirect_calls 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 pro
duct; ignored.
cpp: "/opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/CORE/perlio.h", line 121: e
rror 4065: Recursion in macro "PerlIO".
*** Error exit code 1


Details:

HP-UX 11iv1
Perl D.5.8.8.A
CPAN version 1.7602
Standard K&R HP C compiler

I have gcc 3.0 available, but am not sure how to get CPAN to use it.

Any help appreciated!
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: perl: Building Curses.pm fails

Hi:

Since your Perl was built with the HP ANSI C compiler you really need that to compile modules requiring compilation for installation.

You can purchase that compiler here:

http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9007AA

An alternative would be to fetch and install a binary 'gcc'-compiled Perl from Merijn's site:

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

Regards!

...JRF...
Mark Landin
Valued Contributor

Re: perl: Building Curses.pm fails

Ok. My best bet is the gcc-compiled Perl. So then I guess my next question is, how do I get CPAN to compile modules with the gcc compiler instead of the default HP compiler?
Matti_Kurkela
Honored Contributor

Re: perl: Building Curses.pm fails

A well-designed Perl module should honor standard environment variables.

The command

export CC=gcc

before "perl Makefile.pl" should be enough to indicate that you wish to use gcc rather than the default cc. (That's the standard way to indicate that you wish to use a non-default compiler.)

If that does not work, read the installation documentation for your module. There may be a compile-time option you can use, or a variable at the beginning of the Makefile.pl file you can edit to specify the correct compiler.

MK
MK
James R. Ferguson
Acclaimed Contributor

Re: perl: Building Curses.pm fails

Hi (again) MArk:

> how do I get CPAN to compile modules with the gcc compiler instead of the default HP compiler?

That's automatic. Perl knows which compiler and what options to use. In fact, you can see what it knows with:

# perl -V

Regards!

...JRF...
Mark Landin
Valued Contributor

Re: perl: Building Curses.pm fails

OK, some progress. I installed procura's gcc-compiled Perl 5.8.8 on my system. Now, when I try to compile and install Curses, I get:

gcc -c -mpa-risc-2-0 -DDEBUGGING -D_HPUX_SOURCE -DDEBUGGING -fno-stri
ct-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/pa20_32/include -D_
LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -DVERSION=\"1.23\" -DXS_VERSIO
N=\"1.23\" -fPIC "-I/opt/perl/lib/5.8.8/PA-RISC2.0/CORE" Curses.c
In file included from /opt/perl/lib/5.8.8/PA-RISC2.0/CORE/perl.h:997,
from Curses.c:46:
/usr/include/sys/socket.h:742: parse error before "__sendfile64"
/usr/include/sys/socket.h:742: parse error before "bsize_t"
/usr/include/sys/socket.h:743: parse error before "__sendpath64"
/usr/include/sys/socket.h:743: parse error before "bsize_t"
/usr/include/sys/socket.h:746: parse error before "sendfile"
/usr/include/sys/socket.h:746: parse error before "bsize_t"
/usr/include/sys/socket.h: In function `sendfile':
/usr/include/sys/socket.h:746: `a' undeclared (first use in this function)
/usr/include/sys/socket.h:746: (Each undeclared identifier is reported only once

/usr/include/sys/socket.h:746: for each function it appears in.)
/usr/include/sys/socket.h:746: `b' undeclared (first use in this function)
/usr/include/sys/socket.h:746: `c' undeclared (first use in this function)
/usr/include/sys/socket.h:746: `d' undeclared (first use in this function)
/usr/include/sys/socket.h:746: `e' undeclared (first use in this function)
/usr/include/sys/socket.h:746: `f' undeclared (first use in this function)
/usr/include/sys/socket.h: At top level:
/usr/include/sys/socket.h:747: parse error before "sendpath"
/usr/include/sys/socket.h:747: parse error before "bsize_t"
/usr/include/sys/socket.h: In function `sendpath':
/usr/include/sys/socket.h:747: `a' undeclared (first use in this function)
/usr/include/sys/socket.h:747: `b' undeclared (first use in this function)
/usr/include/sys/socket.h:747: `c' undeclared (first use in this function)
/usr/include/sys/socket.h:747: `d' undeclared (first use in this function)
/usr/include/sys/socket.h:747: `e' undeclared (first use in this function)
/usr/include/sys/socket.h:747: `f' undeclared (first use in this function)
In file included from /opt/perl/lib/5.8.8/PA-RISC2.0/CORE/perl.h:3951,
from Curses.c:46:
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h: At top level:
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:31: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:42: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:46: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:50: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:60: warning: `warn_unused_result' at
tribute directive ignored
In file included from /opt/perl/lib/5.8.8/PA-RISC2.0/CORE/perl.h:3951,
from Curses.c:46:
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:72: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:88: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:92: warning: `warn_unused_result' at
tribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:95: warning: `warn_unused_result' at
tribute directive ignored

(...deleting a few hundred more of these...)

/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:2089: warning: `warn_unused_result'
attribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:2291: warning: `warn_unused_result'
attribute directive ignored
/opt/perl/lib/5.8.8/PA-RISC2.0/CORE/proto.h:2294: warning: `warn_unused_result'
attribute directive ignored
In file included from Curses.c:390:
CursesFun.c: In function `XS_Curses_subpad':
CursesFun.c:2493: warning: initialization makes pointer from integer without a c
ast
CursesFun.c: In function `XS_Curses_slk_label':
CursesFun.c:2895: warning: initialization makes pointer from integer without a c
ast
CursesFun.c: In function `XS_Curses_termname':
CursesFun.c:3214: warning: initialization makes pointer from integer without a c
ast
CursesFun.c: In function `XS_Curses_unctrl':
CursesFun.c:3392: warning: initialization makes pointer from integer without a c
ast
CursesFun.c: In function `XS_Curses_putwin':
CursesFun.c:3483: warning: initialization from incompatible pointer type
CursesFun.c: In function `XS_Curses_getwin':
CursesFun.c:3502: warning: initialization from incompatible pointer type
CursesFun.c:3503: warning: initialization makes pointer from integer without a c
ast
CursesFun.c: In function `XS_Curses_derwin':
CursesFun.c:3655: warning: pointer/integer type mismatch in conditional expressi
on
CursesFun.c: In function `XS_Curses_dupwin':
CursesFun.c:3697: warning: pointer/integer type mismatch in conditional expressi
on
In file included from Curses.c:393:
CursesBoot.c: In function `boot_Curses':
CursesBoot.c:459: `A_INVIS' undeclared (first use in this function)
CursesBoot.c:459: `A_PROTECT' undeclared (first use in this function)
CursesBoot.c:459: `A_ALTCHARSET' undeclared (first use in this function)
CursesBoot.c:459: `A_COLOR' undeclared (first use in this function)
*** Error exit code 1

Stop.
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Failed during this command:
GIRAFFED/Curses-1.23.tgz : make NO


Holger Dietze
Occasional Advisor

Re: perl: Building Curses.pm fails

For me it worked after changing Makefile.PL line 116 from:

 

   116    'hpux'      => [ ''   => '-lcurses -ltermcap'        ],

 

to:

 

   116    'hpux'      => [ '-I/usr/local/include/ncurses'   => '-lcurses -ltermcap'        ],

 

after that change comilation worked