Boost C++ Libraries: Ticket #9399: Can't build 1.55.0 release with GCC 4.x and -std=c++0x https://svn.boost.org/trac10/ticket/9399 <p> Hello, </p> <p> I cannot build boost 1.55.0 with GCC 4.5.4, nor GCC 4.8.2, and -std=c++0x on NetBSD, Solaris, nor OS X. It always stops on "error: no matching function for call to 'call_once(boost::once_flag&amp;, void (&amp;)())'". For example: </p> <pre class="wiki">gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.5.4/release/threading-multi/instantiate_cpp_grammar.o In file included from ./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:15:0, from ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:21, from ./boost/spirit/home/classic/core.hpp:42, from ./boost/spirit/include/classic_core.hpp:11, from ./boost/wave/grammars/cpp_grammar.hpp:14, from libs/wave/src/instantiate_cpp_grammar.cpp:24: ./boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp: In member function 'IdT boost::spirit::classic::impl::object_with_id_base&lt;TagT, IdT&gt;::acquire_object_id() [with TagT = boost::spirit::classic::impl::grammar_tag, IdT = long unsigned int]': ./boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp:78:62: instantiated from 'boost::spirit::classic::impl::object_with_id&lt;TagT, IdT&gt;::object_with_id() [with TagT = boost::spirit::classic::impl::grammar_tag, IdT = long unsigned int]' ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:51:15: instantiated from 'boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;::grammar() [with DerivedT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, ContextT = boost::spirit::classic::parser_context&lt;&gt;]' ./boost/wave/grammars/cpp_grammar.hpp:623:41: instantiated from 'boost::wave::grammars::cpp_grammar&lt;TokenT, ContainerT&gt;::cpp_grammar(bool&amp;, TokenT&amp;, ContainerT&amp;) [with TokenT = boost::wave::cpplexer::lex_token&lt;&gt;, ContainerT = std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt;]' ./boost/wave/grammars/cpp_grammar.hpp:738:91: instantiated from 'static boost::spirit::classic::tree_parse_info&lt;IteratorT&gt; boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::parse_cpp_grammar(const LexIteratorT&amp;, const LexIteratorT&amp;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::position_type&amp;, bool&amp;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::token_type&amp;, token_container_type&amp;) [with LexIteratorT = boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, TokenContainerT = std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::position_type = boost::wave::util::file_position&lt;boost::wave::util::flex_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt;, boost::wave::util::CowString&lt;boost::wave::util::AllocatorStringStorage&lt;char&gt; &gt; &gt; &gt;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::token_type = boost::wave::cpplexer::lex_token&lt;&gt;, token_container_type = std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt;]' libs/wave/src/instantiate_cpp_grammar.cpp:48:40: instantiated from here ./boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp:140:17: error: no matching function for call to 'call_once(boost::once_flag&amp;, void (&amp;)())' In file included from ./boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp:18:0, from ./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:15, from ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:21, from ./boost/spirit/home/classic/core.hpp:42, from ./boost/spirit/include/classic_core.hpp:11, from ./boost/wave/grammars/cpp_grammar.hpp:14, from libs/wave/src/instantiate_cpp_grammar.cpp:24: ./boost/thread/once.hpp: In function 'void boost::call_once(Function, boost::once_flag&amp;) [with Function = void (*)()]': ./boost/spirit/home/classic/core/non_terminal/impl/static.hpp:72:13: instantiated from 'boost::spirit::classic::static_&lt;T, Tag&gt;::static_(Tag) [with T = boost::thread_specific_ptr&lt;boost::weak_ptr&lt;boost::spirit::classic::impl::grammar_helper&lt;boost::spirit::classic::grammar&lt;boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, boost::spirit::classic::parser_context&lt;&gt; &gt;, boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt; &gt; &gt; &gt;, Tag = boost::spirit::classic::impl::get_definition_static_data_tag]' ./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:241:81: instantiated from 'typename DerivedT::definition&lt;ScannerT&gt;&amp; boost::spirit::classic::impl::get_definition(const boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;*) [with DerivedT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, ContextT = boost::spirit::classic::parser_context&lt;&gt;, ScannerT = boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt;, typename DerivedT::definition&lt;ScannerT&gt; = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;::definition&lt;boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt; &gt;]' ./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:296:78: instantiated from 'typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type boost::spirit::classic::impl::grammar_parser_parse(const boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;*, const ScannerT&amp;) [with int N = 0, DerivedT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, ContextT = boost::spirit::classic::parser_context&lt;&gt;, ScannerT = boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt;, typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type = boost::spirit::classic::tree_match&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;]' ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:57:54: instantiated from 'typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;::parse_main(const ScannerT&amp;) const [with ScannerT = boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt;, DerivedT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, ContextT = boost::spirit::classic::parser_context&lt;&gt;, typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type = boost::spirit::classic::tree_match&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;]' ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:65:9: instantiated from 'typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;::parse(const ScannerT&amp;) const [with ScannerT = boost::spirit::classic::scanner&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::scanner_policies&lt;boost::spirit::classic::iteration_policy, boost::spirit::classic::pt_match_policy&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;, boost::spirit::classic::action_policy&gt; &gt;, DerivedT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;, ContextT = boost::spirit::classic::parser_context&lt;&gt;, typename boost::spirit::classic::parser_result&lt;boost::spirit::classic::grammar&lt;DerivedT, ContextT&gt;, ScannerT&gt;::type = boost::spirit::classic::tree_match&lt;boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, boost::spirit::classic::nil_t&gt;]' ./boost/wave/grammars/cpp_grammar.hpp:706:69: instantiated from 'boost::spirit::classic::tree_parse_info&lt;IteratorT, NodeFactoryT&gt; boost::wave::grammars::parsetree_parse(const IteratorT&amp;, const IteratorT&amp;, const boost::spirit::classic::parser&lt;SkipT&gt;&amp;) [with NodeFactoryT = boost::spirit::classic::node_val_data_factory&lt;boost::spirit::classic::nil_t&gt;, IteratorT = boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, ParserT = boost::wave::grammars::cpp_grammar&lt;boost::wave::cpplexer::lex_token&lt;&gt;, std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt; &gt;]' ./boost/wave/grammars/cpp_grammar.hpp:740:58: instantiated from 'static boost::spirit::classic::tree_parse_info&lt;IteratorT&gt; boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::parse_cpp_grammar(const LexIteratorT&amp;, const LexIteratorT&amp;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::position_type&amp;, bool&amp;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::token_type&amp;, token_container_type&amp;) [with LexIteratorT = boost::wave::cpplexer::lex_iterator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt;, TokenContainerT = std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::position_type = boost::wave::util::file_position&lt;boost::wave::util::flex_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt;, boost::wave::util::CowString&lt;boost::wave::util::AllocatorStringStorage&lt;char&gt; &gt; &gt; &gt;, boost::wave::grammars::cpp_grammar_gen&lt;LexIteratorT, TokenContainerT&gt;::token_type = boost::wave::cpplexer::lex_token&lt;&gt;, token_container_type = std::list&lt;boost::wave::cpplexer::lex_token&lt;&gt;, boost::fast_pool_allocator&lt;boost::wave::cpplexer::lex_token&lt;&gt; &gt; &gt;]' libs/wave/src/instantiate_cpp_grammar.cpp:48:40: instantiated from here ./boost/thread/once.hpp:38:9: error: no matching function for call to 'call_once(boost::once_flag&amp;, void (*&amp;)())' ./boost/system/error_code.hpp: At global scope: ./boost/system/error_code.hpp:222:36: warning: 'boost::system::posix_category' defined but not used ./boost/system/error_code.hpp:223:36: warning: 'boost::system::errno_ecat' defined but not used ./boost/system/error_code.hpp:224:36: warning: 'boost::system::native_ecat' defined but not used "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -std=c++0x -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/wave/build/gcc-4.5.4/release/threading-multi/instantiate_cpp_grammar.o" "libs/wave/src/instantiate_cpp_grammar.cpp" </pre><p> With Clang, the release builds fine. Using -std=c++98 and GCC it also builds fine. </p> <p> Please, advise, </p> <p> Adam </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9399 Trac 1.4.3 anonymous Wed, 20 Nov 2013 19:47:45 GMT <link>https://svn.boost.org/trac10/ticket/9399#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9399#comment:1</guid> <description> <p> Seems like passing cxxflags=-std=c++0x to 'bjam' is not enough: -std= flag must also be added to CXXFLAGS. Otherwise the build fails as mentioned above. </p> <p> Kind regards, Adam </p> </description> <category>Ticket</category> </item> </channel> </rss>