Skip Menu |

This queue is for tickets about the Math-Cephes CPAN distribution.

Report information
The Basics
Id: 25842
Status: resolved
Priority: 0/
Queue: Math-Cephes

People
Owner: Nobody in particular
Requestors: dsteinbrunner [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.43
Fixed in: (no value)



Subject: Intel Mac Support
I have been using Math::Cephes on a PPC Mac and x86 Linux box to date but recently tried to work with it on an Intel Mac and ran into issues. I found that I could get everything up and running with some modification to the Makefile.PL. I made my changes so that building for both architectures will work properly and attached a patch of the changes. I'm using POSIX::uname to get the machine type. It would seem this method would/should be used with other UNIX platforms, for instance Solaris on x86 and Linux on PPC but I am not able to test those here.
Subject: Intel-Mac-Makefile.patch
--- Makefile.PL 2007-03-26 23:43:50.000000000 -0400 +++ Makefile_new.PL 2007-03-26 23:42:24.000000000 -0400 @@ -72,9 +72,15 @@ $defs{UNK} = 1; } elsif ($is_dar) { + require POSIX; + my $machine = (POSIX::uname())[4]; + if ($machine eq 'i386') { + $defs{IBMPC} = 1; + } else { $defs{WORDS_BIGENDIAN} = 1; $defs{FLOAT_WORDS_BIGENDIAN} = 1; $defs{MIEEE} = 1; + } } elsif ($is_vms) { $defs{DEC} = 1;
From: dsteinbrunner [...] pobox.com
On Mon Mar 26 23:54:58 2007, dsteinbrunner@pobox.com wrote: Show quoted text
> I have been using Math::Cephes on a PPC Mac and x86 Linux box to date > but recently tried to > work with it on an Intel Mac and ran into issues. I found that I > could get everything up and > running with some modification to the Makefile.PL. I made my changes > so that building for > both architectures will work properly and attached a patch of the > changes.
Changes have been made in the latest version of this module that allows Intel Macs to work which is great. The problem now is that PPC does not work. The current Makefile.PL has this block which is commented out: #elsif ($is_dar) { # $defs{WORDS_BIGENDIAN} = 1; # $defs{FLOAT_WORDS_BIGENDIAN} = 1; # $defs{MIEEE} = 1; #} uncommenting this out allows PPC to work properly.
On Wed Jun 18 20:25:41 2008, dsteinbrunner@pobox.com wrote: Show quoted text
> Changes have been made in the latest version of this module that > allows Intel Macs to work > which is great. The problem now is that PPC does not work. > > The current Makefile.PL has this block which is commented out: > > #elsif ($is_dar) { > # $defs{WORDS_BIGENDIAN} = 1; > # $defs{FLOAT_WORDS_BIGENDIAN} = 1; > # $defs{MIEEE} = 1; > #} > > uncommenting this out allows PPC to work properly.
Thanks very much for this - could you let me know if the attached patch works?
--- C:\DOCUME~1\Randy\LOCALS~1\Temp\Makefile.PL-rev336.svn001.tmp.PL Thu Jan 1 11:41:37 2009 +++ C:\svn\Math-Cephes\Makefile.PL Thu Jan 1 11:37:08 2009 @@ -71,11 +71,18 @@ $defs{FLOAT_WORDS_BIGENDIAN} = 1; $defs{UNK} = 1; } -#elsif ($is_dar) { -# $defs{WORDS_BIGENDIAN} = 1; -# $defs{FLOAT_WORDS_BIGENDIAN} = 1; -# $defs{MIEEE} = 1; -#} +elsif ($is_dar) { + require POSIX; + my $machine = (POSIX::uname())[4]; + if ($machine eq 'i386') { + $defs{IBMPC} = 1; + } + else { + $defs{WORDS_BIGENDIAN} = 1; + $defs{FLOAT_WORDS_BIGENDIAN} = 1; + $defs{MIEEE} = 1; + } +} elsif ($is_vms) { $defs{DEC} = 1; }
From: dsteinbrunner [...] pobox.com
On Thu Jan 01 12:44:38 2009, RKOBES wrote: Show quoted text
> On Wed Jun 18 20:25:41 2008, dsteinbrunner@pobox.com wrote:
> > Changes have been made in the latest version of this module that > > allows Intel Macs to work > > which is great. The problem now is that PPC does not work. > > > > The current Makefile.PL has this block which is commented out: > > > > #elsif ($is_dar) { > > # $defs{WORDS_BIGENDIAN} = 1; > > # $defs{FLOAT_WORDS_BIGENDIAN} = 1; > > # $defs{MIEEE} = 1; > > #} > > > > uncommenting this out allows PPC to work properly.
> > Thanks very much for this - could you let me know if the attached patch > works?
I used the CPAN cli tool and it pulled version 0.46 which appears to have the patch applied. It worked on both Intel and PPC machines I have.
That's right that version 0.46 has the patch applied - thanks very much for testing this.