Boost logo

Boost Testing :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-04-03 13:40:33

John Maddock wrote:
>> Compiles and runs for me on OSX 10.2 and CW-8.3. That is both from the
>> various targets available when building from the IDE. And when
>> building with the current Boost.Build toolset.
>> And the program returns "0" as the result.
>> Are we to draw the conclusion that locales are supported.. And it's
>> some other link/compile problem?
> Looks like it: can you try:
> cd libs/regex/test
> bjam collate_info

Tried it..

> If this works for you (it should, it's only a little more complicated
> than the last test case), then there's something different between
> Stephen's setup and yours (see for the current
> failures for this test).

It doesn't work.. But not for the reasons that are displayed for
Stephen. It doesn't get as far as attempting to link it fails to build
the regex library before that. All of the errors are of this kind:

    Error : illegal initialization
../../../boost/regex/v4/cpp_regex_traits.hpp line 1011 static
static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT;

Possibly a config issue? OK.. a bit of investigation.. After
preprocessing that line looks like (+context):

template <class charT>
static_mutex& cpp_regex_traits<charT>::get_mutex_inst()
static static_mutex s_mutex = { {0x32AAABA7, {}}, } ;
return s_mutex;

[Note.. having two identical files: boost/regex/static_mutex.hpp, and
boost/regex/pending/static_mutex.hpp is a really nasty thing to do.
Spent some time trying to figure out why my changing one has no effect
on the compile.]

Looking further up if I change the static_mutex implemention as such:

Index: boost/regex/pending/static_mutex.hpp
RCS file: /cvsroot/boost/boost/boost/regex/pending/static_mutex.hpp,v
retrieving revision 1.3
diff -u -r1.3 static_mutex.hpp
--- boost/regex/pending/static_mutex.hpp 21 Jan 2005 17:22:16
-0000 1.3
+++ boost/regex/pending/static_mutex.hpp 3 Apr 2005 18:24:12 -0000
@@ -43,9 +43,10 @@
     typedef scoped_static_mutex_lock scoped_lock;
     pthread_mutex_t m_mutex;
+ inline static_mutex() { pthread_mutex_init(&m_mutex,0); }

+#define BOOST_STATIC_MUTEX_INIT boost::static_mutex()

  class BOOST_REGEX_DECL scoped_static_mutex_lock

Then the regex lib compiles, and the test passes.

So we are down to the differences between Stephen's setup of
OSX-10.3/CW-9.3 and mine of OSX10.2/CW-8.3.

> Thanks for persevering with this,

Your welcome :-)

-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. -
-- rrivera/ - grafik/ - 102708583/icq

Boost-testing list run by mbergal at