delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/03/06:54:47

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_82,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <23849366.post@talk.nabble.com>
Date: Wed, 3 Jun 2009 03:54:31 -0700 (PDT)
From: Marc Girod <marc DOT girod AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Trying to install CPAN Math::GMP. Can libgmp3 provide -libgmp?
In-Reply-To: <4A255EA4.1070502@cygwin.com>
MIME-Version: 1.0
References: <23830861 DOT post AT talk DOT nabble DOT com> <4A251615 DOT 5080408 AT gmail DOT com> <23833375 DOT post AT talk DOT nabble DOT com> <4A255EA4 DOT 1070502 AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com


Larry Hall (Cygwin) wrote:
> 
> Try another mirror.  It's listed on one or both of the mirrors below:
> 
> ftp://sourceware.mirrors.tds.net
> ftp://mirrors.kernel.org
> 
OK, Thanks! Got that from the latter.
However now that I compile the perl CPAN module: Math::GMP 2.05,
I get a lot of compilation errors:

gcc -c   -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe
-I/usr/local/include -DUSEIMPORTLIB -O3   -DVERSION=\"2.05\"
-DXS_VERSION=\"2.05\"  "-I/usr/lib/perl5/5.10/i686-cygwin/CORE"   GMP.c
GMP.c: In function `XS_Math__GMP_destroy':
GMP.c:161: warning: cast to pointer from integer of different size
...

The same for nearly all the functions, but here is the one mentioned above:

Math-GMP-2.05> perl -nle 'print "$.: $_" if 145..171' GMP.c
145: XS(XS_Math__GMP_destroy); /* prototype to pass -Wmissing-prototypes */
146: XS(XS_Math__GMP_destroy)
147: {
148: #ifdef dVAR
149:     dVAR; dXSARGS;
150: #else
151:     dXSARGS;
152: #endif
153:     if (items != 1)
154:        Perl_croak(aTHX_ "Usage: %s(%s)", "Math::GMP::destroy", "n");
155:     PERL_UNUSED_VAR(cv); /* -W */
156:     {
157: 	mpz_t *	n;
158: 
159:         if (sv_derived_from(ST(0), "Math::GMP")) {
160:             IV tmp = SvIV((SV*)SvRV(ST(0)));
161:             n = (mpz_t *) tmp;
162:         }
163:         else
164:             croak("n is not of type Math::GMP");
165: #line 90 "GMP.xs"
166:     mpz_clear(*n);
167:     free(n);
168: #line 169 "GMP.c"
169:     }
170:     XSRETURN_EMPTY;
171: }

mpz_t is typdedef'ed  in /usr/include/gmp.h
(I hope the __GNU_MP__ concerns us...):

typedef struct
{
  int _mp_alloc;		/* Number of *limbs* allocated and pointed
				   to by the _mp_d field.  */
  int _mp_size;			/* abs(_mp_size) is the number of limbs the
				   last field points to.  If _mp_size is
				   negative this is a negative number.  */
  mp_limb_t *_mp_d;		/* Pointer to the limbs.  */
} __mpz_struct;

#endif /* __GNU_MP__ */

typedef __mpz_struct MP_INT;    /* gmp 1 source compatibility */
typedef __mpz_struct mpz_t[1];


Where does IV come from is what I'll try to find next.

Marc
-- 
View this message in context: http://www.nabble.com/Trying-to-install-CPAN-Math%3A%3AGMP.-Can-libgmp3-provide--libgmp--tp23830861p23849366.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019