[MacPorts] #34227: boost::get() calls wrongly resolved by g++
#34227: boost::get() calls wrongly resolved by g++ ----------------------------------+----------------------------------------- Reporter: roland@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: boost ----------------------------------+----------------------------------------- The current version of Boost available in the MacPorts (port `boost 1.49.0`) seems to make g++ wrongly resolve some calls to boost::get(). The attached C++ code `boost-get-test-ko.cc` does not compile properly with all the g++ compiler I used (Apple g++ 4.2, MacPorts g++ 4.4, 4.5, 4.6, 4.7) on my machine (2010 MacBook Pro w/ Mac OS X version 10.6.8). These compilers try to use `boost::get()` from `/opt/local/include/boost/graph/reverse_graph.hpp` instead of `boost::get()` from `/opt/local/include/boost/variant/get.hpp`, leading to this kind of error messages: {{{ % g++-mp-4.7 -I/opt/local/include boost-get-test-ko.cc In file included from /opt/local/include/boost/graph/vector_as_graph.hpp:23:0, from /opt/local/include/boost/graph/transitive_closure.hpp:17, from boost-get-test-ko.cc:2: /opt/local/include/boost/graph/graph_traits.hpp: In instantiation of 'struct boost::graph_traits<int>': /opt/local/include/boost/graph/reverse_graph.hpp:472:1: required by substitution of 'template<class Graph, class GRef> typename boost::graph_traits<Graph>::edge_descriptor boost::get(boost::edge_underlying_t, const boost::reverse_graph<BidirectionalGraph, GraphRef>&, const typename boost::graph_traits<boost::reverse_graph<BidirectionalGraph, GraphRef>
::edge_descriptor&) [with Graph = int; GRef = <missing>]' boost-get-test-ko.cc:7:28: required from here /opt/local/include/boost/graph/graph_traits.hpp:30:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:31:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:32:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:33:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:34:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:35:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:36:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:38:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:39:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:40:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:42:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:43:52: error: 'int' is not a class, struct, or union type /opt/local/include/boost/graph/graph_traits.hpp:44:52: error: 'int' is not a class, struct, or union type }}}
If the `#include <boost/graph/transitive_closure.hpp>` statement is removed (see attached file `boost-get-test-ok.cc`, no compiling error arises. The versions of `clang++` I tried (MacPorts clang++ 2.9, 3.0 and 3.1) have no trouble compiling both files. -- Ticket URL: <https://trac.macports.org/ticket/34227> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34227: boost::get() calls wrongly resolved by g++ ----------------------------------+----------------------------------------- Reporter: roland@… | Owner: adfernandes@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: boost ----------------------------------+----------------------------------------- Changes (by ryandesign@…): * owner: macports-tickets@… => adfernandes@… Comment: I'm uncertain what you would have the MacPorts team do in regard to this problem. Sounds like a problem that needs to be corrected by the developers of Boost, to whom I would suggest you report the problem. -- Ticket URL: <https://trac.macports.org/ticket/34227#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34227: boost::get() calls wrongly resolved by g++ -----------------------------------+---------------------------------------- Reporter: roland@… | Owner: adfernandes@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: invalid | Keywords: Port: boost | -----------------------------------+---------------------------------------- Changes (by adfernandes@…): * status: new => closed * resolution: => invalid Comment: Your compiler, OS, and architecture are on the "supported" list of `boost`, so it is likely either a bug in `boost` or, based on your description I'd guess it is a bug in `gcc`. You can report bugs to the `boost` team [http://www.boost.org/support/bugs.html here], and bugs to the `gcc` team [http://gcc.gnu.org/bugs/ here]. The MacPorts bug database is really for bugs in the building and installation of software, not the packages themselves. To manage a project as big as MacPorts, you have to be careful who has responsibility over what piece! Please do file a bug with both teams, it's really the only way that things like this get fixed upstream. -- Ticket URL: <https://trac.macports.org/ticket/34227#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#34227: boost::get() calls wrongly resolved by g++ -----------------------------------+---------------------------------------- Reporter: roland@… | Owner: adfernandes@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Resolution: invalid | Keywords: Port: boost | -----------------------------------+---------------------------------------- Comment(by roland@…): Replying to [comment:1 ryandesign@…]:
I'm uncertain what you would have the MacPorts team do in regard to this problem. Sounds like a problem that needs to be corrected by the developers of Boost, to whom I would suggest you report the problem.
All right, I'll contact them. Thanks for your prompt reply. -- Ticket URL: <https://trac.macports.org/ticket/34227#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts