Subject: | An AIX patch for Math-Pari and other OS ... |

Hi Everyone,
As you may know, Math-Pari doesn’t build for AIX today. It hits a fatal
error when “perl Makefile.PL” is run. But there is a simple patch
available to fix this problem.
I ran into this known bug in pari-2.3.2 years ago when it first came out
and they never used my reported patch for AIX, so it was never
incorporated into Math-Pari. So because of this it only took me a
couple of days to find and figure out a similar solution for Math-Pari.
(Please remember you don’t need to build pari yourself, you just need
the source code so that Math-Pari can compile what it needs.)
The bug is in utils/Math/PariBuild.pm from code it copied over from the
pari build and can be found in: pari-2.3.x/config/Makefile.SH
The issue is that evaluating “../functions/*/*” in the shell for some
systems like AIX is that it returns too many files and causes the system
call to merge_822 to fail, causing “perl Makefile.PL” to fail as well.
My patch has one bug I didn’t encode for, that’s if one of the
sub-directories under functions is empty. But that doesn’t happen in
the 2.3.x tree (I didn’t try the 2.1.x tree or the incompatible 2.5.x
tree to see if they had any empty directories.)
So my patch is:
…/Math-Pari-2.01080605/utils/Math> diff PariBuild.pm PariBuild.pm.orig
1332,1338c1332,1334
< unlink ($t);
< warn "Running My Customization:: `$^X merge_822 ../functions/*/* >
$t'...\n";
< foreach (glob ("../functions/*")) {
< next unless (-d $_);
< my $d = basename ($_);
< system "$^X merge_822 ../functions/$d/* >> $t"
< and die "Can't run `$^X merge_822 ../functions/$d/* >> $t'";
< }
---
Show quoted text

> #warn "Running `$^X merge_822 ../functions/*/* > $t'...\n";
> system "$^X merge_822 ../functions/*/* > $t"
> and die "Can't run `$^X merge_822 ../functions/*/* > $t'";

…./Math-Pari-2.01080605/utils/Math>
Hopefully this patch makes it into the next release of Math-Pari. But
until then I hope this patch makes building this module easier for others.
Enjoy!
Curtis