
Janis Johnson wrote:
I'm trying to build the Parma Polyhedra Library on powerpc-linux so I can use it for Graphite support in GCC. I've tried a lot of things and my builds normally succeed but I get lots of testsuite failures:
in Box, 60 tests with -DBOX_INSTANCES=db_r_oc in Octagonal_Shape, 58 tests with -DOCTAGONAL_SHAPE_INSTANCE=double in BD_Shape, 59 tests with -DBD_SHAPE_INSTANCE=double
Hi Janis,
we investigated your report and found the culprit. The immediate cause is a bad interaction between Autoconf's AC_C_BIGENDIAN and AX_PREFIX_CONFIG_H. We reported this problem a few days ago, but did not get any reply:
http://www.cs.unipr.it/pipermail/ppl-devel/2009-January/013958.html
Perhaps AX_PREFIX_CONFIG_H is no longer maintained and we decided to drop it starting from PPL 0.11.
Now, what happens is that AX_PREFIX_CONFIG_H fails to rename WORDS_BIGENDIAN as PPL_WORDS_BIGENDIAN. The PPL, however, expects (only in three places, in src/Float.defs.hh) the symbol PPL_WORDS_BIGENDIAN to be defined on big-endian machines such as PowerPC.
A workaround is to configure the PPL for big-endian architectures specifying
CPPFLAGS="-UWORDS_BIGENDIAN -DPPL_WORDS_BIGENDIAN=1"
at the end of the configure command. Can you please check that that works? If it does we will immediately publish a notice on the PPL web site.
Taking into account that GCC 4.4 (via CLooG) does not use any PPL feature depending on that miscompilation, I wonder what is best. Do you think we should prepare a PPL 0.10.1 release with that fix?
Concerning how such a thing could have happened, the problem is that we have access to only one PowerPC machine. That machine has memory problems so that a make of the PPL terminates with a segmentation fault in GCC 90% of the times. So, basically, we currently have no sensible way to test on PowerPCs. It is a pity that this caused PPL 0.10 to be shipped with such a bug. Thanks again for the problem report,
Roberto