Boost logo

Boost Users :

Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-01-13 03:40:09


On 12/01/2017 23:07, Shawn Firth wrote:
>
> Ladies and Gentlemen,
>
> We have been using Boost on Windows and HP-UX for over five years.
>
> Recently I have been attempting to build Boost 1.63 on Solaris 11.3
> x86 with Oracle Developer Studio12.5.
>
> I started with:./bootstrap.sh --prefix=/export/home/me/boost_1_63_0
> -libdir=/export/home/me/boost_1_63_0/lib --with-toolset=sun
>
> …and that is where I still am. I have been trying every b2
> option/configuration that I can file via Google to get Boost 1.63,
> both with and without C++11, and I am striking out.
>

Two questions:

1) Did bjam build OK? If not then I suggest you build it with gcc (you
can still build boost with Sun's compiler).
2) What Sun ABI and std library did you want to build with? The
Sun/Oracle compiler has a multitude of options, many of which are
unusable with Boost (or anything that looks like modern C++ IMO)?

Here's what my user-config.jam has:

using sun : 12.5 : /opt/developerstudio12.5/bin/CC :
<cxxflags>-library=stlport4 <linkflags>-library=stlport4 ;
using sun : 12.5s11 : /opt/developerstudio12.5/bin/CC :
<cxxflags>-std=c++11 <linkflags>-std=c++11 ;
using sun : 12.5s14 : /opt/developerstudio12.5/bin/CC :
<cxxflags>-std=c++14 <linkflags>-std=c++14 ;
using sun : 12.5s03 : /opt/developerstudio12.5/bin/CC :
<cxxflags>-std=c++03 <linkflags>-std=c++03 ;

In addition you may need to add stdlib=stlport or stdlib=apache or
stdlib=gnu if using the default option.

HTH, John.

> The Boost documentation is very terse on Sun builds, however the Boost
> 1.63 release notes say it has been tested for SunOS: Oracle Solaris
> Studio 12.5 and Oracle Solaris Studio, C++11 12.5. Here’s all that the
> Boost 1.64 doco has to say about Sun builds:
>
> sun
>
>
>
> Oracle
>
>
>
> Only very recent versions are known to work well with Boost. Note that
> the Oracle/Sun compiler has a large number of options which effect
> binary compatibility: it is vital that the libraries are built with
> the same options that your appliction will use. In particular be aware
> that the default standard library may not work well with Boost,
> /unless you are building for C++11/. The particular compiler options
> you need can be injected with the b2 command line options
> cxxflags=``and ``linkflags=. For example to build with the Apache
> standard library in C++03 mode use
> b2 cxxflags=-library=stdcxx4 linkflags=-library=stdcxx4.
>
> http://www.boost.org/doc/libs/1_63_0/more/getting_started/unix-variants.html
>
>
> Sun Studio
>
> The|sun|module supports theSun Studio
> <http://developers.sun.com/sunstudio/index.jsp>C++ compilers for the
> Solaris OS.
>
> The module is initialized using the following syntax:
>
> using sun : [|/version/|] : [|/c++-compile-command/|] : [|/compiler
> options/|] ;
>
> This statement may be repeated several times, if you want to configure
> several versions of the compiler.
>
> If the command is not specified, Boost.Build will search for a binary
> named*CC*in|/opt/SUNWspro/bin|and in|PATH|.
>
> When using this compiler on complex C++ code, such as theBoost C++
> library <http://boost.org/>, it is recommended to specify the
> following options when intializing the|sun|module:
>
> -library=stlport4 -features=tmplife -features=tmplrefstatic
>
> See theSun C++ Frontend Tales
> <http://blogs.sun.com/sga/entry/command_line_options>for details.
>
> The following options can be provided,
> using|</option-name/>/option-value/|syntax:
>
> |*cflags*|**
>
> Specifies additional compiler flags that will be used when compiling C
> sources.
>
> |*cxxflags*|**
>
> Specifies additional compiler flags that will be used when compiling
> C++ sources.
>
> |*compileflags*|**
>
> Specifies additional compiler flags that will be used when compiling
> both C and C++ sources.
>
> |*linkflags*|**
>
> Specifies additional command line options that will be passed to the
> linker.
>
> Starting with Sun Studio 12, you can create 64-bit applications by
> using the|address-model=64|property.
>
> http://www.boost.org/build/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.sun
>
> Can someone provide me with the user-config.jamand b2options so that I
> can successfully build Boost 1.63 on Solaris 11.3 x86 with Oracle
> Developer Studio12. 3, 4, or 5? Failing user-config.jamand b2options
> for Solaris 11 on x86, can you provide me withuser-config.jamand
> b2options for Solaris 11 on SPARC with Oracle Developer Studio12.3,
> 4, or 5?
>
> Thank you for your time…
>
> Shawn Firth
>
> *RG Technology*
>
> Senior Systems Architect
>
> shawn.firth_at_[hidden] <mailto:shawn.firth_at_[hidden]>
>
> Description: Description: RGG
>
> www.robbinsgioia.com <http://www.robbinsgioia.com/>
>
>
> ------------------------------------------------------------------------
>
> CONFIDENTIALITY NOTICE: The information contained in this electronic
> mail and its attachments are privileged and confidential information
> and are intended for the use of the individual(s) or entity named
> above and those who have been specifically authorized to receive it.
> If you are not the intended recipient, you are hereby notified that
> any use, copying or distribution of this communication is strictly
> prohibited.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net