develooper Front page | perl.perl5.porters | Postings from January 2004

Re: build failure, and fix, for Math::Pari on Cygwin

From:
Ilya Zakharevich
Date:
January 15, 2004 16:48
Subject:
Re: build failure, and fix, for Math::Pari on Cygwin
Message ID:
20040116004743.GB3176@math.berkeley.edu
On Thu, Jan 15, 2004 at 04:21:36PM -0800, Eric Hanchrow wrote:
> This is Math::Pari version 2.0105000.  I'd tell you which "version" of
> Cygwin I'm using, but Cygwin doesn't have versions :)  So instead I'll just
> say that I've installed *all* of Cygwin, and it's current as of today.  (So,
> for example, gcc is at version 3.3.1)
> 
> Anyway: building Pari yields this error:
> 
> 	Pari.xs:2977: error: external linkage required for symbol 'subaddr'
> because of 'dllexport' attribute.
> 
> And my patch, which works for me, is simply

> --- d:/cygwin/usr/local/src/Math-Pari-2.010500/Pari.xs.orig	2003-04-23
> +++ d:/cygwin/usr/local/src/Math-Pari-2.010500/Pari.xs	2004-01-15
> @@ -1383,6 +1383,7 @@
>  #endif
>  
>  extern  void v_set_term_ftable(void *a);
> +XS((*subaddr));
>  
>  #define s_type_name(x) type_name(typ(x));
>  
> @@ -2973,7 +2974,6 @@
>  	 croak("Do not know how to work with Pari control structure `%s'",
>  	       olds);
>         } else if (func) {
> -	 XS((*subaddr));
>  	 char* file = __FILE__, *proto = NULL;
>  	 char subname[276]="Math::Pari::";
>  	 char buf[64], *s, *s1;

> I don't really understand the problem, nor even the solution, but hey, it
> passes all its tests!

The real question is why this 'dllexport' attribute is a part of XS()
macro.  There is no need to export XSUBs from a DLL...

I Cc this to p5p, maybe they know...

Thanks,
Ilya



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About