./configure --enable-cxx still a disaster on Solaris

Dennis Clarke dclarke at blastwave.org
Sun Mar 22 09:54:32 CET 2009


While I am sure there are patches, and I have looked at them[2], there is
no easy way for GMP to build cleanly within the production Solaris world
with Studio 11 or Studio 12.

I have gone over this at length, carefully, and the endless stream of code
errors, syntax errors and just plain mess that one needs to deal with
makes it unreasonable to trust the result one *may* eventually get with
the simple addition of --enable-cxx on the configure line. I do have a
Sparc v8 result ( lib/sparcv8/libgmpxx.so.4.0.4 ) but gave up on the i386
architecture entirely.

Until there is a release of gmp that does build cleanly and pass tests in
the Solaris world with C++ there is no reason to release a Solaris package
for GMP.  At least not one with libgmpxx.so in it.  Not sure what else to
report here, perhaps there will be a gmp 4.2.5 which will build cleanly
and pass all tests on Solaris.

-- 
Dennis Clarke
sig du jour : "An appeaser is one who feeds a crocodile, hoping it will
eat him last.", Winston Churchill

references :

[1] http://forums.sun.com/thread.jspa?messageID=10619266#10619266
[2] http://gmplib.org/list-archives/gmp-bugs/2009-February/001276.html

The endless stream of hacks/patches needed to get anything to work,
largely due to work by Marc Glisse :

---- gmp-4.2.4/cxx/ismpz.cc
41,43d40
< # ifndef TWO_ARGUMENT_USE_FACET
<       const ctype<char>& ct = use_facet(i.getloc(), (ctype<char>*)0);
< # else
45d41
< # endif

---- gmp-4.2.4/cxx/ismpf.cc
23a24
>
52,54d52
< # ifndef TWO_ARGUMENT_USE_FACET
<   char point_char = use_facet(loc, (numpunct<char>*)0).decimal_point();
< # else
56d53
< # endif
68,70d64
< # ifndef TWO_ARGUMENT_USE_FACET
<       const ctype<char>& ct = use_facet(loc, (ctype<char>*)0);
< # else
72d65
< # endif

---- gmp-4.2.4/gmpxx.h
1350a1351
>

---- gmp-4.2.4/gmp-impl.h
120d119
< using namespace std;

---- gmp-4.2.4/gmp-h.in
51d50
< #define GMP_CSTD std::
54d52
< #define GMP_CSTD
518a517
>
520a520
> using std::FILE;
524,526c524,526
< __GMP_DECLSPEC void mp_set_memory_functions __GMP_PROTO ((void *(*)
(GMP_CSTD
size_t),
<                                      void *(*) (void *, GMP_CSTD size_t,
GMP_C
STD size_t),
<                                      void (*) (void *, GMP_CSTD
size_t))) __GM
P_NOTHROW;
---
> __GMP_DECLSPEC void mp_set_memory_functions __GMP_PROTO ((void *(*)
(size_t),
>                                     void *(*) (void *, size_t, size_t),
>                                     void (*) (void *, size_t)))
__GMP_NOTHROW;
529,531c529,531
< __GMP_DECLSPEC void mp_get_memory_functions __GMP_PROTO ((void *(**)
(GMP_CSTD
 size_t),
<                                       void *(**) (void *, GMP_CSTD
size_t, GMP
_CSTD size_t),
<                                       void (**) (void *, GMP_CSTD
size_t))) __
GMP_NOTHROW;
---
> __GMP_DECLSPEC void mp_get_memory_functions __GMP_PROTO ((void *(**)
(size_t),
>                                       void *(**) (void *, size_t, size_t),
>                                       void (**) (void *, size_t)))
__GMP_NOTHR
OW;
589c589
< __GMP_DECLSPEC int gmp_fprintf __GMP_PROTO ((GMP_CSTD FILE *,
__gmp_const char
 *, ...));
---
> __GMP_DECLSPEC int gmp_fprintf __GMP_PROTO ((FILE *, __gmp_const char *,
...))
;
599c599
< __GMP_DECLSPEC int gmp_obstack_vprintf __GMP_PROTO ((struct obstack *,
__gmp_c
onst char *, GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_obstack_vprintf __GMP_PROTO ((struct obstack *,
__gmp_c
onst char *, va_list));
606c606
< __GMP_DECLSPEC int gmp_snprintf __GMP_PROTO ((char *, GMP_CSTD size_t,
__gmp_c
onst char *, ...));
---
> __GMP_DECLSPEC int gmp_snprintf __GMP_PROTO ((char *, size_t,
__gmp_const char
 *, ...));
613c613
< __GMP_DECLSPEC int gmp_vasprintf __GMP_PROTO ((char **, __gmp_const char
*, GM
P_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vasprintf __GMP_PROTO ((char **, __gmp_const char
*, va
_list));
618c618
< __GMP_DECLSPEC int gmp_vfprintf __GMP_PROTO ((GMP_CSTD FILE *,
__gmp_const cha
r *, GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vfprintf __GMP_PROTO ((FILE *, __gmp_const char
*, va_l
ist));
623c623
< __GMP_DECLSPEC int gmp_vprintf __GMP_PROTO ((__gmp_const char *,
GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vprintf __GMP_PROTO ((__gmp_const char *, va_list));
628c628
< __GMP_DECLSPEC int gmp_vsnprintf __GMP_PROTO ((char *, GMP_CSTD size_t,
__gmp_
const char *, GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vsnprintf __GMP_PROTO ((char *, size_t,
__gmp_const cha
r *, va_list));
633c633
< __GMP_DECLSPEC int gmp_vsprintf __GMP_PROTO ((char *, __gmp_const char
*, GMP_
CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vsprintf __GMP_PROTO ((char *, __gmp_const char
*, va_l
ist));
641c641
< __GMP_DECLSPEC int gmp_fscanf __GMP_PROTO ((GMP_CSTD FILE *, __gmp_const
char
*, ...));
---
> __GMP_DECLSPEC int gmp_fscanf __GMP_PROTO ((FILE *, __gmp_const char *,
...));
652c652
< __GMP_DECLSPEC int gmp_vfscanf __GMP_PROTO ((GMP_CSTD FILE *,
__gmp_const char
 *, GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vfscanf __GMP_PROTO ((FILE *, __gmp_const char *,
va_li
st));
657c657
< __GMP_DECLSPEC int gmp_vscanf __GMP_PROTO ((__gmp_const char *, GMP_CSTD
va_li
st));
---
> __GMP_DECLSPEC int gmp_vscanf __GMP_PROTO ((__gmp_const char *, va_list));
662c662
< __GMP_DECLSPEC int gmp_vsscanf __GMP_PROTO ((__gmp_const char *,
__gmp_const c
har *, GMP_CSTD va_list));
---
> __GMP_DECLSPEC int gmp_vsscanf __GMP_PROTO ((__gmp_const char *,
__gmp_const c
har *, va_list));
789c789
< __GMP_DECLSPEC void *mpz_export __GMP_PROTO ((void *, GMP_CSTD size_t *,
int,
GMP_CSTD size_t, int, GMP_CSTD size_t, mpz_srcptr));
---
> __GMP_DECLSPEC void *mpz_export __GMP_PROTO ((void *, size_t *, int,
size_t, i
nt, size_t, mpz_srcptr));
886c886
< __GMP_DECLSPEC void mpz_import __GMP_PROTO ((mpz_ptr, GMP_CSTD size_t,
int, GM
P_CSTD size_t, int, GMP_CSTD size_t, __gmp_const void *));
---
> __GMP_DECLSPEC void mpz_import __GMP_PROTO ((mpz_ptr, size_t, int,
size_t, int
, size_t, __gmp_const void *));
911c911
< __GMP_DECLSPEC GMP_CSTD size_t mpz_inp_raw __GMP_PROTO ((mpz_ptr,
GMP_CSTD FIL
E *));
---
> __GMP_DECLSPEC size_t mpz_inp_raw __GMP_PROTO ((mpz_ptr, FILE *));
916c916
< __GMP_DECLSPEC GMP_CSTD size_t mpz_inp_str __GMP_PROTO ((mpz_ptr,
GMP_CSTD FIL
E *, int));
---
> __GMP_DECLSPEC size_t mpz_inp_str __GMP_PROTO ((mpz_ptr, FILE *, int));
986c986
< __GMP_DECLSPEC GMP_CSTD size_t mpz_out_raw __GMP_PROTO ((GMP_CSTD FILE
*, mpz_
srcptr));
---
> __GMP_DECLSPEC size_t mpz_out_raw __GMP_PROTO ((FILE *, mpz_srcptr));
991c991
< __GMP_DECLSPEC GMP_CSTD size_t mpz_out_str __GMP_PROTO ((GMP_CSTD FILE
*, int,
 mpz_srcptr));
---
> __GMP_DECLSPEC size_t mpz_out_str __GMP_PROTO ((FILE *, int, mpz_srcptr));
1074c1074
< __GMP_DECLSPEC GMP_CSTD size_t mpz_size __GMP_PROTO ((mpz_srcptr))
__GMP_NOTHR
OW __GMP_ATTRIBUTE_PURE;
---
> __GMP_DECLSPEC size_t mpz_size __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW
__GMP_
ATTRIBUTE_PURE;
1078c1078
< __GMP_DECLSPEC GMP_CSTD size_t mpz_sizeinbase __GMP_PROTO ((mpz_srcptr,
int))
__GMP_NOTHROW __GMP_ATTRIBUTE_PURE;
---
> __GMP_DECLSPEC size_t mpz_sizeinbase __GMP_PROTO ((mpz_srcptr, int))
__GMP_NOT
HROW __GMP_ATTRIBUTE_PURE;
1199c1199
< __GMP_DECLSPEC GMP_CSTD size_t mpq_inp_str __GMP_PROTO ((mpq_ptr,
GMP_CSTD FIL
E *, int));
---
> __GMP_DECLSPEC size_t mpq_inp_str __GMP_PROTO ((mpq_ptr, FILE *, int));
1218c1218
< __GMP_DECLSPEC GMP_CSTD size_t mpq_out_str __GMP_PROTO ((GMP_CSTD FILE
*, int,
 mpq_srcptr));
---
> __GMP_DECLSPEC size_t mpq_out_str __GMP_PROTO ((FILE *, int, mpq_srcptr));
1335c1335
< __GMP_DECLSPEC char *mpf_get_str __GMP_PROTO ((char *, mp_exp_t *, int,
GMP_CS
TD size_t, mpf_srcptr));
---
> __GMP_DECLSPEC char *mpf_get_str __GMP_PROTO ((char *, mp_exp_t *, int,
size_t
, mpf_srcptr));
1363c1363
< __GMP_DECLSPEC GMP_CSTD size_t mpf_inp_str __GMP_PROTO ((mpf_ptr,
GMP_CSTD FIL
E *, int));
---
> __GMP_DECLSPEC size_t mpf_inp_str __GMP_PROTO ((mpf_ptr, FILE *, int));
1383c1383
< __GMP_DECLSPEC GMP_CSTD size_t mpf_out_str __GMP_PROTO ((GMP_CSTD FILE
*, int,
 GMP_CSTD size_t, mpf_srcptr));
---
> __GMP_DECLSPEC size_t mpf_out_str __GMP_PROTO ((FILE *, int, size_t,
mpf_srcpt
r));
1426c1426
< __GMP_DECLSPEC GMP_CSTD size_t mpf_size __GMP_PROTO ((mpf_srcptr))
__GMP_NOTHR
OW __GMP_ATTRIBUTE_PURE;
---
> __GMP_DECLSPEC size_t mpf_size __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW
__GMP_
ATTRIBUTE_PURE;
1561c1561
< __GMP_DECLSPEC mp_size_t mpn_set_str __GMP_PROTO ((mp_ptr, __gmp_const
unsigne
d char *, GMP_CSTD size_t, int));
---
> __GMP_DECLSPEC mp_size_t mpn_set_str __GMP_PROTO ((mp_ptr, __gmp_const
unsigne
d char *, size_t, int));
1761c1761
< GMP_CSTD size_t
---
> size_t




More information about the gmp-discuss mailing list