Subject: [Boost-build] Solaris build: -pthread
From: Bruce Mahfood (bmahfood-contractor_at_[hidden])
Date: 2011-12-13 13:20:03
I'm trying to build boost 1.37 on Solaris 10, which I have never done, and
having a couple of issues. The first is an actual issue, and the second is
a possible issue. The 2 questions are:
1) I need to be able to use boost 1.37 for this build, because I am porting
some older software for my company that was originally built against that
version. When I run ./configure --with-libraries="all", there are no
problems. The output is as follows:
$ ./configure --with-libraries="all"
-n Building Boost.Jam with toolset gcc...
-n Detecting Python version...
-n Detecting Python root...
-n Unicode/ICU support for Boost.Regex?...
Backing up existing Boost.Build configuration in user-config.jam.3
Generating Boost.Build configuration in user-config.jam...
but when I run gmake, I eventually get a lot of lines with the text:
g++: unrecognized option `-pthread'
I have looked online and seen where some people said that this option
("-pthread") is to be use with gcc on Linux, but on Solaris, gcc takes
"-pthreads". I am not sure how I am to change the build process for 1.37
so that the correct option is used. I have grep'ed through the whole
directory structure using the following piped command:
$ find . -type f |xargs grep -w pthread|grep -v ".hpp"|grep -v ".cpp"
and I looked through the documentation for build information, and as a
result I changed the "using gcc;" line in my user-config.jam to:
using gcc : 3.4.6 : : <compileflags>-m64 -pthreads ;
This didn't make a difference. The same error message is still printing.
Any suggestions as to how I can get passed this?
2) Once I'm passed that problem, I read in the following link:
that compilation in general on a solaris machine is not straightforward. I
was wondering if anyone had words of wisdom for any other gotchas I may be
looking at going forward.
Boost-Build 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