Comment 12 for bug 707205

Revision history for this message
Alex Valavanis (valavanisalex) wrote : Re: Inkscape 0.48.0 fails to build with gcc 4.6

I tried backporting the upstream patch to the Ubuntu package (inkscape_0.48.1-2ubuntu2) but the build still fails with the following error. I guess it might be a good idea to add #include <cstddef> to 2geom/utils.h

In file included from 2geom/utils.cpp:33:0:
./2geom/utils.h:83:40: error: ‘size_t’ was not declared in this scope
./2geom/utils.h:83:40: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
./2geom/utils.h:83:46: error: template argument 1 is invalid
./2geom/utils.h:83:46: error: template argument 2 is invalid
./2geom/utils.h:83:53: error: ‘size_t’ has not been declared
2geom/utils.cpp:40:40: error: ‘size_t’ was not declared in this scope
2geom/utils.cpp:40:40: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
2geom/utils.cpp:40:46: error: template argument 1 is invalid
2geom/utils.cpp:40:46: error: template argument 2 is invalid
2geom/utils.cpp:40:53: error: ‘size_t’ has not been declared
2geom/utils.cpp: In function ‘void Geom::binomial_coefficients(int&, int)’:
2geom/utils.cpp:42:5: error: ‘size_t’ was not declared in this scope
2geom/utils.cpp:42:5: note: suggested alternatives:
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
/usr/include/c++/4.6/x86_64-linux-gnu/bits/c++config.h:155:26: note: ‘std::size_t’
2geom/utils.cpp:42:12: error: expected ‘;’ before ‘s’
2geom/utils.cpp:43:8: error: request for member ‘clear’ in ‘bc’, which is of non-class type ‘int’
2geom/utils.cpp:44:8: error: request for member ‘resize’ in ‘bc’, which is of non-class type ‘int’
2geom/utils.cpp:44:15: error: ‘s’ was not declared in this scope
2geom/utils.cpp:45:9: error: invalid types ‘int[int]’ for array subscript
2geom/utils.cpp:46:12: error: expected ‘;’ before ‘k’
2geom/utils.cpp:47:17: error: expected ‘;’ before ‘i’
2geom/utils.cpp:47:24: error: ‘i’ was not declared in this scope
2geom/utils.cpp:49:9: error: ‘k’ was not declared in this scope
2geom/utils.cpp:54:21: error: expected ‘;’ before ‘j’
2geom/utils.cpp:54:28: error: ‘j’ was not declared in this scope
2geom/utils.cpp:60:17: error: expected ‘;’ before ‘i’
2geom/utils.cpp:60:24: error: ‘i’ was not declared in this scope