Boost logo

Threads-Devel :

Subject: [Threads-devel] Solaris 10u8 SunStudio 12.1 boost_thread build errors, patch available but not implemented
From: Andrew Roberts (andrewm.roberts_at_[hidden])
Date: 2009-11-10 08:02:08


Hello,

I've been trying to get boost 1.40 and 1.41b1 built on Solaris x86 with
boost_thread support.
I eventually discovered a patch, referenced here:

http://groups.google.com/group/boost-list/browse_thread/thread/853f8147a24d4
efa

which appears to work (at least to enable a build and running simple test
progs),
boost ticket reference is:

https://svn.boost.org/trac/boost/ticket/2602

This is against 1.37, but doesn't appear to have made it into
1.39/1.40/1.41b1.
It has been marked as closed, but the issue is still out there.

Is there a timeline for getting this patch accepted?

My environment is:
# uname -a
SunOS unknown 5.10 Generic_141445-09 i86pc i386 i86pc
# CC -V
CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21

I built boost 1_40_0 using:

bzcat boost*.tar.bz2 | tar -xf -
cd boost_1_40_0
gpatch -p0 < ../thread.patch
./bootstrap.sh --with-toolset=sun
PATH=$PATH:/Documents/boost_1_40_0
export PATH
bjam toolset=sun stdlib=sun-stlport address-model=32 stage

I've also tried a 64 bit build using:
bjam toolset=sun stdlib=sun-stlport address-model=64 stage

Both the 32 bit and 64 bit versions build, link and run without errors (at
least for simple programs).
I built the test program using:
#x86
LD_LIBRARY_PATH=/Documents/boost/boost_1_40_0_x86/stage/lib
export LD_LIBRARY_PATH
CC -m32 -mt -library=stlport4 -I./boost_1_40_0_x86 -o listing1x86
listing1.cc -L./boost_1_40_0_x86/stage/lib -lboost_thread
./listing1x86

#x64
LD_LIBRARY_PATH=/Documents/boost/boost_1_40_0_x64/stage/lib
export LD_LIBRARY_PATH
CC -m64 -mt -library=stlport4 -I./boost_1_40_0_x64 -o listing1x64
listing1.cc -L./boost_1_40_0_x64/stage/lib -lboost_thread
./listing1x64

listing1.cc:
#include <boost/thread/thread.hpp>
#include <iostream>

void hello()
{
  std::cout << "Hello world, I'm a thread!" << std::endl;
}

int main(int argc, char* argv[])
{
  boost::thread thrd(&hello);
  thrd.join();
  return 0;
}

I'm happy to run some more tests if somebody wants to point me in the right
direction.

Best Regards

Andrew Roberts


Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk