As for the Workshop 6 compiler - it does look like a compiler bug. I don't
know if I mentioned, but we compiled it also on a new
compiler (on the same platform, ofcourse) and there were no errors.
If you'll take a look at the errors below (please don't be alarmed by the
long list - it's just long error messages...) you'll see that all the
errors are given for the same reason.
The errors I get compiling with Workshop 6 (on SunOS) are (sorry for the
long list...):
"../../..//boost/regex/v4/match_flags.hpp", line 91: Error: Cannot assign
int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 93: Error: Cannot assign
int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 95: Error: Cannot assign
int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/regex_grep.hpp", line 63: Error: Formal argument f
of type boost::regex_constants::_match_flags in call to
boost::re_detail::perl_matcher,
boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::setf(boost::regex_constants::_match_flags) is
being passed int.
"../src/cregex.cpp", line 263: Where: While instantiating
"boost::regex_grep>(boost::re_detail::pred1, const char*, const
char*, const boost::reg_expression>&,
boost::regex_constants::_match_flags)".
"../src/cregex.cpp", line 263: Where: Instantiated from non-template
code.
"../../..//boost/regex/v4/regex_grep.hpp", line 76: Error: Formal argument f
of type boost::regex_constants::_match_flags in call to
boost::re_detail::perl_matcher,
boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::unsetf(boost::regex_constants::_match_flags)
is being passed int.
"../src/cregex.cpp", line 263: Where: While instantiating
"boost::regex_grep>(boost::re_detail::pred1, const char*, const
char*, const boost::reg_expression>&,
boost::regex_constants::_match_flags)".
"../src/cregex.cpp", line 263: Where: Instantiated from non-template
code.
"../src/cregex.cpp", line 461: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../src/cregex.cpp", line 470: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 58: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: While
instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::perl_matcher(boost::re_detail::mapfile_iterat
or, boost::re_detail::mapfile_iterator,
boost::match_results, boost::detail::simple_alloc>>&, const boost::reg_expression>&, boost::regex_constants::_match_flags)".
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: Instantiated
from non-template code.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 60: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: While
instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::perl_matcher(boost::re_detail::mapfile_iterat
or, boost::re_detail::mapfile_iterator,
boost::match_results, boost::detail::simple_alloc>>&, const boost::reg_expression>&, boost::regex_constants::_match_flags)".
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: Instantiated
from non-template code.
"../src/posix_api.cpp", line 70: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../src/posix_api.cpp", line 173: Error: Cannot use int to initialize
boost::regex_constants::_match_flags.
"../src/posix_api.cpp", line 179: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../src/posix_api.cpp", line 181: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 60: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: While
instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::perl_matcher(boost::re_detail::mapfile_iterat
or, boost::re_detail::mapfile_iterator,
boost::match_results, boost::detail::simple_alloc>>&, const boost::reg_expression>&, boost::regex_constants::_match_flags)".
"../../..//boost/regex/v4/regex_grep.hpp", line 47: Where: Instantiated
from non-template code.
"../../..//boost/regex/v4/regex_format.hpp", line 398: Error: Could not find
a match for
boost::re_detail::_reg_format_aux(boost::re_detail::string_out_iterator>, const
boost::match_results,
boost::detail::simple_alloc>>, const char*, int, const
boost::regex_traits<char>).
"../../..//boost/regex/v4/regex_format.hpp", line 472: Where: While
instantiating
"boost::re_detail::_reg_format_aux>, const
char*, boost::detail::allocator_adapter,
boost::detail::simple_alloc>, char,
boost::regex_traits<char>>(boost::re_detail::string_out_iterator>, const
boost::match_results,
boost::detail::simple_alloc>>&, const char*&,
boost::regex_constants::_match_flags, const boost::regex_traits<char>&)".
"../../..//boost/regex/v4/regex_format.hpp", line 472: Where:
Instantiated from
boost::regex_replace>, const char*,
boost::regex_traits<char>, boost::detail::allocator_adapter,
char>(boost::re_detail::string_out_iterator>, const char*, const char*,
const boost::reg_expression>&, const
char*, boost::regex_constants::_match_flags).
"../src/cregex.cpp", line 462: Where: Instantiated from non-template
code.
"../../..//boost/regex/v4/regex_format.hpp", line 406: Error: Could not find
a match for
boost::re_detail::_reg_format_aux(boost::re_detail::string_out_iterator>, const
boost::match_results,
boost::detail::simple_alloc>>, const char*, int, const
boost::regex_traits<char>).
"../../..//boost/regex/v4/regex_format.hpp", line 472: Where: While
instantiating
"boost::re_detail::_reg_format_aux>, const
char*, boost::detail::allocator_adapter,
boost::detail::simple_alloc>, char,
boost::regex_traits<char>>(boost::re_detail::string_out_iterator>, const
boost::match_results,
boost::detail::simple_alloc>>&, const char*&,
boost::regex_constants::_match_flags, const boost::regex_traits<char>&)".
"../../..//boost/regex/v4/regex_format.hpp", line 472: Where:
Instantiated from
boost::regex_replace>, const char*,
boost::regex_traits<char>, boost::detail::allocator_adapter,
char>(boost::re_detail::string_out_iterator>, const char*, const char*,
const boost::reg_expression>&, const
char*, boost::regex_constants::_match_flags).
"../src/cregex.cpp", line 462: Where: Instantiated from non-template
code.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 203: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
While instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find_imp()".
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
Instantiated from
boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find().
"../../..//boost/regex/v4/regex_grep.hpp", line 49: Where: Instantiated
from non-template code.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 221: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
While instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find_imp()".
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
Instantiated from
boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find().
"../../..//boost/regex/v4/regex_grep.hpp", line 49: Where: Instantiated
from non-template code.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 221: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
While instantiating
"boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find_imp()".
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 167: Where:
Instantiated from
boost::re_detail::perl_matcher, boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::find().
"../../..//boost/regex/v4/regex_grep.hpp", line 49: Where: Instantiated
from non-template code.
CC -c -O2 -I../../../ -xarch=v9 -g -o
sunpro/libboost_regex/wide_posix_api.o ../src/wide_posix_api.cpp
"../src/wide_posix_api.cpp", line 78: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../src/wide_posix_api.cpp", line 181: Error: Cannot use int to initialize
boost::regex_constants::_match_flags.
"../src/wide_posix_api.cpp", line 187: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../src/wide_posix_api.cpp", line 189: Error: The operation
"boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 138: Error: The
operation "boost::regex_constants::_match_flags |= int" is illegal.
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 118: Where:
While instantiating "boost::re_detail::perl_matcher,
boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::match_imp()".
"../../..//boost/regex/v4/perl_matcher_common.hpp", line 118: Where:
Instantiated from boost::re_detail::perl_matcher,
boost::detail::simple_alloc>, boost::regex_traits<char>,
boost::detail::allocator_adapter>::match().
"../../..//boost/regex/v4/regex_match.hpp", line 51: Where: Instantiated
from boost::regex_match,
boost::detail::simple_alloc>, char, boost::regex_traits<char>,
boost::detail::allocator_adapter>(const
char*, const char*, boost::match_results,
boost::detail::simple_alloc>>&, const boost::reg_expression>&, boost::regex_constants::_match_flags).
"../src/cregex.cpp", line 219: Where: Instantiated from non-template
code.
As for the 64-bit issue:
In order to compile it I simply added the -xarch=v9 flag. Am I supposed to
add something else?
I run "regress ../tests.txt". And what I get is (again, sorry for the
massive data...)
Error in line 756 of file ../tests.txt
Expression: a
Search text: a a a aa
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
Error in line 757 of file ../tests.txt
Expression: a+b+
Search text: aabaabbb ab
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [3,3]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [3,3]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [3,3]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
Error in line 758 of file ../tests.txt
Expression: a(b*|c|e)d
Search text: adabbdacd
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [2,2]
class RegEx grep error in $`: found [4294967295,8589934590] expected [6,6]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [2,2]
class RegEx grep error in $`: found [4294967295,8589934590] expected [6,6]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [2,2]
class RegEx grep error in $`: found [4294967295,8589934590] expected [6,6]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
Error in line 759 of file ../tests.txt
Expression: a
Search text:
a
a
a
aa
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [9,9]
Error in line 761 of file ../tests.txt
Expression: ^
Search text:
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $': found [4294967295,8589934590] expected [10,10]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $': found [4294967295,8589934590] expected [10,10]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $': found [4294967295,8589934590] expected [10,10]
Error in line 762 of file ../tests.txt
Expression: ^ab
Search text: ab
ab ab
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
Error in line 763 of file ../tests.txt
Expression: ^[^\n]*\n
Search text:
Flags: REG_EXTENDED | REG_PERL | REG_AWK | REG_EGREP | REG_STARTEND | basic
| escape_in_lists | char_classes | intervals | bk_refs | perlex | normal |
basic | extended | perl | REG_GREP
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [4,4]
class RegEx grep error in $`: found [4294967295,8589934590] expected [7,7]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [4,4]
class RegEx grep error in $`: found [4294967295,8589934590] expected [7,7]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
class RegEx grep error in $`: found [4294967295,8589934590] expected [0,0]
class RegEx grep error in $`: found [4294967295,8589934590] expected [4,4]
class RegEx grep error in $`: found [4294967295,8589934590] expected [7,7]
class RegEx grep error in $`: found [4294967295,8589934590] expected [8,8]
class RegEx grep error in $': found [4294967295,8589934590] expected [11,11]
Error in line 764 of file ../tests.txt
Expression: \ wrote in message
news:01d001c44a1e$f32180f0$52f20352@fuji...
CC -c -O2 -I../../../ -o sunpro/libboost_regex/c_regex_traits.o
../src/c_regex_traits.cpp
"../../..//boost/regex/v4/match_flags.hpp", line 91: Error: Cannot
assign int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 93: Error: Cannot
assign int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 95: Error: Cannot
assign int to boost::regex_constants::_match_flags.
3 Error(s) detected.
That would be a compiler bug, please submit it such if you are able to, in
the mean time I will patch a workaround into the source.
[ Note - the reason it's a compiler bug, is that in the code:
inline match_flags& operator&=(match_flags& m1, match_flags m2)
{ m1 = m1&m2; return m1; }
The result of m1&m2 is type match_flags, and *not* int as the compiler
suggests, because of the earlier defined operator:
inline match_flags operator&(match_flags m1, match_flags m2)
{ return static_cast(static_castboost::int32_t(m1) &
static_castboost::int32_t(m2)); }
- end note ]
These are just a few. The rest of the errors occured for the same
reasons in various files. (If you want those too -
let me know).
Yes! I can't patch the source unless you give me all the available
information. Incidently it might be easiest to work around this by
including sunpro in the workaround above that reads:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) ||
BOOST_WORKAROUND(__BORLANDC__,
BOOST_TESTED_AT(0x564))
in match_flags.hpp
2. The aCC errors are (HP-IX):
aCC -o generic/boost_regex/cpp_regex_traits.o -c -Aa -AA +O2
-I../../../ -O ../src/cpp_regex_traits.cpp
Error 742: "../src/cpp_regex_traits.cpp", line 382 # Source type
const char *& and target type char * in a const_cast can only differ
in
their qualifiers
pmd->sbuf.pubsetbuf(const_cast(first),
static_caststd::streamsize(last-first));
I mistakingly wrote dynamic_cast in the original post, but I meant
const_cast. Sorry for the confusion.
Please notice that we had to add manually some flags to generic.mak
(which is the makefile we used to build it
on HP-IX). I'm aware of some example you gave in the html
documentation about compiling with aCC - but we still
had to change some flags. (I know these weren't formal settings and
just an example).
Is there any chance that there will be a HP-IX-special makefile? It
will make life much easier. :-)
If you want to provide one - I don't have access to that compiler.
3. I forgot to mension, that we managed to compile RegEX with SunOS C++
5.5
both in 32 & 64 bits. There were no errors, BUT
in 64 bits when we tried to run the rs/regress test - it failed
(something which didn't happen in the 32-bits version). There was
also a memory access violation, so even thought the compilation went
just
fine - apparently the library is
not fully 64-bit compatible.
What can we do to overcome this problem?
OK a couple of data points: the library is passing all it's tests with IBM
C++ on Itanium, so I would be surprised if this is 64-bit issue as such,
it's more likely to be a compiler or platform specific issue. As I asked
before what precisely is failing? What is the general protection fault?
Where in the code does it occur (stack trace?) and so on. I'm going to
need
a lot more information before I can make any suggestions, and probably
you're going to have to do some debugging as well...
John.
"John Maddock" wrote in message
news:01d001c44a1e$f32180f0$52f20352@fuji...
CC -c -O2 -I../../../ -o sunpro/libboost_regex/c_regex_traits.o
../src/c_regex_traits.cpp
"../../..//boost/regex/v4/match_flags.hpp", line 91: Error: Cannot
assign int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 93: Error: Cannot
assign int to boost::regex_constants::_match_flags.
"../../..//boost/regex/v4/match_flags.hpp", line 95: Error: Cannot
assign int to boost::regex_constants::_match_flags.
3 Error(s) detected.
That would be a compiler bug, please submit it such if you are able to, in
the mean time I will patch a workaround into the source.
[ Note - the reason it's a compiler bug, is that in the code:
inline match_flags& operator&=(match_flags& m1, match_flags m2)
{ m1 = m1&m2; return m1; }
The result of m1&m2 is type match_flags, and *not* int as the compiler
suggests, because of the earlier defined operator:
inline match_flags operator&(match_flags m1, match_flags m2)
{ return static_cast(static_castboost::int32_t(m1) &
static_castboost::int32_t(m2)); }
- end note ]
These are just a few. The rest of the errors occured for the same
reasons in various files. (If you want those too -
let me know).
Yes! I can't patch the source unless you give me all the available
information. Incidently it might be easiest to work around this by
including sunpro in the workaround above that reads:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) ||
BOOST_WORKAROUND(__BORLANDC__,
BOOST_TESTED_AT(0x564))
in match_flags.hpp
2. The aCC errors are (HP-IX):
aCC -o generic/boost_regex/cpp_regex_traits.o -c -Aa -AA +O2
-I../../../ -O ../src/cpp_regex_traits.cpp
Error 742: "../src/cpp_regex_traits.cpp", line 382 # Source type
const char *& and target type char * in a const_cast can only differ
in
their qualifiers
pmd->sbuf.pubsetbuf(const_cast(first),
static_caststd::streamsize(last-first));
I mistakingly wrote dynamic_cast in the original post, but I meant
const_cast. Sorry for the confusion.
Please notice that we had to add manually some flags to generic.mak
(which is the makefile we used to build it
on HP-IX). I'm aware of some example you gave in the html
documentation about compiling with aCC - but we still
had to change some flags. (I know these weren't formal settings and
just an example).
Is there any chance that there will be a HP-IX-special makefile? It
will make life much easier. :-)
If you want to provide one - I don't have access to that compiler.
3. I forgot to mension, that we managed to compile RegEX with SunOS C++
5.5
both in 32 & 64 bits. There were no errors, BUT
in 64 bits when we tried to run the rs/regress test - it failed
(something which didn't happen in the 32-bits version). There was
also a memory access violation, so even thought the compilation went
just
fine - apparently the library is
not fully 64-bit compatible.
What can we do to overcome this problem?
OK a couple of data points: the library is passing all it's tests with IBM
C++ on Itanium, so I would be surprised if this is 64-bit issue as such,
it's more likely to be a compiler or platform specific issue. As I asked
before what precisely is failing? What is the general protection fault?
Where in the code does it occur (stack trace?) and so on. I'm going to
need
a lot more information before I can make any suggestions, and probably
you're going to have to do some debugging as well...
John.