Opened 20 years ago

Closed 19 years ago

#125 closed Bugs (Works For Me)

regex does not compile under gcc3.2

Reported by: pberndt Owned by: John Maddock
Milestone: Component: None
Version: None Severity:
Keywords: Cc:

Description

Applies to 1.29, 1.28 and CVS

Change History (4)

comment:1 by John Maddock, 19 years ago

Logged In: YES 
user_id=14804

Works for me, please supply details,

Thank you,

John Maddock

comment:2 by ijese, 19 years ago

Logged In: YES 
user_id=596891

I have the same problem with 1.30 and mingw/msys. After 
configure, I started make (I had to manually add some include 
directories) and got the following:

igor@IGORTP1 /d/download/temp/boost-1.30.2/boost-1.30.
2/libs/regex/build
$ make -fgccigj.mak
g++ -I/c/Dev-Cpp/include/ -I/c/Dev-Cpp/include/c++/ 
-I/c/Dev-Cpp/include/c++/mingw32/ 
-I/c/Dev-Cpp/include/c++/backward/ -o 
gcc/boost_regex/c_regex_traits.o -c -O2 -I../../../  ..
/src/c_regex_traits.cpp
In file included from c:/Dev-Cpp/include/c++/list:67,
                 from ../src/c_regex_traits.cpp:33:
c:/Dev-Cpp/include/c++/bits/stl_algobase.h:149: redefinition 
of `template<class 
   _Tp> const _Tp& std::min(const _Tp&, const _Tp&)'
../../../boost/config/suffix.hpp:250: `template<class _Tp> 
const _Tp& 
   std::min(const _Tp&, const _Tp&)' previously declared here
c:/Dev-Cpp/include/c++/bits/stl_algobase.h:169: redefinition 
of `template<class 
   _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
../../../boost/config/suffix.hpp:254: `template<class _Tp> 
const _Tp& 
   std::max(const _Tp&, const _Tp&)' previously declared here
c:/Dev-Cpp/include/c++/bits/stl_algobase.h: In function `bool 
   std::lexicographical_compare(const unsigned char*, const 
unsigned char*, 
   const unsigned char*, const unsigned char*)':
c:/Dev-Cpp/include/c++/bits/stl_algobase.h:793: call of 
overloaded `min(const 
   size_t&, const size_t&)' is ambiguous
../../../boost/config/suffix.hpp:250: candidates are: const 
_Tp& std::min(const 
   _Tp&, const _Tp&) [with _Tp = size_t]
c:/Dev-Cpp/include/c++/bits/stl_algobase.h:149:                 
const _Tp& 
   std::min(const _Tp&, const _Tp&) [with _Tp = size_t]
In file included from ../../../boost/regex/config.hpp:96,
                 from ../../../boost/regex/v3/cregex.hpp:28,
                 from ../../../boost/cregex.hpp:27,
                 from ../src/c_regex_traits.cpp:36:
../../../boost/detail/allocator.hpp: At global scope:
../../../boost/detail/allocator.hpp:38: syntax error before `;' 
token
../../../boost/detail/allocator.hpp: In member function `T* 
   boost::detail::allocator<T>::allocate(unsigned int, const 
void*)':
../../../boost/detail/allocator.hpp:126: parse error before `;' 
token
../../../boost/detail/allocator.hpp: In member function `void 
   boost::detail::allocator<T>::deallocate(T*, unsigned int)':
