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-14 03:28:38


> 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

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.

>
> 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
> shawn.firth_at_[hidden]
>
> www.robbinsgioia.com
>
> -----Original Message-----
> From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of John Maddock
> Sent: Friday, January 13, 2017 3:40 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] Problems Building Boost 1.63 on Solaris 11.3 x86 with Oracle Developer Studio12.5
>
>
>
> 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-variant
>> s.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.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
>>
>> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
> _______________________________________________
> 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