This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Getting use of Net::SSH::Perl on win32- the Math::Pari build chalenge.


Hi all.

I got to write some little explanation on how use Net::SSH::Perl modules on
win32 (cygwin). I'm not a C guru so these explanations are destinated to
people like me that don't want to spend days to make a simple thing works.
First) to help future use of this modules and
second) to help other people that want to build the Math::Pari modules which
is require for that.

Some stranges things does not allow the command
'perl -MCPAN -e "install Net::SSH::Perl"' to build all the modules
dependencies. So the best way is to install manually the requires modules
that make some difficulties.

To install Math::GMP you need the libgmp, so obtain it from
<http://www.swox.com/gmp/> it may compile "out of the box"
check that the required libraries are in place after make install.
after that the 'perl -MCPAN -e "install Math::GMP"' is ok.

To install Math::Pari

- Download
fron CPAN and get Math-Pari-2.001804
or from the autor ftp-site
ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl/modules/
and get Math-Pari-2.010005.tar.gz which is newer.
and expand it
'tar xzf Math-Pari*tar.gz'
'cd Math-Pari*tar.gz'

DO NOT RUN 'perl Makefile.PL' at this time.
that will automatiquely get pari-2.1.1 sources and expand it But it gona
execute some other scripts to configure your system and may not does the
desired things.

so you'd better get:
ftp://www.gn-50uma.de/gn/gn-50uma.de/pari-2.1/pari-2.1.1.tar.gz
expand it
'tar xzf pari-2.1.1.tar.gz'
then
'cp pari-2.1.1/Odos/paricfg.h libPARI'
so you got a "working" paricfg.h

so far... so good.
now edit the Makefile.PL and remove all the "-lgnuplot" around, cause the
build does not require gnuplot and I've lost so long time to find on the net
a F....g libgnuplot that fit !

then type 'perl Makefile.PL' to generate the 2 Makefiles. for Pari and
libPari.

then change to libPARI
I don't know why but this part of the libPARI/Makefile.PL does not produce
the expected output.
-----
@cfiles = <$main_paridir/src/*/*.c>;
@cfiles = grep !/\/(plot|ix86|version|mpin|dummy|gp_rl|gp\.)/, @cfiles;
map s/^\Q$main_paridir/\$(PARI_DIR)/, @cfiles;
%cfiles = map {m,/([^/.]*)\.c$,i; ($1,$_)} @cfiles;
-----
it may generate a list of all the desired '.c' files of the source tree but
it miss "src/gp/gp.c"... is that a mistyped script or a bug in the cygwin
perl interpreter ?
Anyway at this time edit the generated Makefile and add the missing gp.c
reference in four place

first here in the OBJECT section

OBJECT =  alglin2$(OBJ_EXT) ... gp_init$(OBJ_EXT) gp$(OBJ_EXT)
buch2$(OBJ_EXT)                                   ^^^^^^^^^^^^

then here

C_FILES = $(PARI_DIR)/src/basemath/alglin1.c \
    $(PARI_DIR)/src/basemath/alglin2.c \
...
    $(PARI_DIR)/src/gp/gp_init.c \
    $(PARI_DIR)/src/gp/gp.c \     <<<<< add this line
    $(PARI_DIR)/src/gp/highlvl.c \

then here

O_FILES = $(PARI_DIR)/src/basemath/alglin1.o \
    $(PARI_DIR)/src/basemath/alglin2.o \
...
    $(PARI_DIR)/src/gp/gp_init.o \
    $(PARI_DIR)/src/gp/gp.o \     <<<<< add this line
    $(PARI_DIR)/src/gp/highlvl.o \

and here

gp_init$(OBJ_EXT): $(PARI_DIR)/src/gp/gp_init.c pariinl.h paricfg.h
    $(CCCMD) $(CCCDLFLAGS) $(DEFINE) -o $@ $(PARI_DIR)/src/gp/gp_init.c
>>>>> add the next two lines
gp$(OBJ_EXT): $(PARI_DIR)/src/gp/gp.c pariinl.h paricfg.h
    $(CCCMD) $(CCCDLFLAGS) $(DEFINE) -o $@ $(PARI_DIR)/src/gp/gp.c


after that
make; make test; make install

then
'perl -MCPAN -e "install Net::SSH::Perl"' will just install automaticly

good luck to all.

--
DominiX

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]