Re: [PPL-devel] Modified PPL 0.10.2 source distribution for Solaris

-------- Original Message -------- Subject: Re: Modified PPL 0.10.2 source distribution for Solaris From: Roberto Bagnara <bagnara at cs.unipr.it> Date: Wed, October 28, 2009 8:11 am To: Alan Pae <alanpae at ilkda.com> Cc: "The Parma Polyhedra Library developers' list"
<ppl-devel at cs.unipr.it>
Alan Pae wrote:
This is on OpenSolaris build 125 (current) using Sun Studio 12.1.
done > ppl_include_files.hh
../utils/build_header \ -I .. -I ../src \ ../src/ppl_header.hh >ppl.hh ../utils/text2cxxarray --name=BUGS_array \ ../BUGS >BUGS.cc ../utils/text2cxxarray --name=COPYING_array \ ../COPYING >COPYING.cc ../utils/text2cxxarray --name=CREDITS_array \ ../CREDITS >CREDITS.cc gmake all-am gmake[3]: Entering directory `/build/ppl-0.10.2/src' source='Box.cc' object='Box.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ /bin/sh ../libtool --tag=CXX --mode=compile /opt/sunstudio12.1/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c -o Box.lo Box.cc libtool: compile: /opt/sunstudio12.1/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c Box.cc -KPIC -DPIC -o .libs/Box.o "globals.types.hh", line 21: Error: size_t is not defined. "globals.types.hh", line 25: Error: size_t is not defined.
Hi Alan,
it seems the compiler you are using is buggy: according to the C++ standard, size_t has to be provided by <cstddef> and <cstddef> is included by globals.types.hh prior to the first reference to size_t. All the best,
Roberto
Thanks,
I'll file a bug report with Sun then.
=====================
Ok, I actually figured this one out.
vi src/globals.types.hh
#include <stddef.h> /* for size_t */
and then it picks up size_t
but then it throws a bunch of other errors:
addsource='Box.cc' object='Box.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ /bin/sh ../libtool --tag=CXX --mode=compile /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c -o Box.lo Box.cc libtool: compile: /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c Box.cc -KPIC -DPIC -o .libs/Box.o "checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 67: Error: size is not defined. "Row.defs.hh", line 88: Error: Row_Impl_Handler is not defined. "Row.inlines.hh", line 168: Error: Impl is not defined. "Row.inlines.hh", line 173: Error: impl is not defined. "Row.inlines.hh", line 178: Error: impl is not defined. "Row.inlines.hh", line 183: Error: impl is not defined. "Row.inlines.hh", line 208: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 224: Error: impl is not defined. "Row.inlines.hh", line 224: Error: Type name expected instead of "Impl". "Row.inlines.hh", line 224: Error: Could not find a match for operator new(unsigned, unsigned). "Row.inlines.hh", line 237: Error: impl is not defined. "Row.inlines.hh", line 246: Error: impl is not defined. "Row.inlines.hh", line 267: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 273: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 279: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 280: Error: impl is not a member of const Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 289: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 300: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 315: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not a member of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 328: Error: impl is not defined. Compilation aborted, too many Error messages. gmake[3]: *** [Box.lo] Error 1 gmake[3]: Leaving directory `/build/ppl-0.10.2/src'
Please suggest.
thanks, alan

