Sisyphus wrote:

----- Original Message ----- From: "Greg Ederer" <[EMAIL PROTECTED]>
.
.
@INC:
  /MODAPSint/lib
  /usr/local/lib/perl
  /usr/local/lib/perl
  /usr/local/lib/perl
  /usr/local/lib/perl
  /usr/local/lib/perl
  /usr/local/lib/perl

That's a rather unusual @INC.
Somewhere within your perl installation (not exactly sure where it will be on your particular build) you should find an ExtUtils/typemap. On my linux box, the file is in /usr/local/lib/perl5/5.8.4/ExtUtils/typemap.

That file should contain an entry for "double".

Normally, in the process of building PDL, that typemap would be found by default. If, for some reason, that's not happening (or the typemap doesn't contain an entry for "double"), then I guess you could end up with the error message you're seeing.

Have you built many other perl extensions (modules) on that build of perl ? Any troubles with them ?

Does the following Inline::C script work for you ? (It should, if you have Inline::C installed):

------------------------------------
use warnings;
use strict;

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

use Inline C => <<'EOC';

double foo(SV * x) {
      return (double)SvNV(x);
}

EOC

my $x = 1.25;

print foo($x);
------------------------------------

If that does run ok for you, then you can ignore pretty much everything I've written. (ie the typemap I referred to is being found and is in good shape.)

Cheers,
Rob

I do see the typemap, with "double" defined:

[EMAIL PROTECTED]:~ % grep double /usr/local/lib/perl/ExtUtils/typemap
double                  T_DOUBLE
       $var = (double)SvNV($arg)
       sv_setnv($arg, (double)$var);
       sv_setnv($arg, (double)$var);

It looks like Inline is NOT installed: does it need to be?

[EMAIL PROTECTED]:~ % ./scr.pl
Can't locate Inline.pm in @INC (@INC contains: /MODAPSint/lib /usr/local/lib/perl /usr/local/lib/perl /usr/local/lib/perl /usr/local/lib/perl /usr/local/lib/perl /usr/local/lib/perl .) at ./scr.pl line 7.
BEGIN failed--compilation aborted at ./scr.pl line 7.


Also, I wonder if this has something to do wtih how I am trying to install things. We have a perl distribution installed in /usr/local/lib/perl, with PDL installed there as well, but with WITH_BADVAL turned off. So I am trying to build a new version of PDL with WITH_BADVAL turned on, and a few extra goodies to experiment with, but installed in my home directory (since I do not have permission to install to /usr...). Perhaps the build is getting mixed up as to where to find things. I invoked the build with
 perl Makefile.PL --prefix=/home/gederer/usr

but perhaps I need to edit Makefile.PL and mess with some environment vars, since I do not have perl installed in my home directory?

Thanks,
--greg



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

Reply via email to