Skip to content

build errors with g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 #20

Description

@ClausKlein
Making all in framework
  CXX      nodeBooter-nodebooter.o
  CXX      libossiedomain_la-CorbaGC.lo
  CXX      libossiedomain_la-File_impl.lo
  CXX      libossiedomain_la-FileManager_impl.lo
  CXX      libossiedomain_la-FileSystem_impl.lo
  CXX      libossiedomain_la-helperFunctions.lo
  CXX      libossiedomain_la-POACreator.lo
  CXX      libossiedomain_la-prop_utils.lo
In file included from ../include/ossie/Properties.h:34,
                 from nodebooter.cpp:49:
nodebooter.cpp: In function ‘void loadPRFExecParams(const string&, ExecParams&)’:
nodebooter.cpp:146:59: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’})
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
      |                                                           ^~ ~~~~~~~~~
      |                                                              |
      |                                                              std::ifstream {aka std::basic_ifstream<char>}
../../base/include/ossie/debug.h:76:14: note: in definition of macro ‘_RH_LOG’
   76 |     _msg <<  msg;                \
      |              ^~~
nodebooter.cpp:146:9: note: in expansion of macro ‘LOG_ERROR’
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
      |         ^~~~~~~~~
nodebooter.cpp:146:59: note: candidate: ‘operator<<(int, int)’ <built-in>
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
../../base/include/ossie/debug.h:76:14: note: in definition of macro ‘_RH_LOG’
   76 |     _msg <<  msg;                \
      |              ^~~
nodebooter.cpp:146:9: note: in expansion of macro ‘LOG_ERROR’
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
      |         ^~~~~~~~~
nodebooter.cpp:146:59: note:   no known conversion for argument 2 from ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘int’
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
../../base/include/ossie/debug.h:76:14: note: in definition of macro ‘_RH_LOG’
   76 |     _msg <<  msg;                \
      |              ^~~
nodebooter.cpp:146:9: note: in expansion of macro ‘LOG_ERROR’
  146 |         LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
      |         ^~~~~~~~~
In file included from /usr/include/c++/9/iostream:39,
                 from nodebooter.cpp:21:

# ....
Making all in sdr/dev/devices/GPP/cpp
  CXX      GPP-GPP.o
GPP.cpp: In member function ‘void GPP_i::update_grp_child_pids()’:
GPP.cpp:607:44: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::stringstream’ {aka ‘std::__cxx11::basic_stringstream<char>’})
  607 |                 errstr << "Unable to read "<<stat_filename<<". The process is no longer there";
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                        |                     |
      |                        |                     std::stringstream {aka std::__cxx11::basic_stringstream<char>}
      |                        std::basic_ostream<char>
GPP.cpp:607:44: note: candidate: ‘operator<<(int, int)’ <built-in>
  607 |                 errstr << "Unable to read "<<stat_filename<<". The process is no longer there";
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
GPP.cpp:607:44: note:   no known conversion for argument 2 from ‘std::stringstream’ {aka ‘std::__cxx11::basic_stringstream<char>’} to ‘int’
In file included from /usr/include/c++/9/iostream:39,
                 from GPP.cpp:28:
# ...

Activity

  1. ClausKlein commented on Nov 19, 2021

    @ClausKlein
    Author

    this patch helps:

    $ git diff control/
    diff --git a/redhawk/src/control/framework/nodebooter.cpp b/redhawk/src/control/framework/nodebooter.cpp
    index c61fb2cf..8d756ff4 100644
    --- a/redhawk/src/control/framework/nodebooter.cpp
    +++ b/redhawk/src/control/framework/nodebooter.cpp
    @@ -143,7 +143,7 @@ void loadPRFExecParams (const std::string& prfFile, ExecParams& execParams)
             prf.load(prfStream);
         } catch (const ossie::parser_error& ex) {
             std::string parser_error_line = ossie::retrieveParserErrorLineNumber(ex.what());
    -        LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream<< ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
    +        LOG_ERROR(nodebooter, "Failed to parse PRF file " << prfStream.rdbuf() << ". " << parser_error_line << "The XML parser returned the following error: " << ex.what());
             exit(EXIT_FAILURE);
         }
         prfStream.close();
    diff --git a/redhawk/src/control/sdr/dommgr/ApplicationFactory_impl.cpp b/redhawk/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
    index 9ca373a7..d596e54e 100644
    --- a/redhawk/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
    +++ b/redhawk/src/control/sdr/dommgr/ApplicationFactory_impl.cpp
    @@ -2112,7 +2112,7 @@ void createHelper::loadAndExecuteContainers(const ContainerList& containers,
                     std::ostringstream message;
                     message << "container " << container->getIdentifier() << " was assigned to non-loadable device "
                             << device->identifier;
    -                RH_ERROR(_createHelperLog, message);
    +                RH_ERROR(_createHelperLog, message.str());
                     throw std::logic_error(message.str());
                 }
    
    @@ -2199,7 +2199,7 @@ void createHelper::loadAndExecuteComponents(const ComponentList& deployments,
                 std::ostringstream message;
                 message << "component " << component_id << " was assigned to non-loadable device "
                         << device->identifier;
    -            RH_ERROR(_createHelperLog, message);
    +            RH_ERROR(_createHelperLog, message.str());
                 throw std::logic_error(message.str());
             }
    
    @@ -2282,7 +2282,7 @@ void createHelper::loadAndExecuteShared(const ComponentList& deployments, const
                 std::ostringstream message;
                 message << "component " << component_id << " was assigned to non-loadable device "
                         << device->identifier;
    -            RH_ERROR(_createHelperLog, message);
    +            RH_ERROR(_createHelperLog, message.str());
                 throw std::logic_error(message.str());
             }
    
    diff --git a/redhawk/src/testing/sdr/dev/devices/GPP/cpp/GPP.cpp b/redhawk/src/testing/sdr/dev/devices/GPP/cpp/GPP.cpp
    index c4dfa784..cf4846e5 100644
    --- a/redhawk/src/testing/sdr/dev/devices/GPP/cpp/GPP.cpp
    +++ b/redhawk/src/testing/sdr/dev/devices/GPP/cpp/GPP.cpp
    @@ -604,7 +604,7 @@ void GPP_i::update_grp_child_pids() {
    
                 } catch ( ... ) {
                     std::stringstream errstr;
    -                errstr << "Unable to read "<<stat_filename<<". The process is no longer there";
    +                errstr << "Unable to read "<<stat_filename.str()<<". The process is no longer there";
                     LOG_DEBUG(GPP_i, __FUNCTION__ << ": " << errstr.str() );
                     continue;
                 }
    @@ -1745,8 +1745,7 @@ void GPP_i::set_resource_affinity( const CF::Properties& options, const pid_t rs
      {
    
        RH_DEBUG( redhawk::affinity::get_affinity_logger(), "Affinity Options....GPP/Resource: " << label() << "/" << rsc_name << " options" << options.length()  );
    -   boost::recursive_mutex::scoped_lock(load_execute_lock);
    -
    +   boost::recursive_mutex::scoped_lock lock(load_execute_lock);
    
        // check if we override incoming affinity requests...
        if ( affinity.force_override ) {
    $
  2. ClausKlein commented on Nov 22, 2021

    @ClausKlein
    Author

    see too #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions