compile error on fedora 15

Bug #776151 reported by joakim@verona.se
This bug report is a duplicate of:  Bug #707205: Inkscape fails to build with gcc 4.6. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

Fedora 15

gcc --version
gcc (GCC) 4.6.0 20110428 (Red Hat 4.6.0-6)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

make[3]: Entering directory `/home/joakim/current/build_myprojs/inkscape/inkscape/src'
  CXX 2geom/affine.o
In file included from 2geom/affine.cpp:15:0:
./2geom/utils.h:43:40: error: ‘size_t’ was not declared in this scope
./2geom/utils.h:43:40: note: suggested alternatives:
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/x86_64-redhat-linux/bits/c++config.h:1736:29: note: ‘std::size_t’
/usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/x86_64-redhat-linux/bits/c++config.h:1736:29: note: ‘std::size_t’
./2geom/utils.h:43:46: error: template argument 1 is invalid
./2geom/utils.h:43:46: error: template argument 2 is invalid
./2geom/utils.h:43:53: error: ‘size_t’ has not been declared
make[3]: *** [2geom/affine.o] Error 1
make[3]: Leaving directory `/home/joakim/current/build_myprojs/inkscape/inkscape/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/joakim/current/build_myprojs/inkscape/inkscape/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/joakim/current/build_myprojs/inkscape/inkscape'
make: *** [all] Error 2

sizo_t seems like a very basic thing so im not sure whats happening here

Revision history for this message
joakim@verona.se (joakim-verona) wrote :

A quick google reveals this breakage is expected with gcc 4.6.0:

http://comments.gmane.org/gmane.comp.db.mysql.c%2B%2B/7938

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Joakim,

Thanks for reporting this. The bug is already fixed in Inkscape trunk. Please see bug #707205 for a patch.

Revision history for this message
joakim@verona.se (joakim-verona) wrote :
Download full text (3.4 KiB)

But I cant build from trunk still!

I added #include <stddef.h> to utils.h. There didnt seem to be anything like that in Trunk.
Now I get:

  CXX 2geom/transforms.o
In file included from 2geom/transforms.cpp:37:0:
./2geom/transforms.h: In member function ‘S& Geom::ShearBase<S>::operator*=(const S&) [with S = Geom::HShear]’:
./2geom/transforms.h:59:9: instantiated from ‘void Geom::TransformConcept<T>::constraints() [with T = Geom::HShear]’
/usr/include/boost/concept/detail/has_constraints.hpp:42:98: instantiated from ‘const bool boost::concepts::not_satisfied<Geom::TransformConcept<Geom::HShear> >::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConcept<Geom::HShear> >’
/usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConcept<Geom::HShear> >, boost::concepts::constraint<Geom::TransformConcept<Geom::HShear> >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConcept<Geom::HShear>::************> >’
/usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConcept<Geom::HShear>)>’
2geom/transforms.cpp:121:120: instantiated from here
./2geom/transforms.h:212:77: error: invalid initialization of reference of type ‘Geom::HShear&’ from expression of type ‘const Geom::HShear’
./2geom/transforms.h: In member function ‘S& Geom::ShearBase<S>::operator*=(const S&) [with S = Geom::VShear]’:
./2geom/transforms.h:59:9: instantiated from ‘void Geom::TransformConcept<T>::constraints() [with T = Geom::VShear]’
/usr/include/boost/concept/detail/has_constraints.hpp:42:98: instantiated from ‘const bool boost::concepts::not_satisfied<Geom::TransformConcept<Geom::VShear> >::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConcept<Geom::VShear> >’
/usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConcept<Geom::VShear> >, boost::concepts::constraint<Geom::TransformConcept<Geom::VShear> >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConcept<Geom::VShear>::************> >’
/usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConcept<Geom::VShear>)>’
2geom/transforms.cpp:122:120: instantiated from here
./2geom/transforms.h:212:77: error: invalid initialization of reference of type ‘Geom::VShear&’ from expression of type ‘const Geom::VShear’
./2geom/transforms.h: In member function ‘S& Geom::ShearBase<S>::operator*=(const S&) [with S = Geom::HShear]’:
./2geom/transforms.h:212:80: warning: control reaches end of non-void function [-Wreturn-type]
./2geom/transforms.h: In member function ‘S& Geom::ShearBase<S>::operator*=(const S&) [with S = Geom::VShear]’:
./2geom/transforms.h:212:80: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [2geom/transforms.o] Error 1
make[3]: Leaving directory `/home/joakim/current/build_...

Read more...

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Yes, I had the same problem (comments #12 onwards in bug #707205). I have asked the upstream developers to consider adding #include <cstddef> to src/2geom/utils.h

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

...although I believe that 2geom is now maintained externally, so that change may end up being merged into Inkscape trunk at a later date.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.