Alan Pae wrote:
but then it throws a bunch of other errors:
addsource='Box.cc' object='Box.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ /bin/sh ../libtool --tag=CXX --mode=compile /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c -o Box.lo Box.cc libtool: compile: /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c Box.cc -KPIC -DPIC -o .libs/Box.o "checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 67: Error: size is not defined. "Row.defs.hh", line 88: Error: Row_Impl_Handler is not defined. "Row.inlines.hh", line 168: Error: Impl is not defined. "Row.inlines.hh", line 173: Error: impl is not defined. "Row.inlines.hh", line 178: Error: impl is not defined. "Row.inlines.hh", line 183: Error: impl is not defined. "Row.inlines.hh", line 208: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 224: Error: impl is not defined. "Row.inlines.hh", line 224: Error: Type name expected instead of "Impl". "Row.inlines.hh", line 224: Error: Could not find a match for operator new(unsigned, unsigned). "Row.inlines.hh", line 237: Error: impl is not defined. "Row.inlines.hh", line 246: Error: impl is not defined. "Row.inlines.hh", line 267: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 273: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 279: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 280: Error: impl is not a member of const Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 289: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 300: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 315: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not a member of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 328: Error: impl is not defined. Compilation aborted, too many Error messages. gmake[3]: *** [Box.lo] Error 1 gmake[3]: Leaving directory `/build/ppl-0.10.2/src'
Please suggest.
Hi Alan,
it seems the compiler is complaining at typeof in the following context:
#ifdef PPL_HAVE_TYPEOF //! Type of the _mp_size field of GMP's __mpz_struct. typedef typeof(__mpz_struct()._mp_size) mp_size_field_t; #else //! This is assumed to be the type of the _mp_size field of GMP's __mpz_struct. typedef int mp_size_field_t; #endif
The PPL_HAVE_TYPEOF symbol should be defined only if the underlying compiler supports typeof. The test is performed via Autoconf in response to the line
AC_C_TYPEOF
in configure.ac, root directory of the PPL 0.10.2 package. This test results, on my machine, with GCC 4.3.2, in the following lines in config.log
configure:7158: checking for typeof syntax and keyword spelling configure:7199: gcc -c -g -O2 -frounding-math conftest.c >&5 configure:7206: $? = 0 configure:7223: result: typeof
In turn, this is checked by compiling the following source:
#define ac_kw typeof /* #define ac_kw __typeof__ */
int main () {
int value; typedef struct { char a [1 + ! ((ac_kw (value)) ((ac_kw (value)) 0 < (ac_kw (value)) -1 ? (ac_kw (value)) - 1 : ~ (~ (ac_kw (value)) 0 << sizeof (ac_kw (value)))))]; } ac__typeof_type_; return (! ((void) ((ac__typeof_type_ *) 0), 0));
; return 0; }
If this does not work, then the second #define is used and then in ppl-config.h we will have
#define typeof __typeof__
It even with the second #define the program above cannot be compiled or fails, then in ppl-config.h we should have
#undef PPL_HAVE_TYPEOF
and then typeof would not be used.
It seems this mechanism is not working on your side. You should have now enough elements to investigate. Cheers,
Roberto

On 11/ 7/09 11:48 PM, Roberto Bagnara wrote:
Alan Pae wrote:
but then it throws a bunch of other errors:
addsource='Box.cc' object='Box.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ /bin/sh ../libtool --tag=CXX --mode=compile /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c -o Box.lo Box.cc libtool: compile: /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c Box.cc -KPIC -DPIC -o .libs/Box.o "checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 67: Error: size is not defined. "Row.defs.hh", line 88: Error: Row_Impl_Handler is not defined. "Row.inlines.hh", line 168: Error: Impl is not defined. "Row.inlines.hh", line 173: Error: impl is not defined. "Row.inlines.hh", line 178: Error: impl is not defined. "Row.inlines.hh", line 183: Error: impl is not defined. "Row.inlines.hh", line 208: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 224: Error: impl is not defined. "Row.inlines.hh", line 224: Error: Type name expected instead of "Impl". "Row.inlines.hh", line 224: Error: Could not find a match for operator new(unsigned, unsigned). "Row.inlines.hh", line 237: Error: impl is not defined. "Row.inlines.hh", line 246: Error: impl is not defined. "Row.inlines.hh", line 267: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 273: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 279: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 280: Error: impl is not a member of const Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 289: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 300: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 315: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not a member of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 328: Error: impl is not defined. Compilation aborted, too many Error messages. gmake[3]: *** [Box.lo] Error 1 gmake[3]: Leaving directory `/build/ppl-0.10.2/src'
Please suggest.
Hi Alan,
it seems the compiler is complaining at typeof in the following context:
#ifdef PPL_HAVE_TYPEOF //! Type of the _mp_size field of GMP's __mpz_struct. typedef typeof(__mpz_struct()._mp_size) mp_size_field_t; #else //! This is assumed to be the type of the _mp_size field of GMP's __mpz_struct. typedef int mp_size_field_t; #endif
The PPL_HAVE_TYPEOF symbol should be defined only if the underlying compiler supports typeof. The test is performed via Autoconf in response to the line
AC_C_TYPEOF
in configure.ac, root directory of the PPL 0.10.2 package. This test results, on my machine, with GCC 4.3.2, in the following lines in config.log
configure:7158: checking for typeof syntax and keyword spelling configure:7199: gcc -c -g -O2 -frounding-math conftest.c >&5 configure:7206: $? = 0 configure:7223: result: typeof
configure:7158: checking for typeof syntax and keyword spelling configure:7199: /opt/sunstudio12.1/bin/cc -c -g -O2 -I/opt/local/include -I/opt/gmp/include -I/opt/local/include conftest.c >&5 "conftest.c", line 43: warning: statement not reached configure:7206: $? = 0 configure:7223: result: typeof
If this does not work, then the second #define is used and then in ppl-config.h we will have
#define typeof __typeof__
It even with the second #define the program above cannot be compiled or fails, then in ppl-config.h we should have
#undef PPL_HAVE_TYPEOF
and then typeof would not be used.
/* Define to 1 if typeof works with your compiler. */ #define PPL_HAVE_TYPEOF 1
I've tried setting it to the other settings but all it does is toggle these error messages:
"checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not
defined.
"checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not
defined.
"checked_mpz.inlines.hh", line 67: Error: size is not defined.
Just for grins I ran a gmake -k and it seems if I can get past this then about 90% of the compiler errors will be cleared up.
Would it help if I tarred everything up and sent it to you?
Yea, I'm not a C++ coder. :-)
thanks, alan

Alan Pae wrote:
On 11/ 7/09 11:48 PM, Roberto Bagnara wrote:
Alan Pae wrote:
but then it throws a bunch of other errors:
addsource='Box.cc' object='Box.lo' libtool=yes \ DEPDIR=.deps depmode=none /bin/sh ../depcomp \ /bin/sh ../libtool --tag=CXX --mode=compile /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c -o Box.lo Box.cc libtool: compile: /opt/SunStudioExpress/bin/CC -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -I/usr/include/gmp -g -O2 -c Box.cc -KPIC -DPIC -o .libs/Box.o "checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not defined. "checked_mpz.inlines.hh", line 67: Error: size is not defined. "Row.defs.hh", line 88: Error: Row_Impl_Handler is not defined. "Row.inlines.hh", line 168: Error: Impl is not defined. "Row.inlines.hh", line 173: Error: impl is not defined. "Row.inlines.hh", line 178: Error: impl is not defined. "Row.inlines.hh", line 183: Error: impl is not defined. "Row.inlines.hh", line 208: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 224: Error: impl is not defined. "Row.inlines.hh", line 224: Error: Type name expected instead of "Impl". "Row.inlines.hh", line 224: Error: Could not find a match for operator new(unsigned, unsigned). "Row.inlines.hh", line 237: Error: impl is not defined. "Row.inlines.hh", line 246: Error: impl is not defined. "Row.inlines.hh", line 267: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 273: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 279: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 280: Error: impl is not a member of const Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 289: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 300: Error: Parma_Polyhedra_Library::Row_Impl_Handler is not a direct base class of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 315: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not defined. "Row.inlines.hh", line 320: Error: impl is not a member of Parma_Polyhedra_Library::Row. "Row.inlines.hh", line 328: Error: impl is not defined. Compilation aborted, too many Error messages. gmake[3]: *** [Box.lo] Error 1 gmake[3]: Leaving directory `/build/ppl-0.10.2/src'
Please suggest.
Hi Alan,
it seems the compiler is complaining at typeof in the following context:
#ifdef PPL_HAVE_TYPEOF //! Type of the _mp_size field of GMP's __mpz_struct. typedef typeof(__mpz_struct()._mp_size) mp_size_field_t; #else //! This is assumed to be the type of the _mp_size field of GMP's __mpz_struct. typedef int mp_size_field_t; #endif
The PPL_HAVE_TYPEOF symbol should be defined only if the underlying compiler supports typeof. The test is performed via Autoconf in response to the line
AC_C_TYPEOF
in configure.ac, root directory of the PPL 0.10.2 package. This test results, on my machine, with GCC 4.3.2, in the following lines in config.log
configure:7158: checking for typeof syntax and keyword spelling configure:7199: gcc -c -g -O2 -frounding-math conftest.c >&5 configure:7206: $? = 0 configure:7223: result: typeof
configure:7158: checking for typeof syntax and keyword spelling configure:7199: /opt/sunstudio12.1/bin/cc -c -g -O2 -I/opt/local/include -I/opt/gmp/include -I/opt/local/include conftest.c >&5 "conftest.c", line 43: warning: statement not reached configure:7206: $? = 0 configure:7223: result: typeof
If this does not work, then the second #define is used and then in ppl-config.h we will have
#define typeof __typeof__
It even with the second #define the program above cannot be compiled or fails, then in ppl-config.h we should have
#undef PPL_HAVE_TYPEOF
and then typeof would not be used.
/* Define to 1 if typeof works with your compiler. */ #define PPL_HAVE_TYPEOF 1
I've tried setting it to the other settings but all it does is toggle these error messages:
"checked_mpz.inlines.hh", line 54: Error: "," expected instead of "(". "checked_mpz.inlines.hh", line 60: Error: mp_size_field_t is not
defined.
"checked_mpz.inlines.hh", line 66: Error: mp_size_field_t is not
defined.
"checked_mpz.inlines.hh", line 67: Error: size is not defined.
Just for grins I ran a gmake -k and it seems if I can get past this then about 90% of the compiler errors will be cleared up.
Would it help if I tarred everything up and sent it to you?
Hmm, I am afraid not. The only thing it could _really_ help is providing me with access to a fully configured Solaris machine (with all the required development tools in place) for 30 minutes. I know in the past you objected to this and suggested I install Solaris instead: unfortunately I don't have the time to do that. So let us wait for someone who can provide me access to such a machine: if there is a real interest in having the PPL running on Solaris, I am sure this will happen soon. All the best,
Roberto
participants (2)
-
Alan Pae
-
Roberto Bagnara