Description of problem: trying âmake checkâ in oprofile source root Iâve got a message from my compiler: Making check in libregex make[1]: Entering directory `/mnt/sdb1/users/vsysoltx/tc_8/WORK_DIR/BUILD/oprofile- 0.5.4/libregex' source='op_regex.cpp' object='op_regex.o' libtool=no \ depfile='.deps/op_regex.Po' tmpdepfile='.deps/op_regex.TPo' \ depmode=gcc3 /bin/sh ../depcomp \ icpc -DHAVE_CONFIG_H -I. -I. -I.. -I ../libutil++ -W -fno-common -g - O2 -c -o op_regex.o `test -f 'op_regex.cpp' || echo './'`op_regex.cpp icpc: Command line remark: option '-W' not supported icpc: Command line remark: option '-MP' not supported op_regex.cpp(26): error: overloaded function "bad_regex::bad_regex" cannot be defined in the current scope bad_regex::bad_regex(string const & pattern) ^ op_regex.cpp(27): error: expected a "{" : ^ op_regex.cpp(286): warning #175: subscript out of range throw bad_regex("invalid input file: " + ^ op_regex.cpp(294): warning #175: subscript out of range + '"' + line + '"'); ^ op_regex.cpp(305): warning #175: subscript out of range throw bad_regex("invalid input file: " + ^ compilation aborted for op_regex.cpp (code 2) There is a typo in sources I believe: bad_regex:: bad_regex is declared in global namespace in op_regex.h but defined in unnamed namespace in op_regex.cpp. Itâs definition should be moved out of the unnamed namespace (as regular_expression_replace members are defined outside of this namespace later in the file). Here is the patch for this move: --- libregex/op_regex.cpp.orig 2003-11-19 11:57:03.000000000 +0300 +++ libregex/op_regex.cpp 2003-11-19 12:23:42.000000000 +0300 @@ -21,14 +21,13 @@ using namespace std; -namespace { - bad_regex::bad_regex(string const & pattern) : op_exception(pattern) { } +namespace { string op_regerror(int err, regex_t const & regexp) { By using standart/accustomed language constructs oprofile would get more portability between platforms/compiler so please consider applying this patch despite there is no error emitted with current version of g++ (3.2.3). Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Get Intel compiler (better 8.0) anywhere 2. do 'rpm -bc' using any compiler 3. try 'make check' in source root using Intel compiler: make check CXX=icpc Actual results: Compile-time error Expected results: no compile-time errors Additional info:
What should be done is check the problem is still in the latest development versions of oprofile available on http://oprofile.sourceforge.net/ and submit a patch for it upstream.
Reported upstream http://sourceforge.net/tracker/index.php? func=detail&aid=845616&group_id=16191&atid=116191 The resolution is to be changed to "reported upstream" as well. By the way, not deprecating the sources only gcc can compile (actually due to bug I believe) you stimulate the uniqueness (and therefore some kind of monopoly) of g++, restricting the use of another compiler; this is action NOT in spite of OPEN development environment for that Linux is so loved - this is my is personal opinion.