Trying to install CPAN Math::GMP. Can libgmp3 provide -libgmp?
Marc Girod
marc.girod@gmail.com
Wed Jun 3 10:54:00 GMT 2009
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/
More information about the Cygwin
mailing list