Hi,
Just tried to compile Inkscape trunk on my spanking new laptop (replacing my 6.5 year old one). It failed in 2geom with an error from the boost library. I used Fedora 15 beta which has boost 1.46 and gcc 4.6. The error message is:
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::TransformConceptGeom::HShear
::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConceptGeom::HShear >’ /usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConceptGeom::HShear >, boost::concepts::constraint<Geom::TransformConceptGeom::HShear >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConceptGeom::HShear::************> >’ /usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConceptGeom::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::TransformConceptGeom::VShear
::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConceptGeom::VShear >’ /usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConceptGeom::VShear >, boost::concepts::constraint<Geom::TransformConceptGeom::VShear >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConceptGeom::VShear::************> >’ /usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConceptGeom::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
Any clues?
Tav
On 6/5/11 11:38, Tavmjong Bah wrote:
Just tried to compile Inkscape trunk on my spanking new laptop (replacing my 6.5 year old one). It failed in 2geom with an error from the boost library. I used Fedora 15 beta which has boost 1.46 and gcc 4.6. The error message is:
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::TransformConceptGeom::HShear
::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConceptGeom::HShear >’ /usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConceptGeom::HShear >, boost::concepts::constraint<Geom::TransformConceptGeom::HShear >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConceptGeom::HShear::************> >’ /usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConceptGeom::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::TransformConceptGeom::VShear
::value’
/usr/include/boost/concept/detail/has_constraints.hpp:45:31: instantiated from ‘boost::concepts::not_satisfied<Geom::TransformConceptGeom::VShear >’ /usr/include/boost/mpl/if.hpp:67:11: instantiated from ‘boost::mpl::if_<boost::concepts::not_satisfied<Geom::TransformConceptGeom::VShear >, boost::concepts::constraint<Geom::TransformConceptGeom::VShear >, boost::concepts::requirement<boost::concepts::failed************ Geom::TransformConceptGeom::VShear::************> >’ /usr/include/boost/concept/detail/general.hpp:50:8: instantiated from ‘boost::concepts::requirement_<void (*)(Geom::TransformConceptGeom::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
Any clues?
The same error was reported in #inkscape (irc) by a user on Arch linux, compiling inkscape (trunk as well as the ocal branch) with GCC 4.6 (no solution known so far).
http://gbpaste.org/lLFxG (2011-04-16)
~suv
2011/5/6 Tavmjong Bah <tavmjong@...8...>:
Hi, Just tried to compile Inkscape trunk on my spanking new laptop (replacing my 6.5 year old one). It failed in 2geom with an error from the boost library. I used Fedora 15 beta which has boost 1.46 and gcc 4.6. The error message is:
Looks like the new GCC version changed its mind about whether HShear and VShear satisfy the TransformConcept. As a workaround, comment out the lines: BOOST_CONCEPT_ASSERT((TransformConcept<HShear>)); BOOST_CONCEPT_ASSERT((TransformConcept<VShear>)); in src/2geom/transforms.cpp.
The offending line is line 212 in src/2geom/transforms.h - we are trying to return a non-const reference a const object. I don't really remember why I wrote it this way. Can you try changing the return statement to "return *this"?
Regards, Krzysztof
On 6/5/11 18:06, Krzysztof Kosiński wrote:
2011/5/6 Tavmjong Bah <tavmjong@...8...>:
Hi, Just tried to compile Inkscape trunk on my spanking new laptop (replacing my 6.5 year old one). It failed in 2geom with an error from the boost library. I used Fedora 15 beta which has boost 1.46 and gcc 4.6. The error message is:
Looks like the new GCC version changed its mind about whether HShear and VShear satisfy the TransformConcept. As a workaround, comment out the lines: BOOST_CONCEPT_ASSERT((TransformConcept<HShear>)); BOOST_CONCEPT_ASSERT((TransformConcept<VShear>)); in src/2geom/transforms.cpp.
The offending line is line 212 in src/2geom/transforms.h - we are trying to return a non-const reference a const object. I don't really remember why I wrote it this way. Can you try changing the return statement to "return *this"?
Now also reported for Ubuntu Natty with libboost_1.42 and gcc_4.6.0: https://bugs.launchpad.net/inkscape/+bug/779016
Workaround and proposed fix failed on debian sid (GCC 4.6) - as reported on #inkscape (irc).
~suv
W dniu 7 maja 2011 14:26 użytkownik ~suv <suv-sf@...58...> napisał:
Workaround and proposed fix failed on debian sid (GCC 4.6) - as reported on #inkscape (irc).
Attempt #2: try changing the return statement at 2geom/transforms.h:212 to "return static_cast<S &>(*this);" This works with GCC 4.5, but so did "return *static_cast<S const*>(this);" Regards, Krzysztof
On 8/5/11 01:13, Krzysztof Kosiński wrote:
W dniu 7 maja 2011 14:26 użytkownik ~suv <suv-sf@...58...> napisał:
Workaround and proposed fix failed on debian sid (GCC 4.6) - as reported on #inkscape (irc).
Attempt #2: try changing the return statement at 2geom/transforms.h:212 to "return static_cast<S &>(*this);" This works with GCC 4.5, but so did "return *static_cast<S const*>(this);"
Confirmed to work with GCC 4.6 on Debian Sid (compiles without failure, initial tests with tools and transforms ok).
~suv
W dniu 8 maja 2011 12:35 użytkownik ~suv <suv-sf@...58...> napisał:
Confirmed to work with GCC 4.6 on Debian Sid (compiles without failure, initial tests with tools and transforms ok).
Committed as revision 10202. mkinstalldirs removed from version control in 10203. Regards, Krzysztof
Thanks everyone! It now compiles for me.
Tav
On Mon, 2011-05-09 at 00:46 +0200, Krzysztof Kosiński wrote:
W dniu 8 maja 2011 12:35 użytkownik ~suv <suv-sf@...58...> napisał:
Confirmed to work with GCC 4.6 on Debian Sid (compiles without failure, initial tests with tools and transforms ok).
Committed as revision 10202. mkinstalldirs removed from version control in 10203. Regards, Krzysztof
attached the diff that let it compile under fedora 15. I have a fefdora on my virtualbox. Possibly mkinstalldirs should not be under versioncontrol.
Adib
2011/5/8 Krzysztof Kosiński <tweenk.pl@...400...>:
W dniu 7 maja 2011 14:26 użytkownik ~suv <suv-sf@...58...> napisał:
Workaround and proposed fix failed on debian sid (GCC 4.6) - as reported on #inkscape (irc).
Attempt #2: try changing the return statement at 2geom/transforms.h:212 to "return static_cast<S &>(*this);" This works with GCC 4.5, but so did "return *static_cast<S const*>(this);" Regards, Krzysztof
WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (4)
-
Krzysztof Kosiński
-
Tavmjong Bah
-
the Adib
-
~suv