Whew! I was inspired to install Net::SSH::Perl to try and help troubleshoot another node recently, and it had to install Math::Pari as a prerequisite. Tons of problems! I think my first problem was that I'm on a Mac. HOWEVER, I've finally worked my way through a successful installation, and I think the INSTALL file included in the build directory of Math::Pari might help.... for me, it's located at ~/.cpanplus/5.8.6/build/Math-Pari-2.010703/INSTALL. Following the suggestions for "problem compilations" seemed to help me, with the final outcome:
Writing /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/Math/Pari/ +.packlist Appending installation info to //System/Library/Perl/5.8.6/darwin-thre +ad-multi-2level/perllocal.pod
Contents of said file included here for your convenience.
Without picking through your error messages with a fine toothed comb, I can't directly say if any of the hints here are directly applicable to your situation, but my issue was the __overflow and __hiremainder being redefined in a zillion places, along with removing the -fno-common gcc flag from libPARI/Makefile.
================================================================== The short install procedure is described in README. Here is the long +one: This module was working OK with 5.003 (some time ago, newer versions of this module might have broken this...). If you have Net::FTP module installed and working (type perl -MNet::FTP -le "print 'OK'" to check, and, say perl -MCPAN -e 'install Net::FTP' to install it if you do not have it), then Makefile.PL may fetch and configure GP/PARI for you, so you can skip steps a,b,c,e in the description below. [Sometimes Net::FTP requires setting PASSIVE_FTP environment variable.] With Net::FTP, building, testing, and testing is done in most cases wi +th perl Makefile.PL make make test make install ================================================================== Let me state the obvious: Math::Pari is a Perl module, so you need to have a "good enough" binary of Perl running on your machine. Compiling any Perl module involves a heavy usage of the Config module coming with Perl. If your Perl is copied from another machine with an incompatible configuration, expect problems. [Typical syndroms: glob failing; /usr/ucb/cc used instead of a real compiler, make trying to run `cl' you do not have etc.] ================================================================== GP/PARI detects the type of the assembler files needed for your processor; Math::Pari copies this logic, but may not contain the latest updates/improvements. If the detection-of-assembler is wrong, +put machine=assembler_type to the Makefile.PL line, as in perl Makefile.PL machine=hppa As the last resort, machine=none means using a portable-and-slow C cod +e. I would like to hear about wrong assembler-detection. ================================================================== The older versions of Math::Pari were using GP/PARI configuration scripts to generate the header file libPARI/paricfg.h needed for the compile of the library. The newer version generate this file themselves. If this new way fails, put the word Configure on the Makefile.PL command line to generate this file "the old way": perl Makefile.PL Configure A typical syndrom is a compile error related to undefined CLK_TCK. I would like to hear about these cases. In the worst cases you may need to manually copy paricfg.h from a subdirectory of GP/PARI build directory to libPARI/paricfg.h. [libPARI/paricfg.h is not recreated when rerunning Makefile.PL without the Configure options. If you need it to be recreated, rename this file before rerunning.] ================================================================== If the problems with Math::Pari being unable to build persist, there i +s another way to build it: use a pre-build version of the PARI library. + Put the link options on the Makefile.PL command line like this: perl Makefile.PL LIBPARI="-L/lib -lpari" This is a non-yet-supported way to build the library; try it only if a +nything else fails. Known problems: spoofed version; no graphing functions present; bad free() at t/Pari.t line 265 (calling installed Perl function from PARI) no PARI tests to convert; no POD to create; no check for ep codes; no patching the source; [All but the first 3 of the problems can be avoided if one lets Makefile.PL download and patch PARI, then builds the +library using the downloaded+patched version.] Possible problems: different sizeof(long); non-compatible threading model; -lpari build with different non-compatible compiler; ================================================================== Other recognized options: force_download Download PARI/GP even if a directory i +s found paridir=PATH_TO_DIST_DIR Use the directory with Pari distributi +on pari_tgz=PATH_TO_TAR_GZ To extract a local pari*.tar.gz and pa +tch (if needed) the resulting directory tree. ================================================================== Here is the manual procedure which is somewhat similar to what Makefile.PL does. a) Get the latest PARI distribution from ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/ b) uncompress the distribution; optionally run 'Configure' script sh ./Configure (Running 'Configure' is required only if you manually copy 'paric +fg.h'.) c) Math::Pari does not care whether you did `make' GP/PARI, but you +can do it nevertheless: make test in toplevel PARI directory; d) uncompress the Math::Pari archive into a separate directory (for best results make it a sibling of GP/PARI's root directory; kid or parent should do as well); e) _Optionally_ find the architecture of your processor (if it is no +t known/supported and recognized automatically, the slower 'port' c +ode without assembler should be used). Recognized "processors" are sun3 sparcv7 sparcv8micro sparcv8super alpha hppa i386 port the current version should autorecognize them in most situations; f) do (assuming your architecture is hppa) perl Makefile.PL or perl Makefile.PL machine=hppa You may also want to add Configure argument (see above). At this moment you may want to manually copy paricfg.h if all the rest fa +ils...) This step autogenerates many files, such as POD documentation of +GP/PARI and the module test suite, from the GP/PARI distribution. g) then make make test h) Now make install should make this extension available to the perl programs. x) Patches to some versions of GP/PARI may be needed (in `patches11', or 'patch12', etc. depending on the version of GP/PARI 2.0.*). This may be done automatically during auto-download of GP/PARI. x) We skip "compatibility" tests, and do not support "compatibility" m +ode (with very old versions of GP/PARI). x) dmake on Win32 is buggy. The symptom is a message about not being able to find the target 'all'. The workaround is to run `dmake -i'. One must watch for errors (with "Ignored" in the error message), since in this regime dmake won't stop on an error. ======================================================= Here are the typical failure modes of the tests: t/00_Pari.t:109 A bug in REx engine on Perl 5.6.0 (now skipped under 5.6.0) Segfault in t/nfields.t:21 Too short a stack for Perl process (very long REx is running to test whether this test succeeds). Try something like this +(csh) limit stacksize 8192 ======================================================= KNOWN PROBLEMS: Darwin and other systems where -fno-common gcc flag is used: *) Remove the flag from libPARI/Makefile macro CCFLAGS; *) rm libPARI/*.o *) make The symptom: _hiremainder _overflow are reported to be multiply +defined. Try applying the patch in patches/diff_2.1.6_no-common ======================================================= If you get problems with `overflow' and `hiremainder' symbols not defi +ned: there may be (at least) two reasons: a) Your Perl is not built on "this machine", so its %Config{} hash does not reflect the real configuration of this machine; b) Generation of kernel*.o files (or whatever the object file extens +ion is on your system) is wrong: either Math::Pari build process is out +of sync with the GP/PARI one, or Math::Pari::Build is just plain buggy. If you are completely sure that "a" is not applicable, you can do the following to help in fixing this problem: a) Build GP/PARI (it is not necessary to install it); redirect the o +utput of build process to a file. (You may need to set CC=cc_compiler_ +of_perl in environment since GP/PARI may prefer gcc otherwise.) b) Run `nm' on kernel*.o in libPARI and in the GP/PARI architecture- +specific directory (names of object files may differ slightly, as in digit +s appended). The intent of Math::Pari::Build is to have "the same reports" generated. At least `overflow' and `hiremainder' should appear with same number of underscores (0 or 1) prepended, and wi +th the same "class type" letter before them. c) If outputs of `nm' in "b" differ, you found a bug. Inspect the files with redirected output of build processes of Math::Pari, an +d find how kernel*.o files were built (including how the intermediate fi +les - such as kernel1.s - are built). Note the differences. If the information in "b" and "c" is enough for you to fix Math::Pari: +:Build, do so; please report your fix. Otherwise just report the discrepancie +s of "b" and "c". A lot of thanks!!!
Hope this is somewhat helpful :)
$/ = q#(\w)# ; sub sig { print scalar reverse join ' ', @_ } + sig map { s$\$/\$/$\$2\$1$g && $_ } split( ' ', ",erckha rlPe erthnoa stJu +" );
In reply to Re^3: Trouble installing Net::SFTP
by chargrill
in thread Trouble installing Net::SFTP
by shilpam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |