[any][quickbook] Recent compile failure gcc vs. clang..
Not sure when this started failing other than it was some time this past week.. ===== Froggy:quickbook grafik$ pwd /Users/grafik/devroots/Boost/trunk/tools/quickbook Froggy:quickbook grafik$ b2 toolset=clang ...patience... ...patience... ...found 1735 targets... Froggy:quickbook grafik$ b2 toolset=darwin ...patience... ...patience... ...found 1735 targets... ...updating 3 targets... darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/quickbook.o ../../boost/any.hpp: In function ‘ValueType boost::any_cast(boost::any&) [with ValueType = const int&]’: ../../boost/any.hpp:308: instantiated from ‘ValueType boost::any_cast(const boost::any&) [with ValueType = const int&]’ ../../boost/program_options/variables_map.hpp:69: instantiated from ‘const T& boost::program_options::variable_value::as() const [with T = int]’ src/quickbook.cpp:387: instantiated from here ../../boost/any.hpp:292: error: forming reference to reference type ‘const int&’ ../../boost/any.hpp:294: error: forming reference to reference type ‘const int&’ ../../boost/any.hpp: In function ‘ValueType boost::any_cast(boost::any&) [with ValueType = const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&]’: ../../boost/any.hpp:308: instantiated from ‘ValueType boost::any_cast(const boost::any&) [with ValueType = const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&]’ ../../boost/program_options/variables_map.hpp:69: instantiated from ‘const T& boost::program_options::variable_value::as() const [with T = std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >]’ src/quickbook.cpp:421: instantiated from here ../../boost/any.hpp:292: error: forming reference to reference type ‘const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&’ ../../boost/any.hpp:294: error: forming reference to reference type ‘const std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&’ ../../boost/any.hpp: In function ‘ValueType boost::any_cast(boost::any&) [with ValueType = const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&]’: ../../boost/any.hpp:308: instantiated from ‘ValueType boost::any_cast(const boost::any&) [with ValueType = const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&]’ ../../boost/program_options/variables_map.hpp:69: instantiated from ‘const T& boost::program_options::variable_value::as() const [with T = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]’ src/quickbook.cpp:438: instantiated from here ../../boost/any.hpp:292: error: forming reference to reference type ‘const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&’ ../../boost/any.hpp:294: error: forming reference to reference type ‘const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&’ ../../boost/system/error_code.hpp: At global scope: ../../boost/system/error_code.hpp:222: warning: ‘boost::system::posix_category’ defined but not used ../../boost/system/error_code.hpp:223: warning: ‘boost::system::errno_ecat’ defined but not used ../../boost/system/error_code.hpp:224: warning: ‘boost::system::native_ecat’ defined but not used "g++" -ftemplate-depth-300 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -g0 -DBOOST_ALL_NO_LIB=1 -DBOOST_DETAIL_CONTAINER_FWD -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"../.." -c -o "../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/quickbook.o" "src/quickbook.cpp" ...failed darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/quickbook.o... ...skipped <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>quickbook for lack of <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>quickbook.o... ...skipped <p../../dist/bin>quickbook for lack of <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>quickbook... ...failed updating 1 target... ...skipped 2 targets... ===== Seems some of the std::any conformance changes broke for the GCC included in the Xcode 4.6.2. -- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
On 11 May 2013 19:25, Rene Rivera <grafikrobot@gmail.com> wrote:
Seems some of the std::any conformance changes broke for the GCC included in the Xcode 4.6.2.
The same error is seen with '--std=c++-98': http://www.boost.org/development/tests/trunk/developer/output/DebSidC++-boos... But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
2013/5/11 Daniel James <daniel@calamity.org.uk>:
On 11 May 2013 19:25, Rene Rivera <grafikrobot@gmail.com> wrote:
Seems some of the std::any conformance changes broke for the GCC included in the Xcode 4.6.2.
The same error is seen with '--std=c++-98':
http://www.boost.org/development/tests/trunk/developer/output/DebSidC++-boos...
But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
Committed fix in r84236 to trunk. Can you reproduce the error now? -- Best regards, Antony Polukhin
On Sat, May 11, 2013 at 2:44 PM, Antony Polukhin <antoshkka@gmail.com>wrote:
2013/5/11 Daniel James <daniel@calamity.org.uk>:
On 11 May 2013 19:25, Rene Rivera <grafikrobot@gmail.com> wrote:
Seems some of the std::any conformance changes broke for the GCC
included
in the Xcode 4.6.2.
The same error is seen with '--std=c++-98':
http://www.boost.org/development/tests/trunk/developer/output/DebSidC++-boos...
But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
IIRC.. Isn't it still one of the compilers we consider as a release requirement?
Committed fix in r84236 to trunk. Can you reproduce the error now?
Seems to be fixed now.. Thanks for the quick work! -- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
On 11 May 2013 21:18, Rene Rivera <grafikrobot@gmail.com> wrote:
But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
IIRC.. Isn't it still one of the compilers we consider as a release requirement?
Sorry, I meant specifically supported by quickbook, which isn't held to the same requirements as libraries. It doesn't have any official requirements, but practically, it needs to be possible to build it on all current development platforms. Clang support should be enough for OS X. The documentation build is actually done on a broken macbook (I can still ssh in), which is stuck on Leopard, but I build using macports gcc. But regardless, there's no specific version of any compiler which is a release requirement. Libraries are required to be portable to at least two popular operating systems (effectively windows and things that resemble unix). GCC 4.2 used to be required for OS X, but clang support is probably enough nowadays. Although, a library such as Boost.Any effectively has stricter requirements since other libraries rely on it. And in this case, there was also a problem with later compilers in C++98 mode.
On 11/05/13 21:14, Daniel James wrote:
On 11 May 2013 19:25, Rene Rivera <grafikrobot@gmail.com> wrote:
Seems some of the std::any conformance changes broke for the GCC included in the Xcode 4.6.2.
The same error is seen with '--std=c++-98':
http://www.boost.org/development/tests/trunk/developer/output/DebSidC++-boos...
But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
Regardless of whether GCC 4.2 should be supported or not, in C++03 T& is invalid if T is already a reference. It's a good thing that GCC 4.2 could catch this issue.
On 13 May 2013 11:01, Mathias Gaunard <mathias.gaunard@ens-lyon.org> wrote:
On 11/05/13 21:14, Daniel James wrote:
But regardless, I'm not sure how well gcc 4.2 will be supported in the future. It's a pretty old compiler.
Regardless of whether GCC 4.2 should be supported or not, in C++03 T& is invalid if T is already a reference.
Nobody was suggesting it was an incorrect error. And I've already pointed out, I was referring to quickbook.
participants (4)
-
Antony Polukhin
-
Daniel James
-
Mathias Gaunard
-
Rene Rivera