#113 Intel compiler build fails in op_regexp.cpp

closed-fixed
nobody
None
5
2004-05-07
2003-11-20
Anonymous
No

building oprofile I’ve got a message from Intel
compiler:

make[3]: Entering directory
`/mnt/sdb1/users/vsysoltx/tc_6/oprofile-0.7.1/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 -
Wall -fno-common -ftemplate-depth-50 -g -O2 -c -o
op_regex.o `test -f 'op_regex.cpp' ||
echo './'`op_regex.cpp
source='demangle_symbol.cpp'
object='demangle_symbol.o' libtool=no \ depfile='.deps/demangle_symbol.Po'
tmpdepfile='.deps/demangle_symbol.TPo' \ depmode=gcc3 /bin/sh ../depcomp \ icpc -DHAVE_CONFIG_H -I. -I. -I.. -I ../libutil++ -W -
Wall -fno-common -ftemplate-depth-50 -g -O2 -c -o
demangle_symbol.o `test -f 'demangle_symbol.cpp' ||
echo './'`demangle_symbol.cpp
icpc: Command line remark: option '-W' not supported
icpc: Command line warning: ignoring unknown option '-
ftemplate-depth-50'
icpc: Command line remark: option '-MP' not supported
icpc: Command line remark: option '-W' not supported
icpc: Command line warning: ignoring unknown option '-
ftemplate-depth-50'
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_exception(pattern)
^

compilation aborted for op_regex.cpp (code 2)

There is probably 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).

How reproducible:
always

Steps to Reproduce:
1. Get Intel compiler (better 8.0) anywhere
2. add options "-cxxlib-gcc -w" to compiler configuration
file (use libstdc++ installed instead Dinkumware STL
library; don't emit warnings)
2. configure oprofile
3. make CXX=icpc

Actual results:
Compile-time error

Expected results:
no compile-time errors

// If you've got problems configuring Intel compiler for
libstdc++ configuration, declare GXX_INCLUDE to the
path where g++ headers resides (/usr/include/c++/3.2.3
for Enterprise Linux, /usr/include/c++/3.2 for Red Hat).

Discussion

  • Logged In: NO

    "just a typo" I'd like to say in header but tracker cut it.

     
  • Logged In: YES
    user_id=802824

    I should have login submitting this, yeah..

     
  • Logged In: YES
    user_id=802824

    Could you please add me to CC list now if there is one ??
    Otherwise I won't receive any notification..

     
  • John Levon
    John Levon
    2003-11-20

    Logged In: YES
    user_id=53034

    Fixed in CVS

     
  • John Levon
    John Levon
    2003-11-20

    • summary: SRPMS: deprecated construct is used in source – probably jus --> Intel compiler build fails in op_regexp.cpp
    • status: open --> open-fixed
     
  • John Levon
    John Levon
    2004-05-07

    • status: open-fixed --> closed-fixed