Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: lgodio2 [...] gmail.com
Cc:
AdminCc:

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



Subject: use Math::Cephes qw(:cmplx); my $z = new_cmplx (2,3) ; Generates error "undefined subroutine new_cmplx"
Date: Sun, 4 Nov 2012 14:34:53 -0500
To: bug-Math-Cephes [...] rt.cpan.org
From: Lou godio <lgodio2 [...] gmail.com>
I don't really maintain the module, but I can apply patches or pass on maintainership if you like.
Hi all, On Sun Nov 04 23:19:42 2012, BDFOY wrote: Show quoted text
> I don't really maintain the module, but I can apply patches or pass on > maintainership if you like.
I have adopted Math::Cephes, and I will look into this problem shortly. In the meanwhile, test scripts and/or patches will be welcome. Moreover: can you please more details about your system: operating system, its version, distribution, its version, perl version and how it was built, etc. I will try to reproduce the problem locally. Regards, -- Shlomi Fish
Subject: Re: [rt.cpan.org #80624] use Math::Cephes qw(:cmplx); my $z = new_cmplx (2,3) ; Generates error "undefined subroutine new_cmplx"
Date: Mon, 5 Nov 2012 13:11:39 -0500
To: bug-Math-Cephes [...] rt.cpan.org
From: Lou godio <lgodio2 [...] gmail.com>
Hi: Here my OS : Windows XP Service Pack #3, running Strawberry Perl 5.16 On Mon, Nov 5, 2012 at 6:26 AM, Shlomi Fish via RT < bug-Math-Cephes@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80624 > > > Hi all, > > On Sun Nov 04 23:19:42 2012, BDFOY wrote:
> > I don't really maintain the module, but I can apply patches or pass on > > maintainership if you like.
> > I have adopted Math::Cephes, and I will look into this problem shortly. > In the meanwhile, test scripts and/or patches will be welcome. Moreover: > can you please more details about your system: operating system, its > version, distribution, its version, perl version and how it was built, > etc. I will try to reproduce the problem locally. > > Regards, > > -- Shlomi Fish >
Hi, sorry for the late response. On Mon Nov 05 13:12:02 2012, lgodio2@gmail.com wrote: Show quoted text
> Hi: > Here my OS : Windows XP Service Pack #3, running Strawberry Perl 5.16 >
I can reproduce the same problem on my Linux system (Mageia Linux x86-64 Cauldron). It seems to be a problem with the exports. Fixing it may require reubilding the SWIG bindings, but I cannot find documentation on how to do that. I'll try to investigate further. Regards, -- Shlomi Fish
Subject: Re: [rt.cpan.org #80624] use Math::Cephes qw(:cmplx); my $z = new_cmplx (2,3) ; Generates error "undefined subroutine new_cmplx"
Date: Fri, 9 Nov 2012 21:17:43 -0500
To: bug-Math-Cephes [...] rt.cpan.org
From: Lou godio <lgodio2 [...] gmail.com>
Shlomi, SWIG generated perl bindings to C++ are quite unreliable. perl can run C++ code directly via perl module Inline::Cpp. ..OR If you want to save yourself some debug time, make the C++ code available to perl users so they can create their own bindings. Cephes is too great a library to get hung-up with SWIG On Fri, Nov 9, 2012 at 6:41 PM, Shlomi Fish via RT < bug-Math-Cephes@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80624 > > > Hi, > > sorry for the late response. > > On Mon Nov 05 13:12:02 2012, lgodio2@gmail.com wrote:
> > Hi: > > Here my OS : Windows XP Service Pack #3, running Strawberry Perl 5.16 > >
> > I can reproduce the same problem on my Linux system (Mageia Linux x86-64 > Cauldron). It seems to be a problem with the exports. Fixing it may > require reubilding the SWIG bindings, but I cannot find documentation on > how to do that. I'll try to investigate further. > > Regards, > > -- Shlomi Fish > >
Hi lgodio2, On Fri Nov 09 21:17:53 2012, lgodio2@gmail.com wrote: Show quoted text
> Shlomi, > > SWIG generated perl bindings to C++ are quite unreliable.
The code in question is written in C - not in C++. Show quoted text
> perl can run C++ > code directly via perl module Inline::Cpp.
For C, I'll use Inline::C. Show quoted text
> ..OR If you want to save yourself some debug time, make the C++ code > available to perl users so they can create their own bindings. >
The C code is available here and inside the CPAN module. http://www.netlib.org/cephes/ Show quoted text
> Cephes is too great a library to get hung-up with SWIG >
Well, I'll see if I can get SWIG to behave first.
Hi, this bug was fixed in 0.53 which was just uploaded to CPAN. See t/new_cmplx.t . Regards, -- Shlomi Fish On Sat Nov 10 04:41:45 2012, SHLOMIF wrote: Show quoted text
> Hi lgodio2, > > On Fri Nov 09 21:17:53 2012, lgodio2@gmail.com wrote:
> > Shlomi, > > > > SWIG generated perl bindings to C++ are quite unreliable.
> > The code in question is written in C - not in C++. >
> > perl can run C++ > > code directly via perl module Inline::Cpp.
> > For C, I'll use Inline::C. >
> > ..OR If you want to save yourself some debug time, make the C++ code > > available to perl users so they can create their own bindings. > >
> > The C code is available here and inside the CPAN module. > > http://www.netlib.org/cephes/ >
> > Cephes is too great a library to get hung-up with SWIG > >
> > Well, I'll see if I can get SWIG to behave first.
Subject: Re: [rt.cpan.org #80624] Resolved: use Math::Cephes qw(:cmplx); my $z = new_cmplx (2,3) ; Generates error "undefined subroutine new_cmplx"
Date: Sat, 10 Nov 2012 18:27:22 -0500
To: bug-Math-Cephes [...] rt.cpan.org
From: Lou godio <lgodio2 [...] gmail.com>
Shlomi, It still doesn't work... When I try to run : use Math::Cephes qw(:cmplx); my $a = new_cmplx(3, 5); my $b = new_cmplx(2, 3); my $c = new_cmplx(); cdiv( $a, $b, $c ); print $c->{r}, ' ', $c->{i}; *I get this error message...* Can't locate object method "FETCH" via package "Math::Cephes::Complex" at C:\Perl\holdx.pl On Sat, Nov 10, 2012 at 5:30 AM, Shlomi Fish via RT < bug-Math-Cephes@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=80624 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >
On Sat Nov 10 18:27:32 2012, lgodio2@gmail.com wrote: Show quoted text
> Shlomi, > > It still doesn't work... When I try to run : > > use Math::Cephes qw(:cmplx); > my $a = new_cmplx(3, 5); my $b = new_cmplx(2, 3); my $c = new_cmplx(); > cdiv( $a, $b, $c ); > print $c->{r}, ' ', $c->{i}; > > *I get this error message...* > > Can't locate object method "FETCH" via package "Math::Cephes::Complex" at > C:\Perl\holdx.pl
Hi, this works: [QUOTE] #!/usr/bin/perl use strict; use warnings; use Math::Cephes qw(:cmplx); use Math::Cephes::Complex; my $x = new_cmplx(3, 5); my $y = new_cmplx(2, 3); my $z = new_cmplx(); cdiv( $x, $y, $z ); print $z->{r}, ' ', $z->{i}, "\n"; [/QUOTE] With the use Math::Cephes::Complex. But you are right that it should work without the explicit "use Math::Cephes::Complex;" statement. Regarding the use of lexical $a and $b, see: http://perl-begin.org/tutorials/bad-elements/#vars-a-and-b Anyway, I'll get to fixing it. Regards, -- Shlomi Fish
The second issue was fixed in Math-Cephes-0.5301 which was just uploaded to CPAN. Thanks for the report. Regards, -- Shlomi Fish