IBM Support

C++ instrumentor reports errors when using the include string with GNU 4.2.x and 4.3.x

Troubleshooting


Problem

The Rational Test RealTime (RTRT) C++ instrumentor reports errors when using the include "string" with GNU 4.2.x and 4.3.x

Symptom

When instrumenting a file including the include file "string" the following error is displayed. This occurs on a RedHat and SuSE 11 Linux.

TestRT attolccp: "/usr/include/c++/4.3/bits/basic_string.h",line 2462: error #304:
      no instance of overloaded function "std::getline" matches the argument list
            argument types are: (std::basic_istream< char, std::char_traits<
                  char> > , std::basic_string< char, std::char_traits< char>
                  , std::allocator< char> > , <error-type>)
      { return getline(__is, __str, __is.widen('\n')); }
              ^
      detected during instantiation of "std::basic_istream< _CharT, _Traits>
              &std::getline(std::basic_istream< _CharT, _Traits>  &,
              std::basic_string< _CharT, _Traits, _Alloc>  &) [with
              _CharT=char, _Traits=std::char_traits< char> ,
              _Alloc=std::allocator< char> ]"



Another instance of this problem:

$ attolcc -- i586-wrs-linux-gnu-x86_64-glibc_std-g++ -c t20.cc
#>#Perl Script Command Line (4 args):
# attolcc [--] [i586-wrs-linux-gnu-x86_64-glibc_std-g++] [-c] [t20.cc]

#     ATLTGT     = /project/packet_rbos_dev/pkt/sw/tools/testrt/targets/cx86_64-linux-gcc

#     TESTRTDIR  = /scratch/TestRealTime.7.5.0.0
TestRT-I-STARTEXEC, Rational(R) Test RealTime instrumentation driver 7.5.0.3
TestRT-I-COPYRIGHT, Copyright(C) 1996-2010 Rational Software Corporation.
>preprocessing of t20.cc to t20.i
>instrumentation of t20.i to t20_aug.cc
TestRT attolccp:
"/tools/swdev/packages/rbnlinux/wr30_gnu-4.3.2-2/x86/x86-linux2/bin/../lib/gcc/i586-wrs-linux-gnu/4.3.2/../../../../i586-wrs-linux-gnu/include/c
++/4.3.2/bits/basic_string.h",line
2462: error #70: incomplete type is not allowed
      { return getline(__is, __str, __is.widen('\n')); }
                                    ^
detected during instantiation of "std::basic_istream< _CharT,_Traits>&std::getline(std::basic_istream< _CharT, _Traits> &, std::basic_string< _CharT, _Traits, _Alloc> &) [with _CharT=char, _Traits=std::char_traits< char> , _Alloc=std::allocator< char> ]"

TestRT attolccp:
"/tools/swdev/packages/rbnlinux/wr30_gnu-4.3.2-2/x86/x86-linux2/bin/../lib/gcc/i586-wrs-linux-gnu/4.3.2/../../../../i586-wrs-linux-gnu/include/c
++/4.3.2/bits/basic_string.h",line
2462: error #304: no instance of overloaded function "std::getline" matches the argument list
argument types are: (std::basic_istream< char,std::char_traits<char> > , std::basic_string< char, std::char_traits<char>, std::allocator< char> > , <error-type>)

       { return getline(__is, __str, __is.widen('\n')); }
               ^
detected during instantiation of "std::basic_istream< _CharT,_Traits>&std::getline(std::basic_istream< _CharT, _Traits> &,std::basic_string< _CharT, _Traits, _Alloc> &) [with _CharT=char, _Traits=std::char_traits< char> , _Alloc=std::allocator< char> ]"

TestRT attolccp:
"/tools/swdev/packages/rbnlinux/wr30_gnu-4.3.2-2/x86/x86-linux2/bin/../lib/gcc/i586-wrs-linux-gnu/4.3.2/../../../../i586-wrs-linux-gnu/include/c++/4.3.2/bits/basic_string.h",line 2462: error #70:
incomplete type is not allowed
      { return getline(__is, __str, __is.widen('\n')); }
                                    ^
detected during instantiation of "std::basic_istream< _CharT,_Traits>&std::getline(std::basic_istream< _CharT, _Traits> &,std::basic_string< _CharT, _Traits, _Alloc> &) [with _CharT=wchar_t, _Traits=std::char_traits< wchar_t> , _Alloc=std::allocator< wchar_t> ]"

TestRT attolccp:
"/tools/swdev/packages/rbnlinux/wr30_gnu-4.3.2-2/x86/x86-linux2/bin/../lib/gcc/i586-wrs-linux-gnu/4.3.2/../../../../i586-wrs-linux-gnu/include/c++/4.3.2/bits/basic_string.h",line 2462: error #304:no instance of overloaded function "std::getline" matches the argument list
argument types are: (std::basic_istream< wchar_t,std::char_traits< wchar_t> > , std::basic_string<wchar_t,std::char_traits< wchar_t> , std::allocator<wchar_t> > ,<error-type>)
      { return getline(__is, __str, __is.widen('\n')); }
               ^
detected during instantiation of "std::basic_istream< _CharT,_Traits>&std::getline(std::basic_istream< _CharT, _Traits> &,std::basic_string< _CharT, _Traits, _Alloc> &) [with_CharT=wchar_t, _Traits=std::char_traits< wchar_t> ,_Alloc=std::allocator< wchar_t> ]"

TestRT attolccp - FATAL ERROR: Syntax and/or semantic errors in source file, instrumentation cancelled
status 7
TestRT attolcc - The following command-line caused an error /scratch/TestRealTime.7.5.0.0/bin/intel/linux_redhat/TestRTperl
-I/scratch/6/davidoff/TestRealTime.7.5.0.0/lib/perl /scratch/TestRealTime.7.5.0.0/lib/scripts/attolcc.pl --
i586-wrs-linux-gnu-x86_64-glibc_std-g++ -c t20.cc
$

[{"Product":{"code":"SSSHUF","label":"Rational Test RealTime"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Runtime Analysis: C++","Platform":[{"code":"PF016","label":"Linux"}],"Version":"7.5;7.5.0.1;7.5.0.2;7.5.0.3;7.5.0.4","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
Rational Test RealTime

Software version:
7.5, 7.5.0.1, 7.5.0.2, 7.5.0.3, 7.5.0.4

Operating system(s):
Linux

Document number:
135441

Modified date:
16 June 2018

UID

swg21431581

Manage My Notification Subscriptions