Discussion:
Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
(too old to reply)
Shawn Firth
2017-01-12 23:07:35 UTC
Permalink
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.

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 the Sun 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 the Boost 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 the Sun 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.jam and b2 options 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.jam and b2 options for Solaris 11 on x86, can you provide me with user-config.jam and b2 options 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
***@robbinsgioia.com<mailto:***@robbinsgioia.com>
[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.
John Maddock
2017-01-13 08:40:09 UTC
Permalink
Post by Shawn Firth
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.
Post by Shawn Firth
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
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.
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
-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,
|*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
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
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Shawn Firth
2017-01-13 20:21:47 UTC
Permalink
John,
Thank you for your prompt response!

To answer your questions:

bjam and b2 built without any errors.

The code we have using Boost today, on Windows and HP-UX, only uses the Boost serialization library. On Windows it is still a 32bit application, but on HP-UX it is a 64bit application. This is our first time porting this application to Solaris , with the production target being Solaris 11 SPARC (we have another C application that is on Solaris 11 SPARC, and I just ported it to Solaris 11 x86 in <1 day). The Solaris 11 x86 virtual is simply to give us local development environments, with formal testing/production builds occurring on Solaris 11 SPARC.

So...I'd like to be able to build on Solaris 11 x86 as 64bit with the newest C++ compiler and C++ Standard Template Library that the Boost serialization library will support.

On Solaris 11.3 x86, I have been able to build the Boost serialization library using c++03 and stlport4 (see output and scripts below), but I would really like to use the "newer" Sun compiler options like c++14.

According to Oracle the correct STL to use with c++14 is stdcpp:
stdcpp - Use libstdc++, the C++ runtime library for modes -compat=g, -std=c++03, -std=c++11, and -std=c++14. Not available with -compat=5 mode. (https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkatz)

I tried several times/ways to use c++14, but every time I got the following errors:
CC: -library=stdcpp cannot be used with -compat=5

user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++14 <linkflags>-std=c++14 ;

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stdcpp linkflags=-library=stdcpp toolset=sun variant=release link=static threading=single runtime-link=static address-model=64 install

I got the following errors:
sun.compile.c++ /export/home/shafir/jaguar_libs/boost_1_63_0/boost/bin.v2/libs/serialization/build/sun/release/address-model-64/link-static/runtime-link-static/basic_text_iprimitive.o
CC: -library=stdcpp cannot be used with -compat=5

Something is setting the -compat=5 flag, but it isn't me.

So, I would like to know what b2 STL and flags you used in conjunction with c++14?

developerstudio12.5 CC References:
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkanq

https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPgnaof

https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkatz

_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_

c++03 and stlport4 configuration and build output:

Boost bootstrap output:

./booststrap/sh --with-toolset=sun
-n Building Boost.Build engine with toolset sun...
tools/build/src/engine/bin.solarisx86/b2
-n Detecting Python version...
2.7
-n Detecting Python root...
/usr
-n Unicode/ICU support for Boost.Regex?...
not found.
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./b2

user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++03 <linkflags>-std=c++03 ;

build_boost163_sol11x86.sh
#! /bin/sh
BOOSTDIR=/export/home/shafir/jaguar_libs/boost_1_63_0
PATH=${PREFIX}:${PATH}
BOOST_VERSION=163
export PATH

BUILDLIBLIST="--with-serialization"

for BUILDLIB in $BUILDLIBLIST; do

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=static threading=single runtime-link=static address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=shared threading=single runtime-link=shared address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=static threading=multi runtime-link=static address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=shared threading=multi runtime-link=shared address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=static threading=single runtime-link=static address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=shared threading=single runtime-link=shared address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=static threading=multi runtime-link=static address-model=64 install

./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=shared threading=multi runtime-link=shared address-model=64 install

done


Please let me know if you have any questions.
Thanks.

  Shawn Firth
  RG Technology
  Senior Systems Architect
  11 Canal Center Plaza, Suite 107
  Alexandria VA 22314
  703.739.5642 office
  ***@robbinsgioia.com

  www.robbinsgioia.com

-----Original Message-----
From: Boost-users [mailto:boost-users-***@lists.boost.org] On Behalf Of John Maddock
Sent: Friday, January 13, 2017 3:40 AM
To: boost-***@lists.boost.org
Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
Post by Shawn Firth
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.
Post by Shawn Firth
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
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-variant
s.html
Sun Studio
The|sun|module supports theSun Studio
<http://developers.sun.com/sunstudio/index.jsp>C++ compilers for the
Solaris OS.
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
-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,
|*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.ref
erence.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
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
http://lists.boost.org/mailman/listinfo.cgi/boost-users
John Maddock
2017-01-14 08:28:38 UTC
Permalink
Post by Shawn Firth
stdcpp - Use libstdc++, the C++ runtime library for modes -compat=g, -std=c++03, -std=c++11, and -std=c++14. Not available with -compat=5 mode. (https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkatz)
CC: -library=stdcpp cannot be used with -compat=5
That's a misuse of the compiler I believe, you shouldn't need to set the
stdlib explicitly like that, just try:

cxxflags=-std=c++14 linkflags=-std=c++14

and linking to the correct library should be taken care of for you (by
the the compiler, nothing to do with bjam).

If you want to see what command line options bjam is creating use the
-d2 option.

Also suggest you cd into libs/config/test and run:

bjam <options> -d2 config_info

config_info being the closest to a hello-world app we have, and
helpfully prints out a bunch of diagnostic info that looks like this:
http://www.boost.org/development/tests/develop/developer/output/oracle-intel-S2-12-5_next-cpp11-boost-bin-v2-libs-config-test-config_info-test-sun-12-5_next_cpp11-release.html

You'll find that info in config_info.output under
bin.v2/libs/config/.... it's a useful way to verify that the build
options you're using are really doing what you think they are.

HTH, John.
Post by Shawn Firth
user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++14 <linkflags>-std=c++14 ;
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stdcpp linkflags=-library=stdcpp toolset=sun variant=release link=static threading=single runtime-link=static address-model=64 install
sun.compile.c++ /export/home/shafir/jaguar_libs/boost_1_63_0/boost/bin.v2/libs/serialization/build/sun/release/address-model-64/link-static/runtime-link-static/basic_text_iprimitive.o
CC: -library=stdcpp cannot be used with -compat=5
Something is setting the -compat=5 flag, but it isn't me.
So, I would like to know what b2 STL and flags you used in conjunction with c++14?
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkanq
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPgnaof
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkatz
_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
./booststrap/sh --with-toolset=sun
-n Building Boost.Build engine with toolset sun...
tools/build/src/engine/bin.solarisx86/b2
-n Detecting Python version...
2.7
-n Detecting Python root...
/usr
-n Unicode/ICU support for Boost.Regex?...
not found.
Generating Boost.Build configuration in project-config.jam...
./b2
user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++03 <linkflags>-std=c++03 ;
build_boost163_sol11x86.sh
#! /bin/sh
BOOSTDIR=/export/home/shafir/jaguar_libs/boost_1_63_0
PATH=${PREFIX}:${PATH}
BOOST_VERSION=163
export PATH
BUILDLIBLIST="--with-serialization"
for BUILDLIB in $BUILDLIBLIST; do
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=static threading=single runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=shared threading=single runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=static threading=multi runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=release link=shared threading=multi runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=static threading=single runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=shared threading=single runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=static threading=multi runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned --prefix=$BOOSTDIR cxxflags=-library=stlport4 linkflags=-library=stlport4 toolset=sun variant=debug link=shared threading=multi runtime-link=shared address-model=64 install
done
Please let me know if you have any questions.
Thanks.
Shawn Firth
RG Technology
Senior Systems Architect
11 Canal Center Plaza, Suite 107
Alexandria VA 22314
703.739.5642 office
www.robbinsgioia.com
-----Original Message-----
Sent: Friday, January 13, 2017 3:40 AM
Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
Post by Shawn Firth
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.
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)?
<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.
Post by Shawn Firth
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
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-variant
s.html
Sun Studio
The|sun|module supports theSun Studio
<http://developers.sun.com/sunstudio/index.jsp>C++ compilers for the
Solaris OS.
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
-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,
|*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.ref
erence.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
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
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Shawn Firth
2017-01-14 17:41:19 UTC
Permalink
John,
Thanks for the help!!!