../../../boost/detail/allocator.hpp:140: parse error before `;' 
token
In file included from ../../../boost/cregex.hpp:27,
                 from ../src/c_regex_traits.cpp:36:
../../../boost/regex/v3/cregex.hpp: At global scope:
../../../boost/regex/v3/cregex.hpp:71: 'regoff_t' is used as a 
type, but is not 
   defined as a type.
../../../boost/regex/v3/cregex.hpp:72: 'regoff_t' is used as a 
type, but is not 
   defined as a type.
../../../boost/regex/v3/cregex.hpp:89: `REG_EXTENDED' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:89: `REG_NOCOLLATE' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:89: 
`REG_ESCAPE_IN_LISTS' was not declared 
   in this scope
../../../boost/regex/v3/cregex.hpp:89: enumerator value for 
`REG_PERL' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:90: `REG_EXTENDED' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:90: 
`REG_ESCAPE_IN_LISTS' was not declared 
   in this scope
../../../boost/regex/v3/cregex.hpp:90: enumerator value for 
`REG_AWK' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:91: `REG_BASIC' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:91: `REG_NEWLINE_ALT' 
was not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:91: enumerator value for 
`REG_GREP' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:92: `REG_EXTENDED' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:92: `REG_NEWLINE_ALT' 
was not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:92: enumerator value for 
`REG_EGREP' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:107: `regex_tA' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:107: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:108: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:109: parse error before `*' 
token
../../../boost/regex/v3/cregex.hpp:110: `regex_tA' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:110: parse error before `)' 
token
../../../boost/regex/v3/cregex.hpp:157: `REG_ESIZE' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:157: enumerator value for 
`REG_E_MEMORY' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:165: `match_not_bol' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:165: enumerator value for 
`match_not_eol' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:166: `match_not_eol' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:166: enumerator value for 
`match_not_bob' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:167: `match_not_bob' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:167: enumerator value for 
`match_not_eob' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:168: `match_not_eob' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:168: enumerator value for 
`match_not_bow' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:169: `match_not_bow' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:169: enumerator value for 
`match_not_eow' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:170: `match_not_eow' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:170: enumerator value for `
   match_not_dot_newline' not integer constant
../../../boost/regex/v3/cregex.hpp:171: 
`match_not_dot_newline' was not 
   declared in this scope
../../../boost/regex/v3/cregex.hpp:171: enumerator value for `
   match_not_dot_null' not integer constant
../../../boost/regex/v3/cregex.hpp:172: `match_not_dot_null' 
was not declared 
   in this scope
../../../boost/regex/v3/cregex.hpp:172: enumerator value for 
`match_prev_avail' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:173: `match_prev_avail' 
was not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:173: enumerator value for 
`match_init' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:174: `match_init' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:174: enumerator value for 
`match_any' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:175: `match_any' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:175: enumerator value for 
`match_not_null' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:176: `match_not_null' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:176: enumerator value for 
`match_continuous' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:178: `match_continuous' 
was not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:178: enumerator value for 
`match_partial' 
   not integer constant
../../../boost/regex/v3/cregex.hpp:180: `match_partial' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:180: enumerator value for 
`match_stop' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:181: `match_stop' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:181: enumerator value for 
`match_all' not 
   integer constant
../../../boost/regex/v3/cregex.hpp:183: `match_all' was not 
declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:183: enumerator value for 
`match_max' not 
   integer constant
In file included from ../../../boost/cregex.hpp:27,
                 from ../src/c_regex_traits.cpp:36:
../../../boost/regex/v3/cregex.hpp:232: parse error before `&' 
token
../../../boost/regex/v3/cregex.hpp:233: parse error before `&' 
token
../../../boost/regex/v3/cregex.hpp:240: syntax error before `::
' token
../../../boost/regex/v3/cregex.hpp:261: `GrepCallback' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:261: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:262: `GrepCallback' was 
not declared in this 
   scope
../../../boost/regex/v3/cregex.hpp:262: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:262: `unsigned int boost::
RegEx::Grep(...)' 
   and `unsigned int boost::RegEx::Grep(...)' cannot be 
overloaded
../../../boost/regex/v3/cregex.hpp:268: `GrepFileCallback' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:268: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:269: `GrepFileCallback' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:269: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:269: `unsigned int 
   boost::RegEx::GrepFiles(...)' and `unsigned int boost::
RegEx::GrepFiles(...)
   ' cannot be overloaded
../../../boost/regex/v3/cregex.hpp:270: `FindFilesCallback' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:270: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:271: `FindFilesCallback' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:271: parse error before `,' 
token
../../../boost/regex/v3/cregex.hpp:271: `unsigned int 
   boost::RegEx::FindFiles(...)' and `unsigned int boost::
RegEx::FindFiles(...)
   ' cannot be overloaded
