For what it's worth, I came across a similar problem the other day.
Basically, the (probably flaky) way that PP.pm guesses at the location
of typemap files seems to fail on OS X.
The line
my $_rootdir=$Config{installprivlib}."/ExtUtils/";
is *not* finding typemap in any of the subdirs.
I ended up hardcoding the location to the correct ExtUtils dir after
finding it eventually:
# try hardcoding for the moment
my $_rootdir="/System/Library/Perl/5.8.8/ExtUtils/";
There should be a better (fully platform independent) way using one of
the Config vars or using the value of @INC or some such, maybe
somebody skilled in the art can enlighten us.
Hope that helps,
Christian
On 5/09/2009, at 11:50 AM, Sisyphus wrote:
>
> ----- 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
--
Christian Soeller PhD Dept. of Physiology +64 9 3737599 x82770
University of Auckland Auckland, New Zealand fax +64 9 3737499
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl