4.2 C++ test suite build problem on Solaris 10/SPARC
Albert Chin
gmp-discuss at mlists.thewrittenword.com
Sun Apr 16 19:42:13 CEST 2006
While building gmp-4.2 on Solaris 10/SPARC:
$ CC -V
CC: Sun C++ 5.7 Patch 117830-06 2006/02/13
$ gtar jxf gmp-4.2.tar.bz2
$ cd gmp-4.2
$ ./configure CC=cc CFLAGS="-xO2" CXX=CC CXXFLAGS="-xO2" \
M4=/opt/TWWfsw/m4/bin/gm4 ABI=32 --enable-shared --enable-static \
--disable-dependency-tracking --enable-cxx
$ gmake
$ gmake check
...
gmake[4]: Entering directory `/opt/build/china/gmp-4.2/tests/cxx'
CC -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../tests -xO2 -c -o
t-assign.o t-assign.cc
"../../gmpxx.h", line 1389: Error: Formal argument 3 of type extern
"C" void(*)(void*,unsigned)* in call to
__gmp_get_memory_functions(extern "C" void*(*)(unsigned)*, extern "C"
void*(*)(void*,unsigned,unsigned)*, extern "C"
void(*)(void*,unsigned)*) is being passed void(*)(void*,unsigned)*.
"../../gmpxx.h", line 1390: Warning: The variable freefunc has not yet
been assigned a value.
1 Error(s) and 1 Warning(s) detected.
gmake[4]: *** [t-assign.o] Error 1
Anyone have a solution to this? I don't see what's wrong. I tried the
following small test program but it compiles ok:
$ cat test.cc
#include <stdlib.h>
void __gmp_get_memory_functions (
void * ( ** ) ( size_t ),
void * ( ** ) ( void *, size_t, size_t ),
void ( ** ) ( void *, size_t )
);
struct __gmp_alloc_cstring {
char * str ;
__gmp_alloc_cstring ( char * s ) { str = s ; }
~ __gmp_alloc_cstring ( ) {
void ( * freefunc ) ( void * , size_t ) ;
__gmp_get_memory_functions ( 0 , 0 , & freefunc ) ;
( * freefunc ) ( str , 1 ) ;
}
};
--
albert chin (china at thewrittenword.com)
More information about the gmp-discuss
mailing list