Menu

Compiling for gcc 4.4.0 on Linux

Sean
2009-08-09
2013-06-03
  • Sean

    Sean - 2009-08-09

    I am unable to get any of the test or example programs to compile when checking out from HEAD. 

    Here's the output when I run bjam in libs/log/examples/xml_file:

    gcc.compile.c++ ../../../../bin.v2/libs/log/example/xml_file/gcc-4.4.0/debug/main.o
    In file included from ../../../../boost/log/formatters/c_decorator.hpp:34,        
                     from ../../../../boost/log/formatters.hpp:30,                    
                     from main.cpp:33:                                                
    ../../../../boost/log/formatters/char_decorator.hpp:75: error: ‘char_type’ was not declared in this scope                                                                                                  
    ../../../../boost/log/formatters/char_decorator.hpp:75: error: template argument 1 is invalid        
    ../../../../boost/log/formatters/char_decorator.hpp:75: error: template argument 2 is invalid        
    ../../../../boost/log/formatters/char_decorator.hpp:75: error: template argument 3 is invalid        
    In file included from ../../../../boost/log/formatters/c_decorator.hpp:34,                           
                     from ../../../../boost/log/formatters.hpp:30,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/formatters/char_decorator.hpp: In member function ‘void boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT>::operator()(typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::ostream_type&, const typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::record_type&) const’:
    ../../../../boost/log/formatters/char_decorator.hpp:152: error: conflicting declaration ‘boost::io::basic_ios_rdbuf_saver<typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::ostream_type::char_type, typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::ostream_type::traits_type> cleanup2’            
    ../../../../boost/log/formatters/char_decorator.hpp:149: error: ‘cleanup2’ has a previous declaration as ‘boost::log_mt_posix::aux::cleanup_guard<int> cleanup2’                                           
    In file included from ../../../../boost/log/formatters.hpp:30,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/formatters/c_decorator.hpp: At global scope:                                   
    ../../../../boost/log/formatters/c_decorator.hpp:168: error: ‘char_type’ was not declared in this scope                                                                                                    
    ../../../../boost/log/formatters/c_decorator.hpp:168: error: template argument 1 is invalid          
    ../../../../boost/log/formatters/c_decorator.hpp:168: error: template argument 2 is invalid          
    ../../../../boost/log/formatters/c_decorator.hpp:168: error: template argument 3 is invalid          
    ../../../../boost/log/formatters/c_decorator.hpp:175: error: ‘char_type’ was not declared in this scope                                                                                                    
    ../../../../boost/log/formatters/c_decorator.hpp:175: error: template argument 1 is invalid          
    ../../../../boost/log/formatters/c_decorator.hpp: In constructor ‘boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT>::fmt_c_ascii_decorator(const FormatterT&)’:                           
    ../../../../boost/log/formatters/c_decorator.hpp:190: error: ‘traits_t’ is not a class or namespace  
    ../../../../boost/log/formatters/c_decorator.hpp:190: error: ‘traits_t’ is not a class or namespace  
    In file included from ../../../../boost/log/formatters.hpp:30,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/formatters/c_decorator.hpp: In member function ‘void boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT>::operator()(typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT> >::ostream_type&, const typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT> >::record_type&) const’:                                                                                               
    ../../../../boost/log/formatters/c_decorator.hpp:216: error: conflicting declaration ‘boost::io::basic_ios_rdbuf_saver<typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT> >::ostream_type::char_type, typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_c_ascii_decorator<FormatterT> >::ostream_type::traits_type> cleanup2’         
    ../../../../boost/log/formatters/c_decorator.hpp:213: error: ‘cleanup2’ has a previous declaration as ‘boost::log_mt_posix::aux::cleanup_guard<int> cleanup2’                                              
    ../../../../boost/log/formatters/c_decorator.hpp:224: error: ‘char_type’ was not declared in this scope                                                                                                    
    ../../../../boost/log/formatters/c_decorator.hpp:224: error: expected ‘;’ before ‘c’                 
    ../../../../boost/log/formatters/c_decorator.hpp:225: error: ‘c’ was not declared in this scope      
    ../../../../boost/log/formatters/c_decorator.hpp:227: error: expected ‘;’ before ‘buf’               
    ../../../../boost/log/formatters/c_decorator.hpp:228: error: ‘traits_t’ is not a class or namespace  
    ../../../../boost/log/formatters/c_decorator.hpp:228: error: ‘buf’ was not declared in this scope    
    main.cpp: In function ‘int main(int, char**)’:                                                       
    main.cpp:60: error: ‘class boost::log_mt_posix::sinks::basic_text_file_backend<char>’ has no member named ‘file_collector’                                                                                 
    main.cpp:60: error: ‘fifo_collector’ is not a member of ‘boost::log_mt_posix::sinks::file’           
    main.cpp:64: error: ‘scan_method’ is not a member of ‘keywords’                                      
    main.cpp:75: error: ‘class boost::log_mt_posix::sinks::basic_text_file_backend<char>’ has no member named ‘open_handler’                                                                                   
    main.cpp:76: error: ‘class boost::log_mt_posix::sinks::basic_text_file_backend<char>’ has no member named ‘close_handler’                                                                                  
    In file included from ../../../../boost/log/formatters/c_decorator.hpp:34,                           
                     from ../../../../boost/log/formatters.hpp:30,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/formatters/char_decorator.hpp: In constructor ‘boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT>::fmt_char_decorator(const FormatterT&, const RangeT1&, const RangeT2&) [with RangeT1 = boost::iterator_range<const char* const*>, RangeT2 = boost::iterator_range<const char* const*>, FormatterT = boost::log_mt_posix::formatters::fmt_message<char>]’:                         
    ../../../../boost/log/formatters/xml_decorator.hpp:72:   instantiated from ‘boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> boost::log_mt_posix::formatters::aux::fmt_xml_decorator_gen::operator[](const FormatterT&) const [with FormatterT = boost::log_mt_posix::formatters::fmt_message<char>]’                                                                                                   
    main.cpp:71:   instantiated from here                                                                
    ../../../../boost/log/formatters/char_decorator.hpp:113: error: cannot convert ‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ to ‘int’ in initialization                         
    In file included from ../../../../boost/log/formatters/c_decorator.hpp:34,                           
                     from ../../../../boost/log/formatters.hpp:30,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/formatters/char_decorator.hpp: In copy constructor ‘boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT>::fmt_char_decorator(const boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT>&) [with FormatterT = boost::log_mt_posix::formatters::fmt_message<char>]’:   
    ../../../../boost/log/formatters/xml_decorator.hpp:72:   instantiated from ‘boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> boost::log_mt_posix::formatters::aux::fmt_xml_decorator_gen::operator[](const FormatterT&) const [with FormatterT = boost::log_mt_posix::formatters::fmt_message<char>]’                                                                                                   
    main.cpp:71:   instantiated from here                                                                
    ../../../../boost/log/formatters/char_decorator.hpp:135: error: cannot convert ‘std::basic_string<char, std::char_traits<char>, std::allocator<char> >’ to ‘int’ in initialization                         
    In file included from ../../../../boost/log/formatters/attr.hpp:29,                                  
                     from ../../../../boost/log/formatters.hpp:29,                                       
                     from main.cpp:33:                                                                   
    ../../../../boost/log/detail/cleanup_scope_guard.hpp: In destructor ‘boost::log_mt_posix::aux::cleanup_guard<T>::~cleanup_guard() [with T = int]’:                                                         
    ../../../../boost/log/formatters/char_decorator.hpp:149:   instantiated from ‘void boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT>::operator()(typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::ostream_type&, const typename boost::log_mt_posix::formatters::basic_formatter<typename FormatterT::char_type, boost::log_mt_posix::formatters::fmt_char_decorator<FormatterT> >::record_type&) const [with FormatterT = boost::log_mt_posix::formatters::fmt_message<char>]’                          
    ../../../../boost/function/function_template.hpp:152:   instantiated from ‘static void boost::detail::function::void_function_obj_invoker2<FunctionObj, R, T0, T1>::invoke(boost::detail::function::function_buffer&, T0, T1) [with FunctionObj = boost::log_mt_posix::formatters::fmt_char_decorator<boost::log_mt_posix::formatters::fmt_message<char> >, R = void, T0 = std::basic_ostream<char, std::char_traits<char> >&, T1 = const boost::log_mt_posix::basic_record<char>&]’                                         
    ../../../../boost/function/function_template.hpp:904:   instantiated from ‘void boost::function2<R, T1, T2>::assign_to(Functor) [with Functor = boost::log_mt_posix::formatters::fmt_char_decorator<boost::log_mt_posix::formatters::fmt_message<char> >, R = void, T0 = std::basic_ostream<char, std::char_traits<char> >&, T1 = const boost::log_mt_posix::basic_record<char>&]’
    ../../../../boost/function/function_template.hpp:720:   instantiated from ‘boost::function2<R, T1, T2>::function2(Functor, typename boost::enable_if_c<boost::type_traits::ice_not::value, int>::type) [with Functor = boost::log_mt_posix::formatters::fmt_char_decorator<boost::log_mt_posix::formatters::fmt_message<char> >, R = void, T0 = std::basic_ostream<char, std::char_traits<char> >&, T1 = const boost::log_mt_posix::basic_record<char>&]’
    ../../../../boost/log/formatters/format.hpp:149:   instantiated from ‘boost::log_mt_posix::formatters::fmt_format<typename boost::log_mt_posix::formatters::basic_formatter<CharT, boost::log_mt_posix::formatters::fmt_format<CharT> >::char_type>& boost::log_mt_posix::formatters::fmt_format<CharT>::operator%(const T&) [with T = boost::log_mt_posix::formatters::fmt_char_decorator<boost::log_mt_posix::formatters::fmt_message<char> >, CharT = char]’
    main.cpp:71:   instantiated from here
    ../../../../boost/log/detail/cleanup_scope_guard.hpp:35: error: request for member ‘clear’ in ‘((boost::log_mt_posix::aux::cleanup_guard<int>*)this)->boost::log_mt_posix::aux::cleanup_guard<int>::m_Obj’, which is of non-class type ‘int’
    ../../../../boost/system/error_code.hpp: At global scope:
    ../../../../boost/system/error_code.hpp:205: warning: ‘boost::system::system_category’ defined but not used
    ../../../../boost/system/error_code.hpp:206: warning: ‘boost::system::generic_category’ defined but not used
    ../../../../boost/system/error_code.hpp:211: warning: ‘boost::system::posix_category’ defined but not used
    ../../../../boost/system/error_code.hpp:212: warning: ‘boost::system::errno_ecat’ defined but not used
    ../../../../boost/system/error_code.hpp:213: warning: ‘boost::system::native_ecat’ defined but not used

        "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DDATE_TIME_INLINE  -I"../../../.." -c -o "../../../../bin.v2/libs/log/example/xml_file/gcc-4.4.0/debug/main.o" "main.cpp"

    ...failed gcc.compile.c++ ../../../../bin.v2/libs/log/example/xml_file/gcc-4.4.0/debug/main.o...
    ...skipped <p../../../../bin.v2/libs/log/example/xml_file/gcc-4.4.0/debug>xml_file for lack of <p../../../../bin.v2/libs/log/example/xml_file/gcc-4.4.0/debug>main.o...
    ...failed updating 1 target...
    ...skipped 1 target...

     
    • Andrey Semashev

      Andrey Semashev - 2009-08-16

      The examples were somewhat outdated. It should be fixed now.

       
    • Sean

      Sean - 2009-08-17

      Thanks.  Everything builds now.

       

Log in to post a comment.