Operating System - Linux
1752307 Members
5234 Online
108786 Solutions
New Discussion юеВ

Re: Perl Net::SFTP Math::Pari et al

 
Dave Crouse
Occasional Advisor

Perl Net::SFTP Math::Pari et al

So a customer wants us to change from the easy one-line ssh command we use to drop off their file to some SFTP kluge lookin' thing.
I have been quite succesfull using Net::FTP in perl in the past and hope to be again with Net::SFTP. However, I can't get the silly Modules to compile. This seems to be a problem for lots of folks. I think the issue is with the cc flags in the Config.pm file. I have tried both cc and gcc with various changes in the flags from various contributors to no avail. Is there a precompiled Module library for perl out there on the 'net somewhere where I can get the modules? Or, does someone know the magic behind the ccflags to get these to compile? Has anyone gotten one of these (Math::Pari, Crypt::DES::EDE3, Crypt::DH, Crypt::IDEA, Crypt::DSA, Crypt::RSA, Digest::SHA1, Convert::PEM, Math::Random) to compile? How'd ya do it?
3 REPLIES 3
Dave Crouse
Occasional Advisor

Re: Perl Net::SFTP Math::Pari et al

Oh, some basics would be nice...
perl 5.8.3
HP-UX 11.11 v1 PA-RISC
Dave Crouse
Occasional Advisor

Re: Perl Net::SFTP Math::Pari et al

Here is the result of make:
Setting up Math::Pari with Perl 5.008003 on hpux version 11.00;
cc=cc, gccversion=, ccflags=' -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_H
PUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFF
SET_BITS=64 ',
ld=/usr/bin/ld, ldflags='', optimize='-fast +Onolimit +Opromote_indirect_call
s +DAportable +DS2.0'.
Found GP/PARI build directory in pari-2.1.7
(integer-formatted version 2001007).
...Generating libPARI/paricfg.h ...
Scanning header files...
...getrusage
Creating libPARI/paricfg.h...
...Processor of family `9000/889
' detected
Checking if your kit is complete...
Looks good
...Via command-line: processor family `hppa'
...I will use portable assembler-less build
...Assembler is GNU assembler
Writing Makefile for Math::PARI::libPARI
Writing Makefile for Math::Pari
# make
cp libPARI.dumb.pod blib/lib/Math/libPARI.dumb.pod
cp PariInit.pm blib/lib/Math/PariInit.pm
cp Pari.pm blib/lib/Math/Pari.pm
cp libPARI.pod blib/lib/Math/libPARI.pod
cd libPARI && make LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFI
X="" OPTIMIZE="-fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0" PAST
HRU_DEFINE="" PASTHRU_INC=""
/usr/bin/perl -pe1 ../pari-2.1.7/src/kernel/none/level0.h ../pari-2.1.7/
src/kernel/none/level1.h > pariinl.h
cc -c -I../pari-2.1.7/src/headers -I../pari-2.1.7/src/graph -I. -D_POS
IX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_
HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Onolimit +Opromote_i
ndirect_calls +DAportable +DS2.0 -DVERSION=\"\" -DXS_VERSION=\"\" +Z -Derr=p
ari_err -DDYNAMIC_PLOTTING -o es.o ../pari-2.1.7/src/language/es.c
(Bundled) cc: warning 480: The -A 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.
(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: warning 5: "const"
will become a keyword.
(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: error 1000: Unexpe
cted symbol: "void".
(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: warning 5: "const"
will become a keyword.
(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: error 1000: Unexpe
cted symbol: "void".
(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: error 1506: Parame
ters allowed in function definition only.
(Bundled) cc: "../pari-2.1.7/src/headers/paristio.h", line 37: error 1705: Funct
ion prototypes are an ANSI feature.
(Bundled) cc: "../pari-2.1.7/src/headers/paristio.h", line 38: error 1705: Funct
ion prototypes are an ANSI feature.
(Bundled) cc: "../pari-2.1.7/src/headers/paristio.h", line 39: error 1705: Funct
ion prototypes are an ANSI feature.
(Bundled) cc: "../pari-2.1.7/src/headers/paristio.h", line 40: error 1705: Funct
ion prototypes are an ANSI feature.
(Bundled) cc: "../pari-2.1.7/src/headers/paricom.h", line 56: warning 5: "const"
will become a keyword.
(Bundled) cc: "../pari-2.1.7/src/headers/paricom.h", line 56: error 1000: Unexpe
cted symbol: "long".
(Bundled) cc: "../pari-2.1.7/src/headers/paridecl.h", line 23: error 1000: Unexp
ected symbol: "x".
(Bundled) cc: "../pari-2.1.7/src/headers/paridecl.h", line 23: error 1506: Param
eters allowed in function definition only.
(Bundled) cc: "../pari-2.1.7/src/headers/paridecl.h", line 24: error 1000: Unexp
ected symbol: "_vec".
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1
H.Merijn Brand (procura
Honored Contributor

Re: Perl Net::SFTP Math::Pari et al

You "perl" is probably built with HP C-ANSI-C, and you don't have it:

cc -c -I../pari-2.1.7/src/headers -I../pari-2.1.7/src/graph -I. -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fast +Onolimit +Opromote_indirect_calls +DAportable +DS2.0 -DVERSION=\"\" -DXS_VERSION=\"\" +Z -Derr=pari_err -DDYNAMIC_PLOTTING -o es.o ../pari-2.1.7/src/language/es.c(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.(Bundled) cc: warning 422: Unknown option "f" ignored.(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.(Bundled) cc: warning 480: The +Opromote_indirect_calls option is available onlywith 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: "../pari-2.1.7/src/headers/parigen.h", line 19: warning 5: "const"will become a keyword.(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: error 1000: Unexpected symbol: "void".(Bundled) cc: "../pari-2.1.7/src/headers/parigen.h", line 19: warning 5: "const"will become a keyword.

All these errors are from options passed to the C compiler that are not recognized by either the bundled (braindead) HP C compiler or GNU gcc.

Two options:

1. Buy HP C-ANSI-C and install that. Thing would suddenly work
2. Replace your perl with a version that was build with GNU gcc, and install the compiler it was built with. You will then see that other options are passed.

Recent versions fro perl and gcc that meet option 2 can be found on my site.

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

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