../../../boost/regex/v3/cregex.hpp:293: field `pred1' has 
incomplete type
../../../boost/regex/v3/cregex.hpp:294: field `pred2' has 
incomplete type
../../../boost/regex/v3/cregex.hpp:295: field `pred3' has 
incomplete type
../../../boost/regex/v3/cregex.hpp:296: field `pred4' has 
incomplete type
../../../boost/regex/v3/cregex.hpp:279: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:277: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:275: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:266: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:265: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:264: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:263: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:260: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:259: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:258: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp:257: `match_default' was 
not declared in 
   this scope
../../../boost/regex/v3/cregex.hpp: In member function 
`unsigned int 
   boost::RegEx::Grep(...)':
../../../boost/regex/v3/cregex.hpp:262: `cb' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:262: (Each undeclared 
identifier is reported 
   only once for each function it appears in.)
../../../boost/regex/v3/cregex.hpp:262: `s' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:262: `flags' undeclared 
(first use this 
   function)
../../../boost/regex/v3/cregex.hpp: In member function 
`unsigned int 
   boost::RegEx::GrepFiles(...)':
../../../boost/regex/v3/cregex.hpp:269: `cb' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:269: `files' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:269: `recurse' undeclared 
(first use this 
   function)
../../../boost/regex/v3/cregex.hpp:269: `flags' undeclared 
(first use this 
   function)
../../../boost/regex/v3/cregex.hpp: In member function 
`unsigned int 
   boost::RegEx::FindFiles(...)':
../../../boost/regex/v3/cregex.hpp:271: `cb' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:271: `files' undeclared (first 
use this 
   function)
../../../boost/regex/v3/cregex.hpp:271: `recurse' undeclared 
(first use this 
   function)
../../../boost/regex/v3/cregex.hpp:271: `flags' undeclared 
(first use this 
   function)
In file included from ../../../boost/regex/regex_traits.hpp:27,
                 from ../src/c_regex_traits.cpp:37:
../../../boost/regex/v3/regex_traits.hpp: At global scope:
../../../boost/regex/v3/regex_traits.hpp:134: parse error 
before `{' token
../../../boost/regex/v3/regex_traits.hpp:156: parse error 
before `protected'
../../../boost/regex/v3/regex_traits.hpp:168: `map_size' was 
not declared in 
   this scope
../../../boost/regex/v3/regex_traits.hpp:169: `map_size' was 
not declared in 
   this scope
../../../boost/regex/v3/regex_traits.hpp:170: `map_size' was 
not declared in 
   this scope
../../../boost/regex/v3/regex_traits.hpp:176: parse error 
before `public'
../../../boost/regex/v3/regex_traits.hpp: In function `char* 
   boost::re_detail::get_catalogue()':
../../../boost/regex/v3/regex_traits.hpp:178: 
`regex_message_catalogue' 
   undeclared (first use this function)
../../../boost/regex/v3/regex_traits.hpp: At global scope:
../../../boost/regex/v3/regex_traits.hpp:185: `c_regex_traits' 
is not a 
   template
../../../boost/regex/v3/regex_traits.hpp:185: `re_detail' is not 
a class or 
   namespace
../../../boost/regex/v3/regex_traits.hpp:186: `c_traits_base' is 
not a class or 
   namespace
../../../boost/regex/v3/regex_traits.hpp:187: ISO C++ forbids 
declaration of `
   re_detail' with no type
../../../boost/regex/v3/regex_traits.hpp:187: confused by 
earlier errors, bailing out
make: *** [gcc/boost_regex/c_regex_traits.o] Error 1

comment:3 by John Maddock, 19 years ago

Logged In: YES 
user_id=14804

It is clear from your posting that configure did not work 
correctly for you - it seems to have wrongly set every macro 
going based upon your error messages - my guess is that you 
did not set up your compilers command line options correctly 
so that every test then failed, but without seeing your 
config.log output I can't tell.  

BTW there is no need to run configure for this compiler-
platform combination, it should have worked just fine staight 
out of the box.

If you want futher help with this, then please email me 
directly at boost.regex@virgin.net

John.

comment:4 by John Maddock, 19 years ago

Status: assignedclosed
Logged In: YES 
user_id=14804

Closed for lack of further information
Note: See TracTickets for help on using tickets.