We have used the boost thread library in 32 bits for more than a year. Congrats, it works like a charm.

 

We recently moved our product to Solaris 9 64 bits and now we get compilation errors. (We use forte7.)

 

CC -c -I/BINARIES/sol9/opt/boost_1_30_0  -I../../../ -Qoption CC -xcomdat -mt -fast -xarch=v9 -DBOOST_HAS_THREADS -o sunpro/libboost_thread/condition.o ../src/condition.cpp

 

"../../..//boost/limits.hpp", line 35: Error: Multiple declaration for std::numeric_limits<long long>.

"../../..//boost/limits.hpp", line 88: Error: Multiple declaration for std::numeric_limits<unsigned long long>.

2 Error(s) detected.

make: *** [sunpro/libboost_thread/condition.o] Error 2

 

 

The problem seems to be in …/config/stdlib. I hacked roguewave.hpp to artificially increase the roguewave version number:

 

#ifndef _RWSTD_VER

#  define BOOST_RWSTD_VER 0x010000

#elif _RWSTD_VER < 0x010000

#  define BOOST_RWSTD_VER (_RWSTD_VER << 8)

#else

#  ifdef __sparcv9 

#    define BOOST_RWSTD_VER 0x20200

#  else

#    define BOOST_RWSTD_VER _RWSTD_VER

#  endif

#endif

 

 

Now, compilation works fine:

 

CC -c -I/BINARIES/sol9/opt/boost_1_30_0  -I../../../ -Qoption CC -xcomdat -mt -fast -xarch=v9 -DBOOST_HAS_THREADS -o sunpro/libboost_thread/tss.o ../src/tss.cpp

"../src/tss.cpp", line 192: Warning (Anachronism): Formal argument 2 of type extern "C" void(*)(void*) in call to pthread_key_create(unsigned*, extern "C" void(*)(void*)) is being passed void(*)(void*).

1 Warning(s) detected.

 

(We’ve had the warning for the longest time.)

 

 

I am no boost expert, but that seems to have taken care of the problem: the library works fine as far as I can tell.

 

Are there side effects that I may not be aware of?  Is forte7 64 bits generally supported right out of the box?

 

Thanks,

 

Max

 

 

------------------------------------------------

Maxime Larose

Senior Software Designer

Tel: ***-***-****

mlarose@broadsoft.com

 

BroadSoft, Inc.

http://www.broadsoft.com/