Boost C++ Libraries: Ticket #7154: [polygon] Build fails with gcc-4.7 https://svn.boost.org/trac10/ticket/7154 <p> Reference: <a class="ext-link" href="http://bugzilla.redhat.com/show_bug.cgi?id=784654"><span class="icon">​</span>http://bugzilla.redhat.com/show_bug.cgi?id=784654</a> </p> <p> Building the attached gtl-polygon-set.cc (example program from upstream website: <a href="http://www.boost.org/doc/libs/1_48_0/libs/polygon/doc/gtl_polygon_set_usage.htm">http://www.boost.org/doc/libs/1_48_0/libs/polygon/doc/gtl_polygon_set_usage.htm</a>) with boost-devel-1.48.0-8.fc17.x86_64 and gcc-c++-4.7.0-0.9.fc17.x86_64 fails with: g++ -Wall -O2 -g gtl-polygon-set.cc -o gtl-polygon-set In file included from /usr/include/boost/polygon/polygon.hpp:64:0, </p> <blockquote> <p> from gtl-polygon-set.cc:8: </p> </blockquote> <p> /usr/include/boost/polygon/polygon_90_set_data.hpp: In instantiation of ‘void boost::polygon::polygon_90_set_data&lt;T&gt;::sort() const [with T = int]’: /usr/include/boost/polygon/polygon_45_set_data.hpp:1550:7: required from ‘void boost::polygon::polygon_45_set_data&lt;Unit&gt;::applyAdaptiveBoolean_(boost::polygon::polygon_45_set_data&lt;Unit&gt;&amp;, const boost::polygon::polygon_45_set_data&lt;Unit&gt;&amp;) const [with int op = 0; Unit = int]’ /usr/include/boost/polygon/detail/polygon_set_view.hpp:108:9: required from ‘void boost::polygon::execute_boolean_op(value_type&amp;, const geometry_type_1&amp;, const geometry_type_2&amp;) [with value_type = boost::polygon::polygon_set_data&lt;int&gt;; geometry_type_1 = std::vector&lt;boost::polygon::polygon_data&lt;int&gt; &gt;; geometry_type_2 = boost::polygon::rectangle_data&lt;int&gt;; int op_type = 0]’ /usr/include/boost/polygon/detail/polygon_set_view.hpp:197:5: required from ‘geometry_type_1&amp; boost::polygon::self_assignment_boolean_op(geometry_type_1&amp;, const geometry_type_2&amp;) [with geometry_type_1 = std::vector&lt;boost::polygon::polygon_data&lt;int&gt; &gt;; geometry_type_2 = boost::polygon::rectangle_data&lt;int&gt;; int op_type = 0]’ /usr/include/boost/polygon/polygon_set_concept.hpp:388:90: required from ‘typename boost::enable_if&lt;typename boost::polygon::gtl_and_4&lt;boost::polygon::operators::yes_ps_ope, boost::polygon::gtl_yes, typename boost::polygon::is_mutable_polygon_set_type&lt;polygon_set_type_1&gt;::type, typename boost::polygon::is_any_polygon_set_type&lt;polygon_set_type_2&gt;::type&gt;::type, geometry_type_1&gt;::type&amp; boost::polygon::operators::operator+=(geometry_type_1&amp;, const geometry_type_2&amp;) [with geometry_type_1 = std::vector&lt;boost::polygon::polygon_data&lt;int&gt; &gt;; geometry_type_2 = boost::polygon::rectangle_data&lt;int&gt;; typename boost::enable_if&lt;typename boost::polygon::gtl_and_4&lt;boost::polygon::operators::yes_ps_ope, boost::polygon::gtl_yes, typename boost::polygon::is_mutable_polygon_set_type&lt;polygon_set_type_1&gt;::type, typename boost::polygon::is_any_polygon_set_type&lt;polygon_set_type_2&gt;::type&gt;::type, geometry_type_1&gt;::type = std::vector&lt;boost::polygon::polygon_data&lt;int&gt; &gt;]’ gtl-polygon-set.cc:20:43: required from here /usr/include/boost/polygon/polygon_90_set_data.hpp:299:9: error: ‘gtlsort’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] In file included from /usr/include/boost/polygon/detail/scan_arbitrary.hpp:13:0, </p> <blockquote> <p> from /usr/include/boost/polygon/polygon_set_data.hpp:929, from /usr/include/boost/polygon/polygon.hpp:82, from gtl-polygon-set.cc:8: </p> </blockquote> <p> /usr/include/boost/polygon/detail/polygon_sort_adaptor.hpp:58:10: note: ‘template&lt;class iter_type, class pred_type&gt; void boost::polygon::gtlsort(iter_type, iter_type, const pred_type&amp;)’ declared here, later in the translation unit make: <strong>* [gtl-polygon-set] Error 1 </strong></p> <p> This can be fixed by patching boost/polygon.hpp to make the gtlsort() declaration appear earlier: --- /usr/include/boost/polygon/polygon.hpp.orig 2012-01-26 01:05:15.934998805 +0800 +++ /usr/include/boost/polygon/polygon.hpp 2012-01-26 01:13:10.547000000 +0800 @@ -24,6 +24,8 @@ </p> <blockquote> <p> #include "transform.hpp" #include "detail/transform_detail.hpp" </p> </blockquote> <p> +#include "detail/polygon_sort_adaptor.hpp" + </p> <blockquote> <p> <em>interval #include "interval_data.hpp" #include "interval_traits.hpp" </em></p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7154 Trac 1.4.3 Denis Arnaud Fri, 20 Jul 2012 09:54:17 GMT attachment set https://svn.boost.org/trac10/ticket/7154 https://svn.boost.org/trac10/ticket/7154 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">gtl-polygon-set.cc</span> </li> </ul> <p> Source code to reproduce the compilation error </p> Ticket Denis Arnaud Fri, 20 Jul 2012 09:55:04 GMT attachment set https://svn.boost.org/trac10/ticket/7154 https://svn.boost.org/trac10/ticket/7154 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-polygon-declare-gtlsort-earlier.patch</span> </li> </ul> <p> Patch to fix the compilation issue </p> Ticket sydorchuk.andriy@… Mon, 17 Sep 2012 22:07:53 GMT <link>https://svn.boost.org/trac10/ticket/7154#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7154#comment:1</guid> <description> <p> Will be fixed in Boost 1.52. </p> <p> Andrii Sydorchuk </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Lucanus Simonson</dc:creator> <pubDate>Tue, 18 Sep 2012 23:13:38 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7154#comment:2 https://svn.boost.org/trac10/ticket/7154#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket