perl: Building Curses.pm fails (351 Views)
Reply
Valued Contributor
Mark Landin
Posts: 273
Registered: ‎11-13-1996
Message 1 of 7 (351 Views)

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!
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 7 (351 Views)

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...
Please use plain text.
Valued Contributor
Mark Landin
Posts: 273
Registered: ‎11-13-1996
Message 3 of 7 (351 Views)

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?
Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,242
Registered: ‎12-02-2001
Message 4 of 7 (351 Views)

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
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 5 of 7 (351 Views)

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...
Please use plain text.
Valued Contributor
Mark Landin
Posts: 273
Registered: ‎11-13-1996
Message 6 of 7 (351 Views)

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


Please use plain text.
Occasional Advisor
Holger Dietze
Posts: 7
Registered: ‎05-20-2003
Message 7 of 7 (341 Views)

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

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation