Modify

Ticket #7154 (closed Bugs: fixed)

Opened 21 months ago

Last modified 19 months ago

[polygon] Build fails with gcc-4.7

Reported by: denis.arnaud Owned by: ljsimons
Milestone: To Be Determined Component: polygon
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

Reference:  http://bugzilla.redhat.com/show_bug.cgi?id=784654

Building the attached gtl-polygon-set.cc (example program from upstream website: http://www.boost.org/doc/libs/1_48_0/libs/polygon/doc/gtl_polygon_set_usage.htm) 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,

from gtl-polygon-set.cc:8:

/usr/include/boost/polygon/polygon_90_set_data.hpp: In instantiation of ‘void boost::polygon::polygon_90_set_data<T>::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<Unit>::applyAdaptiveBoolean_(boost::polygon::polygon_45_set_data<Unit>&, const boost::polygon::polygon_45_set_data<Unit>&) 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&, const geometry_type_1&, const geometry_type_2&) [with value_type = boost::polygon::polygon_set_data<int>; geometry_type_1 = std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 = boost::polygon::rectangle_data<int>; int op_type = 0]’ /usr/include/boost/polygon/detail/polygon_set_view.hpp:197:5: required from ‘geometry_type_1& boost::polygon::self_assignment_boolean_op(geometry_type_1&, const geometry_type_2&) [with geometry_type_1 = std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 = boost::polygon::rectangle_data<int>; int op_type = 0]’ /usr/include/boost/polygon/polygon_set_concept.hpp:388:90: required from ‘typename boost::enable_if<typename boost::polygon::gtl_and_4<boost::polygon::operators::yes_ps_ope, boost::polygon::gtl_yes, typename boost::polygon::is_mutable_polygon_set_type<polygon_set_type_1>::type, typename boost::polygon::is_any_polygon_set_type<polygon_set_type_2>::type>::type, geometry_type_1>::type& boost::polygon::operators::operator+=(geometry_type_1&, const geometry_type_2&) [with geometry_type_1 = std::vector<boost::polygon::polygon_data<int> >; geometry_type_2 = boost::polygon::rectangle_data<int>; typename boost::enable_if<typename boost::polygon::gtl_and_4<boost::polygon::operators::yes_ps_ope, boost::polygon::gtl_yes, typename boost::polygon::is_mutable_polygon_set_type<polygon_set_type_1>::type, typename boost::polygon::is_any_polygon_set_type<polygon_set_type_2>::type>::type, geometry_type_1>::type = std::vector<boost::polygon::polygon_data<int> >]’ 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,

from /usr/include/boost/polygon/polygon_set_data.hpp:929, from /usr/include/boost/polygon/polygon.hpp:82, from gtl-polygon-set.cc:8:

/usr/include/boost/polygon/detail/polygon_sort_adaptor.hpp:58:10: note: ‘template<class iter_type, class pred_type> void boost::polygon::gtlsort(iter_type, iter_type, const pred_type&)’ declared here, later in the translation unit make: * [gtl-polygon-set] Error 1

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 @@

#include "transform.hpp" #include "detail/transform_detail.hpp"

+#include "detail/polygon_sort_adaptor.hpp" +

interval #include "interval_data.hpp" #include "interval_traits.hpp"

Attachments

gtl-polygon-set.cc Download (1.7 KB) - added by denis.arnaud 21 months ago.
Source code to reproduce the compilation error
boost-polygon-declare-gtlsort-earlier.patch Download (369 bytes) - added by denis.arnaud 21 months ago.
Patch to fix the compilation issue

Change History

Changed 21 months ago by denis.arnaud

Source code to reproduce the compilation error

Changed 21 months ago by denis.arnaud

Patch to fix the compilation issue

comment:1 Changed 19 months ago by sydorchuk.andriy@…

Will be fixed in Boost 1.52.

Andrii Sydorchuk

comment:2 Changed 19 months ago by ljsimons

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.