----- Original Message ----- 
From: "Benjamin Schuster-Boeckler" <[email protected]>
To: <[email protected]>
Sent: Friday, September 04, 2009 10:17 PM
Subject: [Perldl] PDL compilation error on OS X 10.6


> The new Snow Leopard system comes with perl 8.10.0 (from 5.8.6
> previously), hence I wanted to recompile PDL. I'm getting the following:
>
> ---------------------------------------------
> /usr/bin/perl -I/Users/schuster/Downloads/PDL-2.4.4_08/blib/lib -I/
> Users/schuster/Downloads/PDL-2.4.4_08/blib/arch "-MPDL::PP qw/PDL::Bad
> PDL::Bad Bad/" bad.pd
> The type =double= does not have a typemap entry!
> make[2]: *** [Bad.pm] Error 2
> make[1]: *** [subdirs] Error 2
> make: *** [subdirs] Error 2
> ---------------------------------------------
>
> A google suggests to check whether Inline::C works fine, and it does.
> Does anyone have a clue what's going on here? PDL is the only module
> that I'm having problems with...
>

It sems to be suggesting that there's no typemap entry for 'double' - which 
is a bit hard to believe.
Take a look in your /ExtUtils/typemap (same folder as Makemaker.pm) and 
check that there is an entry for "double" in that file. Mine has:

.....
double   T_DOUBLE
.....
INPUT
.....
T_DOUBLE
 $var = (double)SvNV($arg)
.....
OUTPUT
.....
T_DOUBLE
 sv_setnv($arg, (double)$var);

For an Inline::C check to see that there's no problems with passing and 
returning doubles try:

###########################
use warnings;

use Inline C => Config =>
    BUILD_NOISY => 1;

use Inline C => <<'EOC';

double foo(double x) {
       return (double)x  * 2;
}

EOC

print foo(17.3);
###########################

Cheers,
Rob 


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to