Trying to build gcc 4.7.1 build system falls over (see below). There is a patch that can fix this (see https://sourceware.org/ml/crossgcc/2014-05/msg00032.html included below).
Can/should that go back in, or do I just apply it locally to resolve. (basically there are 4 source files with changes of ptrdiff_t to std::ptrdiff_t, and inclusion of <cstddef>)
Thanks
John
fallover:-
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/home/jb/GCCSDK471/gcc4/srcdir/ppl/src -I.. -I.. -I/home/jb/GCCSDK471/gcc4/srcdir/ppl/src -I/home/jb/GCCSDK471/gcc4/builddir/installed-libs-for-cross-gcc/include -g -O2 -frounding-math -W -Wall -MT Grid_Generator.lo -MD -MP -MF .deps/Grid_Generator.Tpo -c /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc -o Grid_Generator.o
In file included from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator_System.defs.hh:28:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:29,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Generator_System.defs.hh:253:7: error: 'ptrdiff_t' was not declared in this scope
ptrdiff_t,
^
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Generator_System.defs.hh:253:7: note: suggested alternatives:
In file included from /usr/include/c++/4.9/iostream:38:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/checked.defs.hh:27,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Checked_Number.defs.hh:28,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Coefficient.types.hh:16,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Coefficient.defs.hh:27,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:28,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:189:28: note: 'std::ptrdiff_t'
typedef __PTRDIFF_TYPE__ ptrdiff_t;
^
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:189:28: note: 'std::ptrdiff_t'
In file included from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator_System.defs.hh:28:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:29,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Generator_System.defs.hh:255:23: error: template argument 3 is invalid
const Generator&> {
^
In file included from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:29:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator_System.defs.hh:270:7: error: 'ptrdiff_t' was not declared in this scope
ptrdiff_t,
^
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator_System.defs.hh:270:7: note: suggested alternatives:
In file included from /usr/include/c++/4.9/iostream:38:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/checked.defs.hh:27,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Checked_Number.defs.hh:28,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Coefficient.types.hh:16,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Coefficient.defs.hh:27,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:28,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:189:28: note: 'std::ptrdiff_t'
typedef __PTRDIFF_TYPE__ ptrdiff_t;
^
/usr/include/i386-linux-gnu/c++/4.9/bits/c++config.h:189:28: note: 'std::ptrdiff_t'
In file included from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.defs.hh:29:0,
from /home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator.cc:26:
/home/jb/GCCSDK471/gcc4/srcdir/ppl/src/Grid_Generator_System.defs.hh:272:28: error: template argument 3 is invalid
const Grid_Generator&>,
^
Makefile:1159: recipe for target 'Grid_Generator.lo' failed
make[5]: *** [Grid_Generator.lo] Error 1
make[5]: Leaving directory '/home/jb/GCCSDK471/gcc4/builddir/cross-ppl/src'
Makefile:951: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/jb/GCCSDK471/gcc4/builddir/cross-ppl/src'
Makefile:478: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/jb/GCCSDK471/gcc4/builddir/cross-ppl'
Makefile:405: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/jb/GCCSDK471/gcc4/builddir/cross-ppl'
Makefile:424: recipe for target 'cross-ppl-built' failed
make[1]: *** [cross-ppl-built] Error 2
make[1]: Leaving directory '/home/jb/GCCSDK471/gcc4'
Makefile:252: recipe for target 'getenv' failed
make: *** [getenv] Error 2
the patch:-
# HG changeset patch # User Bernhard Walle <bernhard@bwalle.de> # Date 1399806036 -7200 # Sun May 11 13:00:36 2014 +0200 # Node ID 5632a171e7c1dc4c0fb5c7a8352afb4188cd29d5 # Parent e35fa03cd2043496839aa5fa3a1a3d2d375b5535 complibs/ppl: Fix build of ppl 0.11.2 with gcc 4.9 From: Roberto Bagnara <bagnara@cs.unipr.it> Date: Tue, 29 Apr 2014 19:51:43 +0000 (+0200) Subject: Added missing inclusions. Use std::ptrdiff_t. X-Git-Url: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl%2Fppl.git;a=commitdiff_plain;h=61d4e14dfd9f1121e9b4521dead5728b2424dd7c Added missing inclusions. Use std::ptrdiff_t. (Thanks to Paulo Cesar Pereira de Andrade.) Signed-off-by: Bernhard Walle <bernhard@bwalle.de> diff -r e35fa03cd204 -r 5632a171e7c1 patches/ppl/0.11.2/500-ptrdiff_t.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/ppl/0.11.2/500-ptrdiff_t.patch Sun May 11 13:00:36 2014 +0200 @@ -0,0 +1,95 @@ +From: Bernhard Walle <bernhard@bwalle.de> +Subject: Fix compilation with gcc 4.9 (ptrdiff_t errors) + +This is a backport of following patch in ppl git + + commit 61d4e14dfd9f1121e9b4521dead5728b2424dd7c + Author: Roberto Bagnara <bagnara@cs.unipr.it> + Date: Tue Apr 29 21:51:43 2014 +0200 + + Added missing inclusions. Use std::ptrdiff_t. + (Thanks to Paulo Cesar Pereira de Andrade.) + +--- + src/Congruence_System.defs.hh | 3 ++- + src/Constraint_System.defs.hh | 3 ++- + src/Generator_System.defs.hh | 3 ++- + src/Grid_Generator_System.defs.hh | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +--- a/src/Grid_Generator_System.defs.hh ++++ b/src/Grid_Generator_System.defs.hh +@@ -30,6 +30,7 @@ site: http://www.cs.unipr.it/ppl/ . */ + #include "Variables_Set.types.hh" + #include "Grid.types.hh" + #include <iosfwd> ++#include <cstddef> + + namespace Parma_Polyhedra_Library { + +@@ -267,7 +268,7 @@ public: + class const_iterator + : public std::iterator<std::forward_iterator_tag, + Grid_Generator, +- ptrdiff_t, ++ std::ptrdiff_t, + const Grid_Generator*, + const Grid_Generator&>, + private Generator_System::const_iterator { +--- a/src/Congruence_System.defs.hh ++++ b/src/Congruence_System.defs.hh +@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */ + #include "Grid.types.hh" + #include "Grid_Certificate.types.hh" + #include <iosfwd> ++#include <cstddef> + + namespace Parma_Polyhedra_Library { + +@@ -235,7 +236,7 @@ public: + class const_iterator + : public std::iterator<std::forward_iterator_tag, + Congruence, +- ptrdiff_t, ++ std::ptrdiff_t, + const Congruence*, + const Congruence&> { + public: +--- a/src/Constraint_System.defs.hh ++++ b/src/Constraint_System.defs.hh +@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */ + #include "Congruence_System.types.hh" + #include <iterator> + #include <iosfwd> ++#include <cstddef> + + namespace Parma_Polyhedra_Library { + +@@ -204,7 +205,7 @@ public: + class const_iterator + : public std::iterator<std::forward_iterator_tag, + Constraint, +- ptrdiff_t, ++ std::ptrdiff_t, + const Constraint*, + const Constraint&> { + public: +--- a/src/Generator_System.defs.hh ++++ b/src/Generator_System.defs.hh +@@ -33,6 +33,7 @@ site: http://www.cs.unipr.it/ppl/ . */ + #include "Polyhedron.types.hh" + #include "Poly_Con_Relation.defs.hh" + #include <iosfwd> ++#include <cstddef> + + namespace Parma_Polyhedra_Library { + +@@ -250,7 +251,7 @@ public: + class const_iterator + : public std::iterator<std::forward_iterator_tag, + Generator, +- ptrdiff_t, ++ std::ptrdiff_t, + const Generator*, + const Generator&> { + public: --
--
Stop press! Just announced -
Free Standard Broadband for 6 months, unlimited data, and no minimum contract
Free Standard Broadband for 6 months, unlimited data, and no minimum contract
For full details of see http://www.JustAskJB.co.uk
Intrigued? Call me
John Ballance C.Eng MIET - jwb@macpcrepair.co.uk - 07976 295923
No comments:
Post a Comment