Due to my build script, the bin.v2 was being created in the boost directory, and therefore my user-config.jam in the main Boost directory was not being used, and therefore my -std=c++14 flags were not being picked up (which I saw in the b2 -d2 output.

To solve this I just changed my build script to include " cflags=-std=c++14 linkflags=-std=c++14":

./b2 -d2 $BUILDLIB --build-dir=$BOOSTDIR --with-test --layout=versioned --prefix=$BOOSTDIR cflags=-std=c++14 linkflags=-std=c++14 toolset=sun variant=release link=static threading=single runtime-link=static address-model=64 install

...and I got clean builds for all the serialization library configurations I needed.

Thanks again!


  Shawn Firth
  RG Technology
  Senior Systems Architect
  11 Canal Center Plaza, Suite 107
  Alexandria VA 22314
  ***@robbinsgioia.com

  www.robbinsgioia.com

-----Original Message-----
From: Boost-users [mailto:boost-users-***@lists.boost.org] On Behalf Of John Maddock
Sent: Saturday, January 14, 2017 3:29 AM
To: boost-***@lists.boost.org
Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
Post by Shawn Firth
stdcpp - Use libstdc++, the C++ runtime library for modes -compat=g,
-std=c++03, -std=c++11, and -std=c++14. Not available with -compat=5
mode.
(https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkat
z)
CC: -library=stdcpp cannot be used with -compat=5
That's a misuse of the compiler I believe, you shouldn't need to set the stdlib explicitly like that, just try:

cxxflags=-std=c++14 linkflags=-std=c++14

and linking to the correct library should be taken care of for you (by the the compiler, nothing to do with bjam).

If you want to see what command line options bjam is creating use the
-d2 option.

Also suggest you cd into libs/config/test and run:

bjam <options> -d2 config_info

config_info being the closest to a hello-world app we have, and helpfully prints out a bunch of diagnostic info that looks like this:
http://www.boost.org/development/tests/develop/developer/output/oracle-intel-S2-12-5_next-cpp11-boost-bin-v2-libs-config-test-config_info-test-sun-12-5_next_cpp11-release.html

You'll find that info in config_info.output under
bin.v2/libs/config/.... it's a useful way to verify that the build
options you're using are really doing what you think they are.

HTH, John.
Post by Shawn Firth
user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++14
<linkflags>-std=c++14 ;
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stdcpp linkflags=-library=stdcpp
toolset=sun variant=release link=static threading=single
runtime-link=static address-model=64 install
sun.compile.c++
/export/home/shafir/jaguar_libs/boost_1_63_0/boost/bin.v2/libs/seriali
zation/build/sun/release/address-model-64/link-static/runtime-link-sta
tic/basic_text_iprimitive.o
CC: -library=stdcpp cannot be used with -compat=5
Something is setting the -compat=5 flag, but it isn't me.
So, I would like to know what b2 STL and flags you used in conjunction with c++14?
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkanq
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPgnaof
https://docs.oracle.com/cd/E60778_01/html/E60746/bkana.html#OSSCPbkatz
_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
./booststrap/sh --with-toolset=sun
-n Building Boost.Build engine with toolset sun...
tools/build/src/engine/bin.solarisx86/b2
-n Detecting Python version...
2.7
-n Detecting Python root...
/usr
-n Unicode/ICU support for Boost.Regex?...
not found.
Generating Boost.Build configuration in project-config.jam...
./b2
user-config.jam
using sun : : /opt/developerstudio12.5/bin/CC : <cxxflags>-std=c++03
<linkflags>-std=c++03 ;
build_boost163_sol11x86.sh
#! /bin/sh
BOOSTDIR=/export/home/shafir/jaguar_libs/boost_1_63_0
PATH=${PREFIX}:${PATH}
BOOST_VERSION=163
export PATH
BUILDLIBLIST="--with-serialization"
for BUILDLIB in $BUILDLIBLIST; do
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=release link=static
threading=single runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=release link=shared
threading=single runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=release link=static
threading=multi runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=release link=shared
threading=multi runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=debug link=static
threading=single runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=debug link=shared
threading=single runtime-link=shared address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=debug link=static
threading=multi runtime-link=static address-model=64 install
./b2 $BUILDLIB --build-dir=$BOOSTDIR --layout=versioned
--prefix=$BOOSTDIR cxxflags=-library=stlport4
linkflags=-library=stlport4 toolset=sun variant=debug link=shared
threading=multi runtime-link=shared address-model=64 install
done
Please let me know if you have any questions.
Thanks.
Shawn Firth
RG Technology
Senior Systems Architect
11 Canal Center Plaza, Suite 107
Alexandria VA 22314
703.739.5642 office
www.robbinsgioia.com
-----Original Message-----
Sent: Friday, January 13, 2017 3:40 AM
Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris
11.3 x86 with Oracle Developer Studio12.5
Post by Shawn Firth
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.
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)?
<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.
Post by Shawn Firth
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
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-varian
t
s.html
Sun Studio
The|sun|module supports theSun Studio
<http://developers.sun.com/sunstudio/index.jsp>C++ compilers for the
Solaris OS.
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
-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,
|*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.re
f
erence.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
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
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Loading...