Sorting a vector of pairs in Solaris Studio 12.4 beta July refresh

The following C++ program doesn't compile in C++11 mode with the Solaris Studio 12.4 beta July refresh compiler:
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
int main(int, char **)
    std::vector<std::pair<int, std::string>> vec;
    vec.emplace_back(1, "a");
    vec.emplace_back(3, "c");
    vec.emplace_back(2, "b");
    std::sort(vec.begin(), vec.end());
    return 0;
Compiling with:
% CC -std=c++11 Main.cc
results in:
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/include/CC/gnu/bits/stl_pair.h", line 263: Error: The name __x is unusable in std::iter_swap<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: While instantiating "std::iter_swap<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>)".
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: Instantiated from std::__move_median_to_first<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 2282:     Where: Instantiated from std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 5452:     Where: Instantiated from non-template code.
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/include/CC/gnu/bits/stl_pair.h", line 263: Error: The name __y is unusable in std::iter_swap<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: While instantiating "std::iter_swap<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>)".
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: Instantiated from std::__move_median_to_first<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 2282:     Where: Instantiated from std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 5452:     Where: Instantiated from non-template code.
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 103: Error: A constant expression is required here.
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: While instantiating "std::iter_swap<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>)".
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 88:     Where: Instantiated from std::__move_median_to_first<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 2282:     Where: Instantiated from std::__introsort_loop<__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int>(__gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, __gnu_cxx::__normal_iterator<std::pair<int, std::string>*, std::vector<std::pair<int, std::string> >>, int).
"/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_algo.h", line 5452:     Where: Instantiated from non-template code.
3 Error(s) detected.

Thanks for reporting this problem. I have filed bug 19325210 for you.

Similar Messages

  • Error compiling certain uses of std::tuple in Solaris Studio 12.4 beta July refresh

    Whilst attempting to compile Boost 1.54 using the Solaris Studio 12.4 beta July refresh with -std=c++11 I get an error building libs/regex/src/cregex.cpp that looks like it might be due to a problem with the compiler.  (clang++ on Mac OS X and g++ on Linux can certainly build the same file without problems - I can post more details about them if you think this is a problem in the Boost code rather than the compiler.)
    The error from Solaris Studio is:
    Error: Could not find a match for std::_Tuple_impl<0, int&&>::_Tuple_impl(std::tuple<int&&>, int) needed in std::tuple<int&&>::tuple<int, void>(int&&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: While instantiating "std::tuple<int&&>::tuple<int, void>(int&&)".
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: Instantiated from std::forward_as_tuple<int>(int&&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_map.h", line 485:     Where: Instantiated from non-template code.
    1 Error(s) detected.
    To reproduce this you can download the pre-processed source code from http://pastebin.com/jtsx1k79 and paste it into a file called cregex.pre.cpp.  Then run:
    CC -std=c++11 -mt -m64 -c -o cregex.o cregex.pre.cpp
    to get the error I saw.
    In case it's relevant, I'm working on Oracle Solaris 10 1/13 s10x_u11wos_24a X86.

    This looks very much like a recent bug with std::map introduced with the change to g++ 4.8 headers in July Beta:
      19159587 C++11: errors on a simple <map> usage
    It has been reported on forums - +d flag can cause C++ compilation failure in 12.4 beta refresh
    This bug will be fixed in a final release.
    Unfortunately there is no workaround for this problem.
    regards,
      Fedor.

  • Assertion failure from ccfe in Solaris Studio 12.4 beta July refresh

    I have found a way to get an assertion failure from the ccfe program that comes with the Solaris Studio 12.4 beta July refresh.  The error that gets printed is:
    >> Assertion:   (../lnk/funcsym.cc, line 1679)
        while processing text_woarchive.pre.cpp at line 0.
    The problem occurs whilst compiling Boost 1.54.  The original file in the distribution that causes it is libs/serialization/src/text_woarchive.cpp.
    This problem can be reproduced by getting the pre-processed code I've put on http://pastebin.com/E9vxi2z7 and pasting it into a file called text_woarchive.pre.cpp.  Then run:
    CC -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
    and you get the assertion failure.
    Running:
    CC '-#' -std=c++11 -mt -m64 -c -o text_woarchive.o text_woarchive.pre.cpp
    shows that the assertion is coming from ccfe.
    In case you go back to the original Boost source code I should tell you that prior to generating the pre-processed source I changed:
    #ifdef __SUNPRO_CC
    to:
    #if 0
    in boost/archive/detail/register_archive.hpp.  I did this because there was an error in the __SUNPRO_CC section and I wondered if that workaround code was no longer required with the more modern C++ compiler.  Therefore, I cannot guarantee that the pre-processed source is 100% valid C++ code.  However, even if it's not it would be nice to get a clear error message out of ccfe rather than an assertion failure.
    In case it's relevant, I'm working on Oracle Solaris 10 1/13 s10x_u11wos_24a X86.

    You mentioned in the other answer that you are testing with Boost 1.55.  Are you testing this in C++11 mode?
    Today I downloaded Boost 1.55 and did the following:
    In both tools/build/v2/engine/build.sh and tools/build/v2/tools/sun.jam globally replace SUNWspro with SolarisStudio12.4-beta_jul14-solaris-x86
    In tools/build/v2/tools/sun.jam replace:
    feature.extend stdlib : sun-stlport ;
    feature.compose <stdlib>sun-stlport
        : <cxxflags>-library=stlport4 <linkflags>-library=stlport4
    with:
    feature.extend stdlib : sun-stlport ;
    feature.compose <stdlib>sun-stlport
        : <cxxflags>-std=c++11 <linkflags>-std=c++11
    Note: This is just the quick way I found to con the Boost build system into using C++11 instead of STLport.  The feature in the jam file still has stlport in its name, but that's only a name and the code is being built in C++11 mode.
    In boost/math/special_functions/detail/lanczos_sse2.hpp change line 15 from:
    #if defined(__GNUC__) || defined(__PGI)
    to:
    #if defined(__GNUC__) || defined(__PGI) || defined(__SUNPRO_CC)
    Run:
    ./bootstrap.sh --without-libraries=context --without-libraries=coroutine --without-libraries=graph_parallel --without-libraries=log --without-libraries=mpi --without-libraries=python --without-libraries=test --without-icu
    Run:
    ./b2 -j4 --layout=versioned --disable-icu address-model=64 threading=multi optimization=speed inlining=full
    At this point the vast majority of the code builds, but does not link.
    There are 3 problems:
    The compilation problem with tuple that you've already fixed
    A linker problem with finding std::string related symbols - maybe also related to the gcc header upgrade and now fixed?
    Numerous compilation problems caused by boost/archive/detail/register_archive.hpp
    For this last one the code in the #ifdef __SUNPRO_CC section of boost/archive/detail/register_archive.hpp does appear to be invalid, and leads to the errors:
    "./boost/archive/detail/register_archive.hpp", line 45: Error: The function "adjust_counter" must have a prototype.
    "./boost/archive/detail/register_archive.hpp", line 46: Error: Expression must have a constant value.
    "./boost/archive/detail/register_archive.hpp", line 47: Error: Expression must have a constant value.
    "./boost/archive/detail/register_archive.hpp", line 48: Error: An integer constant expression is required within the array subscript operator.
    Even with Boost 1.55, attempts to fix this lead to the same ccfe assertion.  Trying to use the #else part of the code as I described in the original post does, as does moving the line:
    char adjust_counter(counter<0>);
    so that it comes before the place where adjust_counter is used also then leads to the same assertion:
    >> Assertion:   (../lnk/funcsym.cc, line 1679)
    It's as though any change to boost/archive/detail/register_archive.hpp that fixes the basic code ordering issue lets ccfe get far enough to cause the assertion.
    If there is somebody in your team looking at whether Boost 1.55 compiles with Solaris Studio 12.4 in C++11 mode then hopefully they can relate to what I'm seeing here.  One key point is that they'll have had to edit the jam files to use C++11 mode.
    The other thing is that any insights the person who has been trying to build Boost 1.55 has would be very useful.  I know you don't want to get into officially supporting it, but maybe a blog post with any unofficial hints and tips on getting Boost to build in C++11 mode could be a way to share knowledge.

  • Solaris Studio 12.4 Beta ube assertion failure with -m64 -fsimple

    I have found a way to get an assertion failure from the ube program that comes with the Solaris Studio 12.4 beta.  The error that gets printed is:
    assertion failed in function gra_peep_hole() @ gra.c:10381
    assert(lf_op_(lf_i) == LD_I)
    The problem occurs whilst compiling a 64 bit version of GNU tar 1.23 using the -fsimple option on the C compiler.
    This problem can be reproduced by getting the pre-processed code I've put on http://pastebin.com/wRHRmaiT and pasting it into a file called human.pre.c.  Then run:
    cc -std=c99 -m64 -mt -O4 -fsimple -c -o human.o human.pre.c
    and you get the assertion failure.
    Alternatively, if you don't trust my code on pastebin, the other way to reproduce it would be to download tar-1.23.tar.gz from GNU Project Archives, extract it and then you'll find the original file human.c in the gnu sub-directory.  Build this with:
    cc -std=c99 -DHAVE_CONFIG_H -I. -I.. -m64 -mt -O4 -fsimple -c -o human.o human.c
    and you'll get the same problem.
    The assertion failure only happens with -m64 and -fsimple.  If either of these flags are omitted it doesn't happen.
    People reading this will probably think I'm crazy to be worrying about floating point optimisations for GNU tar, and it's true that I don't really need to build GNU tar with -fsimple.  However, I am worried that the same problem in ube will bite me at some point on more important code where floating point optimisations are valuable.
    In case it's relevant, I'm working on Oracle Solaris 10 1/13 s10x_u11wos_24a X86.

    BugID 18644770 has been fixed recently and the fix is verified with this problem:
    [sr1-sfbay-03](18644770)-627 > /net/dv103/export/builds/cia//latest/inst/intel-S2/bin/cc -std=c99 -m64 -mt -O4 -fsimple -c human.pre.c -V
    cc: Sun C 5.13 SunOS_i386 CIA_pythia 2014/06/16
    acomp: Sun C 5.13 SunOS_i386 CIA_pythia 2014/06/16
    iropt: Sun Compiler Common 12.4 SunOS_i386 CIA_pythia 2014/06/16
    ube: Sun Compiler Common 12.4 SunOS_i386 CIA_pythia 2014/06/16
    as: Sun Compiler Common 12.4 SunOS_i386 CIA_pythia 2014/06/16
    [sr1-sfbay-03](18644770)-628 >
    This fix should be available soon as the Studio12.4 Beta refresh compiler.

  • Solaris Studio 12.4 Beta unable to compile simple C++ program

    The commands and output are shown below
    cat test.cpp; /opt/oracle/solaris_studio/bin/CC  -std=c++11 -o test test.cpp
    #include <random>
    int main () {}
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 41: Error: The function "__builtin_ia32_bsrsi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 49: Error: The function "__builtin_bswap32" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 89: Error: The function "__builtin_ia32_rdpmc" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 97: Error: The function "__builtin_ia32_rdtsc" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 105: Error: The function "__builtin_ia32_rdtscp" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 113: Error: The function "__builtin_ia32_rolqi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 121: Error: The function "__builtin_ia32_rolhi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 137: Error: The function "__builtin_ia32_rorqi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 145: Error: The function "__builtin_ia32_rorhi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 161: Error: The function "__builtin_ia32_pause" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 178: Error: The function "__builtin_ia32_bsrdi" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//ia32intrin.h", line 186: Error: The function "__builtin_bswap64" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//adxintrin.h", line 36: Error: The function "__builtin_ia32_addcarryx_u32" must have a prototype.
    "/opt/oracle/solaris_studio/lib/compilers/CC-gcc/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/include//adxintrin.h", line 45: Error: The function "__builtin_ia32_addcarryx_u64" must have a prototype.
    14 Error(s) detected.
    I install the studio with the tarball file in CentOS 7. I know that officially it only support RHEL 5 & 6, but this is clearly not an OS issue

    This is a known bug in 12.4 Beta:
      18688928 C++11 <random> header includes x86intrin.h on Linux, leading to failures
    This problem is fixed in a final 12.4 release, which will be announced really soon.
    regards,
      Fedor.

  • Compiling / Linking error in Solaris Studio 12.3 C++ Compiler

    Hi,
    I downloaded Solaris Studio 12.3 (SolarisStudio12.3-solaris-x86-pkg.tar.bz2) & unpacked and installed on the default directory (in non-interactive mode) of local machine running Solaris 10 10/09 s10x_u8wos_08a X86. Also applied all the required patches by running the "install_patches.sh" after running "solarisstudio.sh".
    My application has make files to take care of the building the whole application. I made necessary changes to the make files to pick up the latest Solaris 12.3 C++ compiler. I could see that it has picked up for compiling.
    While building the whole project, the source files are compiled to object files successfully but when it is creating shared object (.so) files it stops at the below error:
    /opt/solarisstudio12.3/prod/bin/CC -mt -i -library=stlport4 -zdefs -ztext -G -h xmem.so -Lpic/lib/debug/sol32 -L/MyHome/open_source/abc/lib/sol32 -L/MyHome/open_source/mno/lib/sol32 -L/MyHome/open_source/pqr/lib/sol32 -L/MyHome/open_source/xyz/lib/sol32 -g -lc -lCrun -lumem -m32 -o debug/xmem.so
    *usage: CC [ options ] files. Use 'CC -flags' for details*
    Note:
    Some third party open source libraries are being used in the project. Those libraries are not built using Solaris Studio 12.3 compilers.
    Tried changing lot of options and re-ordering the switches/options but no luck. But on changing as mentioned below the shared library DID build successfully
    - Added space after '-L' option, added '*' at the end of path like "-L/MyHome/open_source/pqr/lib/sol32/*".
    Note:*_
    +1) I tried compiling a separate small program into object files using Solaris 12.3 C++ compiler but got the above error/problem when linking the experimental libraries (shared object) with most of the options used in the above command.+
    +2) The same project gets built successfully in Solaris Studio 12.1 (studio12.1-091123) and Solaris Studio 12 (studio12-070724) but the same is failing in Solaris Studio 12.3.+
    Can someone please help me to understand the issue and resolve it? Let me know if any more information is needed.
    Thanks in advance.
    -Vijay
    Edited by: 974820 on Dec 4, 2012 7:05 PM

    Hi Steve,
    Thanks for the valuable input on the -xdebugformat option. Every suggestion of yours is helping me to proceed further to some extent. This time too, after removing the "-xdebugformat=stabs", I am able to go past the previous error.
    BUT this time I am running into -xarch option problem. I am not sure if this is a application design or compilation options issue or compiler issue. Posting it here to get some inputs to understand more on this before raising any service request with Oracle Support.
    The error details and workarounds used with their result._
    NOTE: All these compilation were passed in earlier Studio versions.
    ORIGINAL - with -xarch=sse2
    ===============================ERRORS===============================
    /opt/solarisstudio12.3/prod/bin/CC -errtags=yes -Kpic -mt -errwarn -xdepend=yes -DUSING_STUDIO11 common/xm2/x86/common/inc/templates.il -D__EXTENSIONS__ -g -xarch=sse2 -Icommon/xccolor/inc -Icommon/xm2/x86/include -Icommon/xm2/x86/assembly/inc -Icommon/xm2/x86/common/inc -Iinclude -Icommon/xm2/x86hbc/expander/inc -Icommon/xm2/x86/jpeg/inc -Icommon/xm2embedded/host/x86/hbc/inc -Icommon/xm2/common/inc -Iimg-drv//include -Icommon/xm2/config/inc -Icommon/Utilities/include -Iimg-drv/ipshared/include -Icommon/cpp/inc -I/workspaces/3rd_Party/open_source/poco-1.3.6p2/include -I/workspaces/3rd_Party/open_source/boost_1_49_0/include -I/workspaces/3rd_Party/open_source/ACE-6.0 -I/workspaces/osnl/include -I/workspaces/osnl/SunOS/include -m32 -c common/xm2/x86/hbc/src/hbc_jpeg.c -o artifacts/common/xm2/x86/obj/debug/sol32/hbc_jpeg.o
    Assembler:
    "/tmp/yabeAAAIaaOxX", line 294 : Syntax error
    Near line: " maskmovq %mm0,%ebp"
    "/tmp/yabeAAAIaaOxX", line 1175 : Syntax error
    Near line: " maskmovq %mm0,%ebp"
    Failure in /opt/solarisstudio12.3/prod/bin/fbe, status = 0x7f00
    Fatal Error exec'ing /opt/solarisstudio12.3/prod/bin/fbe
    common/xm2embedded/host/x86/src/hbc_jpeg.c:1062 Warning: mmextract_epi16 intrinsic requires -xarch=sse4_1.*
    cc: acomp failed for common/xm2/x86/hbc/src/hbc_jpeg.c
    gmake[1]: *** [_artifacts_/common/xm2/x86/obj/debug/sol32/hbc_jpeg.o] Error 2
    gmake[1]: *** Waiting for unfinished jobs....
    ===============================ERRORS===============================
    AFTER CHANGING -xarch=sse2 to -xarch=sse4_1
    ===============================ERRORS===============================
    /opt/solarisstudio12.3/prod/bin/CC -errtags=yes -Kpic -mt -errwarn -library=stlport4 -DCPU_LITTLE_ENDIAN -DDSP_LITTLE_ENDIAN -xarch=sse4_1 -DTIXML_USE_STL=1 -erroff=doubunder -g -Icommon/xm2/xm2util/src -Icommon/xm2/xm2util/inc -Icommon/xm2/common/inc -Icommon/xm2/config/inc -Icommon/xm2embedded/host/utils/inc -Icommon/xm2/imageutil/inc -Icommon/xm2/x86hbc/include -Icommon/include -Iinclude -Icommon/xcc/inc -Icommon/cpp/inc -Icommon/Util/include -I/workspaces/open_source/poco-1.3.6p2/include -I/workspaces/3rd_Party/open_source/boost_1_49_0/include -I/workspaces/3rd_Party/open_source/ACE-6.0 -I/workspaces/CP.00_compiler/docusp/osnlayer/include -I/workspaces/osnl/SunOS/include -m32 -c common/xm2/xm2/src/JPEGHelpers.cpp -o artifacts/common/xm2/xm2/src/obj/debug/sol32/JPEGHelpers.o
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 918: Error, nostructsym: Variable table is not a structure.
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 919: Error, nostructsym: Variable table is not a structure.
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 926: Error, nostructsym: Variable clear_high2bits is not a structure.
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 927: Error, nostructsym: Variable clear_high2bits is not a structure.
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 1223: Error, unassigned: The variable clear_high2bits has not yet been assigned a value.
    "common/xm2/xm2/src/JPEGHelpers.cpp", line 1224: Error, unassigned: The variable table has not yet been assigned a value.
    6 Error(s) detected.
    /opt/solarisstudio12.3/prod/bin/CC -errtags=yes -Kpic -mt -errwarn -library=stlport4 -DCPU_LITTLE_ENDIAN -DDSP_LITTLE_ENDIAN -xarch=sse4_1 -DTIXML_USE_STL=1 -erroff=doubunder -g -Icommon/xm2/xm2/src -Icommon/xm2/xm2/inc -Icommon/xm2/common/inc -Icommon/xm2/config/inc -Icommon/xm2/utils/inc -Icommon/xm2/imageutil/inc -Icommon/xm2/x86/include -Icommon/xm2/include -Iinclude -Icommon/xcc/inc -Icommon/cpp/inc -Icommon/Util/include -I/workspaces/3rd_Party/open_source/poco-1.3.6p2/include -I/workspaces/3rd_Party/open_source/boost_1_49_0/include -I/workspaces/3rd_Party/open_source/ACE-6.0 -I/workspaces/osnl/include -I/workspaces/osnl/SunOS/include -m32 -c common/xm2/xm2/src/Color.cpp -o artifacts/common/xm2/xm2/src/obj/debug/sol32/Color.o
    "common/xm2/xm2/inc/JPEGStripsImage.hpp", line 85: Error, badinitlval: Initializing std::vector<unsigned, xm2::XM2Allocator<unsigned>>& requires an lvalue.
    "common/xm2/image/inc/ISelector.hpp", line 36: Error, badinitlval: Initializing std::vector<unsigned, xm2::XM2Allocator<unsigned>>& requires an lvalue.
    "common/xm2/image/inc/RasterSelectorImage.hpp", line 53: Error, badinitlval: Initializing std::vector<unsigned, xm2::XM2Allocator<unsigned>>& requires an lvalue.
    3 Error(s) detected.
    6 Error(s) detected.gmake[1]: *** [_artifacts_/common/xm2/xm2/src/obj/debug/sol32/JPEGHelpers.o] Error 2
    gmake[1]: *** Waiting for unfinished jobs....
    3 Error(s) detected.gmake[1]: *** [_artifacts_/common/xm2/xm2/src/obj/debug/sol32/Color.o] Error 2
    ===============================ERRORS===============================
    Thank you.
    Vijay

  • Sorting a Vector by position in Alphabet

    Hey Folks,
    I have a Vector containing pairs of letters. e.g.
    ad
    ac
    de
    be
    bd
    Is it possible to sort the Vector by position in the Alphabet i.e. pairs beginning with 'a' are first, then those starting with 'b' etc... So would end up with something like:
    ac
    ad
    bd
    be
    de
    I'm not too bothered about the position of the second letter but would be a bonus if it was taken into consideration!
    Any help or suggestions would be great thanks.

    Please note that the code given sorts by Unicode value of the characters in the Strings (e.g. capital Z appears before lowercase a), NOT alphabetically. This may or may not be what you want.
    If you want to sort alphabetically (and/or for a specific locale), use a Collator as the second argument for the sort:Collections.sort(vector, Collator.getInstance(); // default locale of your machineorCollections.sort(vector, Collator.getInstance(Locale.US); // specific locale: US English

  • Is "version" broken in Solaris Studio 12.2?

    With 12.1, the "{Studio install path}/bin/version" command, when run with no arguments, produces output indicating that Sun Studio 12.1 is installed. With 12.2, there is no output that a script could use to determine which version of Studio is installed. It seems that when verison is invoked with no arguments, it attempts to read from the directory {Studio install path}/inventory. Our 12.1 installation has this directory, but it is not present in our 12.2 installation.
    Does anyone have a Studio 12.2 installation on Solaris 10 that does include an inventory directory?
    This is what my output from version looks like with 12.2:
    Machine hardware:   sun4u
    OS version:         5.10
    Processor type:     sparc
    Hardware:           SUNW,SPARC-Enterprise
    The following components are installed on your system:
    And this is what it looks like with 12.1:
    Machine hardware:   sun4u
    OS version:         5.10
    Processor type:     sparc
    Hardware:           SUNW,SPARC-Enterprise
    The following components are installed on your system:
    Sun Studio 12 update 1
    Sun Studio 12 update 1 C Compiler
    Sun Studio 12 update 1 C++ Compiler
    Sun Studio 12 update 1 Tools.h++ 7.1
    Sun Studio 12 update 1 C++ Standard 64-bit Class Library
    Sun Studio 12 update 1 Garbage Collector
    Sun Studio 12 update 1 Fortran 95
    Sun Studio 12 update 1 Debugging Tools (including dbx)
    Sun Studio 12 update 1 IDE
    Sun Studio 12 update 1 Performance Analyzer (including collect, ...)
    Sun Studio 12 update 1 Performance Library
    Sun Studio 12 update 1 Scalapack
    Sun Studio 12 update 1 LockLint
    Sun Studio 12 update 1 Building Software (including dmake)
    Sun Studio 12 update 1 Documentation Set
    Sun Studio 12 update 1 /usr symbolic links and GNOME menu item
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/cc": Sun C 5.10 SunOS_sparc 2009/06/03
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/CC": Sun C++ 5.10 SunOS_sparc 2009/06/03
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.4 SunOS_sparc 2009/06/03
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dbx": Sun DBX Debugger 7.7 SunOS_sparc 2009/06/03
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.7 SunOS_sparc 2009/06/03
    version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.9 SunOS_sparc 2009/06/03

    Nik - thanks for confirming that we aren't alone in seeing this behavior.
    Chris, thanks for explaining that this is the behavior that we should expect. I spent several hours considering if something might have gone wrong during the installation of Solaris Studio. My colleague who actually performed the installation will likely be almost as gratified as I am to review your explanation.
    By way of feeback, I would like to offer the following comments.
    1) It's regrettable that this functionality was removed without any sort of deprecation notice (at least, none that I could find, and I looked pretty hard). My colleagues and I spent several hours wondering what we did wrong since this wasn't working. Truss shows that the 12.2 bin/version tool still looks for the "inventory" directory and so the fact that it was missing suggested to me that something might have gone wrong with our installation.
    2) While the alternative pkginfo command you suggest is, as you described it, "parsable by humans", it's not especially script-friendly. A build script that only has the simple task of warning that you are using an unsupported older version of the Solaris Studio requires many lines of new logic to deal with this change, and one that has the more complex task of choosing different compiler args depending on the version of Sun/Solaris Studio that is being used really has to work overtime just to accommodate the inconsistent methods of identifying which version is in use.
    3) It would be really nice if there was some simple, script-friendly, way to discover what version is in use, and if that method was consistently supported from one release to the next, and if that method reported version numbers in ways that lend themselves to interpreation by scripts. I'm sure that there's some korn guru out there who can write one line of korn-shell code that will be able to conclude that pkginfo's value of "SPRO-12u2-cc" is greater than the 12.1 version's report of "Sun Studio 12 update 1", but I'm a "C" guy, not a script guru, so I wind up with a paragraph of korn shell code to pull this off. Can't we just have some program or (ideally) cc argument that spits out a string like "12.2"? It would be espeically sweet if it could do this on the first line of output (or even just a consistent offset from the first line).
    Sorry for the rant, I really do appreciate your explanation, and I hope my comments have not offended you.

  • Compiler Error after Upgrading Sun Studio 12 to Solaris Studio 12.3

    This code compiled with Solaris Studio CC: Sun C++ 5.9 SunOS_sparc Patch 124863-02 2007/12/18
    but fails to compile under CC: Sun C++ 5.12 SunOS_sparc Patch 148506-14 2013/09/24
    CC -features=zla -mt -g -library=Cstd  -DACE_HAS_KSTAT -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -D_POSIX_PTHREAD_SEMANTICS   -I/export/home/ttp/ACE_wrappers -DACE_HAS_SCTP -DACE_HAS_LKSCTP -D__ACE_INLINE__ -I../jpeg-6b -I../tiff-v3.5.7/libtiff/ -I../tags/ -I/RogueWave/SourcePro/12.5 -D_XPG4_2 -D__EXTENSIONS__ -D_RWCONFIG_15d -DRW_MULTI_THREAD -D_REENTRANT -DTTPVERSIONKEY=\"7.00-alpha-2013/11/15\" -DRW_USER_TRACE_LEVEL=5  -c -KPIC -o .shobj/julian.o julian.cc
    Error Message: "/opt/solarisstudio12.3/prod/include/CC/Cstd/rw/traits", line 538: Error: The function "wcsstr" must have a prototype
    If I add the -H to trace the headers this is what I get below. I have been fighting with this for a week now and really don't know what to do at this point. We use the RogueWave libraries with the Solaris Studio Compiler for more additional libraries but RogueWave says our version is compatible with Solaris Studio 12.3 and in fact we successfully compiled the RogueWave libraries with this compiler. I"m sure it something in our code but I can't quite figure it out.
    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.11.15 17:45:03 =~=~=~=~=~=~=~=~=~=~=~=
    gmake -f GNUmakefile.TTPLib
    GNUmakefile: /export/home/ttp/ttproot/ttp/TTPLib/GNUmakefile.TTPLib MAKEFLAGS=
    CC -features=zla -H -mt -g -library=Cstd  -DACE_HAS_KSTAT -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -D_POSIX_PTHREAD_SEMANTICS   -I/export/home/ttp/ACE_wrappers -DACE_HAS_SCTP -DACE_HAS_LKSCTP -D__ACE_INLINE__ -I../jpeg-6b -I../tiff-v3.5.7/libtiff/ -I../tags/ -I/RogueWave/SourcePro/12.5 -D_XPG4_2 -D__EXTENSIONS__ -D_RWCONFIG_15d -DRW_MULTI_THREAD -D_REENTRANT -DTTPVERSIONKEY=\"7.00-alpha-2013/11/15\" -DRW_USER_TRACE_LEVEL=5  -c -KPIC -o .shobj/julian.o julian.cc
    julian.h
            /usr/include/time.h
                    /usr/include/sys/feature_tests.h
                            /usr/include/sys/ccompile.h
                            /usr/include/sys/isa_defs.h
                    /usr/include/iso/time_iso.h
                    /usr/include/sys/types.h
                            /usr/include/sys/machtypes.h
                            /usr/include/sys/int_types.h
                            /usr/include/sys/select.h
                                    /usr/include/sys/time_impl.h
                                    /usr/include/sys/time.h
                                            /usr/include/sys/types.h
                                            /usr/include/sys/select.h
            defines.h
                    /opt/solarisstudio12.3/prod/include/CC/Cstd/deque
                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/stddefs.h
                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/stdcomp.h
                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/compnent.h
                                    /usr/include/stddef.h
                                            /usr/include/iso/stddef_iso.h
                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/rwdispatch.h
                            /opt/solarisstudio12.3/prod/include/CC/Cstd/algorithm
                                    /usr/include/stdlib.h
                                            /usr/include/iso/stdlib_iso.h
                                            /usr/include/iso/stdlib_c99.h
                                            /usr/include/sys/wait.h
                                                    /usr/include/sys/resource.h
                                                    /usr/include/sys/siginfo.h
                                                            /usr/include/sys/machsig.h
                                                    /usr/include/sys/procset.h
                                                            /usr/include/sys/signal.h
                                                                    /usr/include/sys/iso/signal_iso.h
                                                                            /usr/include/sys/unistd.h
                                                                    /usr/include/sys/ucontext.h
                                                                            /usr/include/sys/regset.h
                                                                                    /usr/include/v7/sys/privregs.h
                                                                                            /usr/include/v7/sys/psr.h
                                                                                            /usr/include/sys/fsr.h
                                                                            /usr/include/sys/signal.h
                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/iterator
                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/iterator
                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/ostream
                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/ios
                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/rwstderr.h
                                                                    /usr/include/stdarg.h
                                                                            /usr/include/iso/stdarg_iso.h
                                                                                    /usr/include/sys/va_impl.h
                                                                                            /usr/include/sys/va_list.h
                                                                            /usr/include/iso/stdarg_c99.h
                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/rwstderr_macros.h
                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/rwlocale
                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/string
                                                                            /usr/include/string.h
                                                                                    /usr/include/iso/string_iso.h
                                                                            /usr/include/ctype.h
                                                                                    /usr/include/iso/ctype_iso.h
                                                                                    /usr/include/iso/ctype_c99.h
                                                                            /usr/include/wchar.h
                                                                                    /usr/include/iso/wchar_iso.h
                                                                                            /usr/include/stdio_tag.h
                                                                                            /usr/include/wchar_impl.h
                                                                                            /usr/include/stdio.h
                                                                                                    /usr/include/iso/stdio_iso.h
                                                                                                            /usr/include/stdio_impl.h
                                                                                                    /usr/include/iso/stdio_c99.h
                                                                                    /usr/include/iso/wchar_c99.h
                                                                            /usr/include/wctype.h
                                                                                    /usr/include/iso/wctype_iso.h
                                                                                    /usr/include/iso/wctype_c99.h
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/string_ref
                                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/memory
                                                                                            /usr/include/limits.h
                                                                                                    /usr/include/iso/limits_iso.h
                                                                                                    /usr/include/sys/int_limits.h
                                                                                            /opt/solarisstudio12.3/prod/include/CC/new
                                                                                                    /opt/solarisstudio12.3/prod/include/CC/exception
                                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/utility
                                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/stdmutex.h
                                                                                                    /usr/include/pthread.h
                                                                                                            /usr/include/sched.h
                                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/traits
                                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/iotraits
                                                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/iosfwd
                                                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/traits
    "/opt/solarisstudio12.3/prod/include/CC/Cstd/rw/traits", line 538: Error: The function "wcsstr" must have a prototype.
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/stdexcept
                                                                    /opt/solarisstudio12.3/prod/include/CC/typeinfo
                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/locimpl
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/locvector
                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/vendor
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/ctype
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/numeral
                                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/iosbase
                                                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/limits
                                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/math.h
                                                                                                    /usr/include/math.h
                                                                                                            /usr/include/iso/math_iso.h
                                                                                                            /usr/include/iso/math_c99.h
                                                                                                            /usr/include/floatingpoint.h
                                                                                                                    /usr/include/sys/ieeefp.h
                                                                                            /usr/include/float.h
                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/codecvt
                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/usefacet
                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/streambuf
                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/istream
                    /opt/solarisstudio12.3/prod/include/CC/Cstd/set
                            /opt/solarisstudio12.3/prod/include/CC/Cstd/functional
                            /opt/solarisstudio12.3/prod/include/CC/Cstd/rw/tree
                    /usr/include/sys/param.h
            messages.h
                    /usr/include/assert.h
                    /opt/solarisstudio12.3/prod/include/CC/Cstd/list
                    /RogueWave/SourcePro/12.5/rw/trace/trace.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceSetState.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEventSeverity.h
                                    /RogueWave/SourcePro/12.5/rw/trace/pkgdefs.h
                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_trace.h
                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig.h
                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_trace_15d.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                            /RogueWave/SourcePro/12.5/rw/defs.h
                                                    /usr/include/assert.h
                                                    /RogueWave/SourcePro/12.5/rw/compiler.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/typedefs.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/limits.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/rwwind.h
                                                    /RogueWave/SourcePro/12.5/rw/compat.h
                                                            /RogueWave/SourcePro/12.5/rw/defs.h
                                                    /RogueWave/SourcePro/12.5/rw/utility.h
                                                            /RogueWave/SourcePro/12.5/rw/defs.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEvent.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEventClient.h
                                    /RogueWave/SourcePro/12.5/rw/trace/except.h
                                            /RogueWave/SourcePro/12.5/rw/rwerr.h
                                    /RogueWave/SourcePro/12.5/rw/trace/fwd.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEventClientImp.h
                                    /RogueWave/SourcePro/12.5/rw/trace/RWTraceEventFilter.h
                                    /RogueWave/SourcePro/12.5/rw/ref.h
                                            /RogueWave/SourcePro/12.5/rw/tools/atomic.h
                                                    /RogueWave/SourcePro/12.5/rw/tools/atomics/atomic_sunpro.h
                                                            /RogueWave/SourcePro/12.5/rw/tools/atomicorder.h
                                                            /usr/include/sys/atomic.h
                                                                    /usr/include/sys/inttypes.h
                                                                            /usr/include/sys/int_const.h
                                                                            /usr/include/sys/int_fmtio.h
                                                            /usr/include/stdint.h
                                                                    /usr/include/sys/stdint.h
                                    /RogueWave/SourcePro/12.5/rw/mutex.h
                                            /usr/include/synch.h
                                                    /usr/include/sys/machlock.h
                                                    /usr/include/sys/synch.h
                                            /usr/include/thread.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceOstreamClient.h
                                    /RogueWave/SourcePro/12.5/rw/rstream.h
                                            /RogueWave/SourcePro/12.5/rw/tools/ristream.h
                                            /RogueWave/SourcePro/12.5/rw/tools/rostream.h
                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/iostream
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceOstreamClientImp.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEventFilterImp.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceSingleClientFilter.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceSingleClientFilterImp.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceLevelFilter.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceLevelFilterImp.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceMultiClientFilter.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceMultiClientFilterImp.h
                                    /RogueWave/SourcePro/12.5/rw/tvordvec.h
                                            /RogueWave/SourcePro/12.5/rw/epersist.h
                                                    /RogueWave/SourcePro/12.5/rw/vstream.h
                                                    /RogueWave/SourcePro/12.5/rw/rwfile.h
                                                    /RogueWave/SourcePro/12.5/rw/toolerr.h
                                                            /RogueWave/SourcePro/12.5/rw/message.h
                                                    /RogueWave/SourcePro/12.5/rw/rwstore.h
                                                            /RogueWave/SourcePro/12.5/rw/rwassert.h
                                                            /RogueWave/SourcePro/12.5/rw/rwset.h
                                                                    /RogueWave/SourcePro/12.5/rw/hashtab.h
                                                                            /opt/solarisstudio12.3/prod/include/CC/Cstd/vector
                                                                            /RogueWave/SourcePro/12.5/rw/colclass.h
                                                                                    /RogueWave/SourcePro/12.5/rw/collect.h
                                                                                            /RogueWave/SourcePro/12.5/rw/stringid.h
                                                                                                    /RogueWave/SourcePro/12.5/rw/edefs.h
                                                                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIdentity.h
                                                                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsSame.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWFalseType.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTrueType.h
                                                                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTRemoveReference.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsLvalueReference.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsRvalueReference.h
                                                                                                    /RogueWave/SourcePro/12.5/rw/cstring.h
                                                                                                            /RogueWave/SourcePro/12.5/rw/tools/stdcstring.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/hash.h
                                                                                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTConditional.h
                                                                                                                    /RogueWave/SourcePro/12.5/rw/tools/cstrutil.h
                                                                                            /RogueWave/SourcePro/12.5/rw/mempool.h
                                                                                    /RogueWave/SourcePro/12.5/rw/iterator.h
                                            /RogueWave/SourcePro/12.5/rw/epfunc.h
                                            /RogueWave/SourcePro/12.5/rw/tools/algorithm.h
                                                    /RogueWave/SourcePro/12.5/rw/tools/iterator.h
                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTEnableIf.h
                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsIntegral.h
                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTRemoveCV.h
                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTRemoveConst.h
                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsConst.h
                                                            /RogueWave/SourcePro/12.5/rw/tools/traits/RWTRemoveVolatile.h
                                                                    /RogueWave/SourcePro/12.5/rw/tools/traits/RWTIsVolatile.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceManager.h
                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceManagerImp.h
                                    /RogueWave/SourcePro/12.5/rw/once.h
                                    /RogueWave/SourcePro/12.5/rw/tvslist.h
                                            /RogueWave/SourcePro/12.5/rw/stdex/slist.h
                            /RogueWave/SourcePro/12.5/rw/trace/userdefs.h
                                    /RogueWave/SourcePro/12.5/rw/trace/tracemacros.h
                                            /RogueWave/SourcePro/12.5/rw/tools/cstrstrm.h
                                                    /opt/solarisstudio12.3/prod/include/CC/Cstd/sstream
                                            /RogueWave/SourcePro/12.5/rw/trace/RWTraceEntryExit.h
                    /RogueWave/SourcePro/12.5/rw/sync/RWMutexLock.h
                            /RogueWave/SourcePro/12.5/rw/sync/pkgdefs.h
                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_sync.h
                                            /RogueWave/SourcePro/12.5/rw/config/rwc_sync_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_trace.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwc_trace_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_threxcept.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwc_threxcept_15d.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_tls.h
                                                                            /RogueWave/SourcePro/12.5/rw/config/rwc_tls_15d.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwconfig_trace.h
                                                                            /RogueWave/SourcePro/12.5/rw/config/rwc_trace_15d.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWSynchObject.h
                                    /RogueWave/SourcePro/12.5/rw/sync/RWCancellationState.h
                                    /RogueWave/SourcePro/12.5/rw/threxcept/threxcept.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRBoundsError.h
                                                    /RogueWave/SourcePro/12.5/rw/threxcept/pkgdefs.h
                                                            /RogueWave/SourcePro/12.5/rw/config/rwconfig_threxcept.h
                                                                    /RogueWave/SourcePro/12.5/rw/config/rwc_threxcept_15d.h
                                                    /RogueWave/SourcePro/12.5/rw/threxcept/thrmsg.h
                                                    /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRIllegalUsage.h
                                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRxmsg.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRExternalError.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRIllegalAccess.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRInternalError.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRInvalidPointer.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationAborted.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationCanceled.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationNotAvailable.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationNotImplemented.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationNotSupported.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHROperationTerminated.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRPermissionError.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRResourceLimit.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRThreadActive.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTHRThreadNotActive.h
                                            /RogueWave/SourcePro/12.5/rw/threxcept/RWTTHRCompatibleException.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTLockGuard.h
                                    /RogueWave/SourcePro/12.5/rw/sync/RWTLockGuardBase.h
                                            /RogueWave/SourcePro/12.5/rw/sync/RWTGuardBase.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTReadLockGuard.h
                                    /RogueWave/SourcePro/12.5/rw/sync/RWTReadLockGuardBase.h
                                            /RogueWave/SourcePro/12.5/rw/sync/RWTReadGuardBase.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTWriteLockGuard.h
                                    /RogueWave/SourcePro/12.5/rw/sync/RWTWriteLockGuardBase.h
                                            /RogueWave/SourcePro/12.5/rw/sync/RWTWriteGuardBase.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTTryLockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTTryReadLockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTTryWriteLockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTUnlockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTReadUnlockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWTWriteUnlockGuard.h
                            /RogueWave/SourcePro/12.5/rw/sync/RWThreadId.h
                    messageutilities.h
    "messages.h", line 248: Warning: Implicit int is not supported in C++.
    1 Error(s) and 1 Warning(s) detected.
    gmake: *** [.shobj/julian.o] Error 2
    tip1[~/ttproot/ttp/TTPLib]$

    I resolved this issue. The 2 defines: -D_XPG4_2 -D__EXTENSIONS__ are no longer needed and actually shouldn't be used.
    Dave

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

  • OpenGL via Solaris Studio

    Hello all!
    Present: Oracle Solaris 10 9/10 x86 and Solaris Studio 12.2
    Whether there is at whom skeleton for С\С ++ OpenGL application.
    I can not find the decision - how to begin

    I think there is no sample project for C/C++ with OpenGL. You are welcome to file RFE for this issue.
    If you have a C/C++ application that uses OpenGL, you can create a Project with Existing Sources.
    Thanks.
    Nik

  • Use of __typeof__ in Solaris Studio 12.4

    Solaris Studio 12.3 had a __typeof__ operator similar to decltype in C++11.  This is available in a portable wrapper using the Boost macro BOOST_TYPEOF_TPL.  It looks like the Solaris Studio team contributed the modification to Boost which added this in ticket 5745.
    Now Solaris Studio 12.4 has a C++11 mode which supports decltype.  However, is __typeof__ still supposed to work in Solaris Studio 12.4's C++03 mode?  It doesn't seem to work as well as it used to.
    The following program deduces the return type of operator() using __typeof__:
    #include <boost/typeof/typeof.hpp>
    #include <boost/type_traits/remove_reference.hpp>
    #include <iostream>
    #include <typeinfo>
    // Helper to deduce the result type from a member function pointer.
    template<typename T>
    struct member_function_result_type
    template<typename T, typename R, typename A1>
    struct member_function_result_type<R (T::*)(A1) const>
        typedef typename boost::remove_reference<R>::type type;
    template<typename T>
    struct function_result_type
        typedef BOOST_TYPEOF_TPL(&T::operator()) F;
        typedef typename member_function_result_type<F>::type type;
    template<typename R, typename A>
    struct function_result_type<R (*)(A)>
        typedef typename boost::remove_reference<R>::type type;
    struct my_functor
        float operator()(float numerator) const
            return numerator / 2.0f;
    int main(int, char **)
        typedef typename function_result_type<my_functor>::type my_type;
        my_functor f;
        my_type ret = f(5.0f);
        if (typeid(my_type) == typeid(float))
            std::cout << "As expected " << ret << std::endl;
        else
            std::cout << "Oh dear " << ret << std::endl;
        return 0;
    If you build this with Solaris Studio 12.3 as follows:
    CC -m64 -I/usr/local/include/boost-1_54 main.cc
    then it compiles and running a.out shows the return type of float has been correctly deduced.
    However, with Solaris Studio 12.4 the same command:
    CC -m64 -I/usr/local/include/boost-1_54 main.cc
    results in:
    "main.cc", line 23: Error: Unexpected type name "F" encountered.
    "main.cc", line 42: Warning: "typename" must be used within a template.
    1 Error(s) and 1 Warning(s) detected.
    Now, obviously Solaris Studio 12.4 has a C++11 mode and it is possible to get this program to work by changing BOOST_TYPEOF_TPL to decltype and building with:
    CC -std=c++11 -m64 -I/usr/local/include/boost-1_54 main.cc
    But Solaris Studio 12.4's C++11 mode has other problems, so is there any way to somehow get a working __typeof__ or equivalent in Solaris Studio 12.4's C++03 mode?
    (In case it makes any difference this is on Solaris 10 x86.)

    I couldn't see that any of the items listed in the "Enforcement of C++ rules" section of the documentation would affect this program.
    Here's a cut down version of the test program that doesn't use Boost:
    #include <iostream>
    #include <typeinfo>
    // Helper to deduce the result type from a member function pointer.
    template<typename T>
    struct member_function_result_type
    template<typename T, typename R, typename A1>
    struct member_function_result_type<R (T::*)(A1) const>
        typedef R type;
    template<typename T>
    struct function_result_type
        typedef __typeof__(&T::operator()) F;
        typedef typename member_function_result_type<F>::type type;
    template<typename R, typename A>
    struct function_result_type<R (*)(A)>
        typedef R type;
    struct my_functor
        float operator()(float numerator) const
            return numerator / 2.0f;
    int main(int, char **)
        typedef function_result_type<my_functor>::type my_type;
        my_functor f;
        my_type ret = f(5.0f);
        if (typeid(my_type) == typeid(float))
            std::cout << "As expected " << ret << std::endl;
        return 0;
    Interestingly this doesn't compile with either Solaris Studio 12.3 or Solaris Studio 12.4, but each gives different errors:
    Solaris Studio 12.3:
    CC -m64 main.cc
    >> Assertion:  unexpected type_builder::visit_unspec (../lnk/v2mangler.cc, line 1636)
        while processing main.cc at line 39.
    Solaris Studio 12.4:
    CC -m64 main.cc
    "main.cc", line 20: Error: Unexpected type name "F" encountered.
    1 Error(s) detected.
    So Solaris Studio 12.4 is basically failing in the same way as the original test program that used the Boost wrappers.  Solaris Studio 12.3 is failing with an assertion error that doesn't occur when the Boost wrappers are used.
    It turns out that __typeof__ was only used in one place in our codebase (wrapped by Boost), so I've just removed it and implemented that code in a different way.  So this isn't blocking upgrade of Solaris Studio, and we don't even have __typeof__ in our codebase any more, but I just thought you might be interested to have this program as a test case for future development.
    It works fine with clang++ in C++03 mode on Mac OS X so I doubt the problem is caused by the source code not conforming to standard:
    clang++ main.cc
    ./a.out
    As expected 2.5
    This case may be particularly tricky for a compiler to handle due to __typeof__ being applied to a pointer to a const member function.

  • Sorting a vector of objects?

    I'm having a real hard time sorting my vector, which contains objects that are made up of 4 Strings and 1 integer each.
    This is what I have for the sort routine, but something needs to go in the line that has "if (current.compareTo(smallest) < 0 )" to make it access the name fields of the current and smallest elements.
    Any ideas?
    Thanks,
    Mike
    private void sortname() {
         int nextslot;
         int max = cust_rex.size()-1;
         for (nextslot = 0; nextslot < max; nextslot++) {
              int j = getSmallestName(nextslot);
              swap (nextslot, j);
    private void swap(int a, int b) {
         Object temp = cust_rex.elementAt(a);
         cust_rex.setElementAt(cust_rex.elementAt(b),a);
         cust_rex.setElementAt(temp,b);
    private int getSmallestName (int k) {
         if (cust_rex == null || cust_rex.size() <= k)
              return -1; //error value
         int small = k;
         for (int i = k + 1; i < cust_rex.size(); i++) {
         Customer current = (Customer) cust_rex.elementAt(i);
         Customer smallest = (Customer) cust_rex.elementAt(small);
         if (current.compareTo(smallest) < 0 )
              small = i;
         return small;
         }

    Look at java.util.Comparator and write your own comparator. Then look at java.util.Collections and use the sort method from there instead of writing your own.

  • Sorting a vector of objects using attribute of object class as comparator

    i would like to sort a vector of objects using an attribute of object class as comparator. let me explain, i'm not sure to be clear.
    class MyObject{
    String name;
    int value1;
    int value2;
    int value3;
    i've got a Vector made of MyObject objects, and i would sort it, for instance, into ascending numerical order of the value1 attribute. Could someone help me please?
    KINSKI.

    Vector does not implement a sorted collection, so you can't use a Comparator. Why don't you use a TreeSet? Then you couldclass MyObject
      String name;
      int value1;
      int value2;
      int value3;
      // Override equals() in this class to match what our comparator does
      boolean equals (Object cand)
        // Verify comparability; this will also allow subclasses.
        if (cand !instanceof MyObject)
          throw new ClassCastException();
        return value1 = cand.value1;
      // Provide the comparator for this class. Make it static; instance not required
      static Comparator getComparator ()
        // Return this class's comparator
        return new MyClassComparator();
      // Define a comparator for this class
      private static class MyClassComparator implements Comparator
        compare (Object cand1, Object cand2)
          // Verify comparability; this will also allow subclasses.
          if ((cand1 !instanceof MyObject) || (cand2 !instanceof MyObject))
            throw new ClassCastException();
          // Compare. Less-than return -1
          if ((MyObject) cand1.value1 < (MyObject) cand2.value1))
            return -1;
          // Greater-than return 1
          else if ((MyObject) cand1.value1 > (MyObject) cand2.value1))
            return 1;
          // Equal-to return 0.
          else
            return 0;
    }then just pass MyObject.getComparator() (you don't need to create an instance) when you create the TreeSet.

  • Solaris Studio 12.4 ccfe signal 11 with boost::unordered_set in C  11 mode

    Using Solaris Studio 12.4 on Solaris 10 update 10 x86, the following program crashes ccfe:
    #include <boost/unordered_set.hpp>
    #include <string>
    int main(int, char **)
        boost::unordered_set<std::string> strSet;
        std::string str("test");
        strSet.insert(str);
        return 0;
    Assuming the code is saved to main.cc, build it in C++11 mode using:
    CC -v -std=c++11 -m64 -I/usr/local/include/boost-1_54 main.cc
    The output is:
    ### CC: Note: NLSPATH = /opt/solarisstudio12.4/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/solarisstudio12.4/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    ###     command line files and options (expanded):
    ### -v -std=c++11 -m64 -I/usr/local/include/boost-1_54 main.cc
    /opt/solarisstudio12.4/lib/compilers/ccfe -xarch=amd64 -std=c++11 -D__SunOS_5_10 -D__SUNPRO_CC=0x5130 -D__unix -D__SVR4 -D__sun -D__SunOS "-D__builtin_expect(e,x)=e" -D__x86_64 -D__x86_64__ -D__amd64 -D__amd64__ -D_LP64 -D__LP64__ -D__BUILTIN_VA_STRUCT -Dunix -Dsun -D__SUN_PREFETCH -D__SUNPRO_CC_COMPAT='G' -include /opt/solarisstudio12.4/lib/compilers/include/CC/gnu/builtins.h -include /opt/solarisstudio12.4/lib/compilers/include/CC/gnu/builtins-def.h -I/usr/local/include/boost-1_54 -I-xbuiltin -I/opt/solarisstudio12.4/lib/compilers/include/CC/gnu -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2//backward -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/include/c++/4.8.2/i386-sun-solaris2.10/amd64/ -I/opt/solarisstudio12.4/lib/compilers/include/cc -I/usr/include -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/lib/gcc/i386-sun-solaris2.10/4.8.2/include// -ptf /tmp/ccfe.1422033660.29374.03.%1.%2 -ptx /opt/solarisstudio12.4/bin/CC -ptk "-v -std=c++11 -m64 -I/usr/local/include/boost-1_54 " -compat=g -xdebuginfo=%none -xdbggen=dwarf+usedonly+incl -xF=%none -xbuiltin=%none -xldscope=global -xivdep=loop -O0 -xarrayloc main.cc -o /tmp/ccfe.1422033660.29374.01.ir 2> /tmp/ccfe.1422033660.29374.02.err
    /opt/solarisstudio12.4/lib/compilers/stdlibfilt -stderr < /tmp/ccfe.1422033660.29374.02.err
    >> Signal 11:
        while processing main.cc at line 0.
    rm /tmp/ccfe.1422033660.29374.02.err
    rm /tmp/ccfe.1422033660.29374.01.ir
    I know Boost 1.54 is not the most recent version, but the only changes to unordered_set.hpp between 1.54 and the current master branch in Boost's Git repository are Visual Studio 2013 workarounds, so I strongly suspect the same problem would occur with Solaris Studio 12.4 and more recent versions of Boost.
    This problem can be avoided by using std::unordered_set instead of boost::unordered_set.  However, since the compiler actually suffers a SEGV rather than giving a nice error message I thought I'd report this in case it's a sign of a problem in the compiler that might occur under other circumstances too.

    Thanks for the help.  Yes, sorry, I should have made clear that this is after trying to use Boost in C++11 mode.  I agree that the problem doesn't occur when using Solaris Studio in C++11 mode but Boost configured not to use any C++11 features.
    I made quite a few edits to the Boost code, including the ones Steve posted in this thread.  The edit that causes this problem to occur is the one to boost/config/compiler/sunpro_cc.hpp that removes all the BOOST_NO_CXX11_* macros.
    It sounds like I should just hold off trying to use Boost in C++11 mode until the next version of Solaris Studio is out.
    The pstack from the ccfe core dump is:
    core 'core.1503' of 1503:       /opt/solarisstudio12.4/lib/compilers/ccfe -xarch=amd64 -std=c++11 -D__
    ffff0000 ???????? (8041218, 8, fcf58e0, 0)
    082b7713 __1cPtemp_name_substKsubstitute6MrknQfull_syntax_name__1_ (8041260, 8041180) + 163
    082be63d __1cKexpr_substKvisit_name6MpnJname_expr__v_ (80413c0, ad65da8, 8041348, 8275d73) + fd
    082bc775 __1cKexpr_substKsubstitute6MpknEexpr__p1_ (80413c0, f2cab18, 80413a8) + 35
    082b858b __1cPtemp_name_substQsubst_single_arg6MnPtemplate_actual__k1_ (80415d0, 8041b10, f2cab18, 103, 8041570, 0) + 2fb
    082b8e10 __1cPtemp_name_substUsubstitute_temp_args6MrknbBtemplate_actuals_collection_pknXtemplate_parameter_list__1_ (8041890, 8041b10) + 150
    082ba050 __1cPtemp_name_substPvisit_temp_args6MrknbJsyntax_name_with_template_arguments__v_ (8041b10, fc9dd80, 8041ac0, 8041964) + 30
    082ba2c8 __1cPtemp_name_substFvisit6MrknQsyntax_name_impl4eInSsyntax_name_sort_t____v_ (8041b10, fc9dd80, fcf5610, 0) + 18
    082b76d1 __1cPtemp_name_substKsubstitute6MrknQfull_syntax_name__1_ (8041bf0, 8041b10) + 121
    082b526b __1cPtemp_type_substUvisit_name_dependent6MpnEtype_pnTname_dependent_type__v_ (8041eb0, f2e1aa4, f2e1a58, f2e21f0) + 5b
    082b3930 __1cPtemp_type_substTsubstitute_ret_type6MpnJfunc_type__pnEtype__ (8041eb0, f2e2178, 8041d08, 8041d60) + 30
    082b3c2c __1cPtemp_type_substKvisit_func6MpnEtype_pnJfunc_type__v_ (8041eb0, f2e21a0, f2e2178, f2e21f0) + 25c
    082ba941 __1cPtemp_type_substTexpand_in_func_type6MpnJfunc_type__2_ (8041eb0) + 31
    0816b754 __1cIfunc_symRnew_template_spec6kMrknbBtemplate_actuals_collection_rknIposition__pnDsym__ (f2e21f0) + c4
    082c941b __1cQtemplate_matcherIgen_func6M_pnIfunc_sym__ (8042050, ad62d58, ad65960, 0) + 59b
    0828af3f ???????? (80420f4, ad65940, 80421a0, 0, ad62c50, 0)
    0828b2c9 __1cNoverload_call6FpnJcall_expr_rknJsym_array_4brknbBtemplate_actuals_collection_nEtypeKtype_class_b_2_ (8042198, ad65940, 804219c, 80421a0, 0, ad62c50) + 99
    08204c38 ???????? (ad65940)
    082086ff __1cLtypify_call6FpnJcall_expr_I_pnEexpr__ (ad65940, 4, 0, fd33148) + 9bf
    081e36a5 __1cXtypify_dispatch_visitorKvisit_call6MpnJcall_expr__v_ (8042530, ad65940, 0, 0) + 15
    081e4529 __1cGtypify6FpnEexpr_I_1_ (ad65940, 4, 0, 0) + c9
    082b1e0a __1cJexpr_stmtOpass_thru_expr6MpnEexprHvisitor__v_ (ad659a0, 80425b0, 0, 83bb23e) + 1a
    081e3cd1 __1cXtypify_dispatch_visitorPvisit_statement6MpnOstatement_expr__v_ (8042660, ad62b28, 8042608, 83bbbe9) + 71
    081e4529 __1cGtypify6FpnEexpr_I_1_ (ad62b28, 0, 8759ec0, fc9b740) + c9
    08266956 __1cWstore_inline_func_body6FpnIfunc_sym_pnFscope_bb_pnEexpr__ (fd2fc80, fc9b740, 1, 1) + 426
    082700c8 __1cSinline_bookkeepingOprocess_inline6MpnIfunc_sym_pnJcall_expr_pnEexpr__6_ (8d61508) + 268
    08270542 __1cSinline_bookkeepingNexpand_inline6MpnJcall_expr_pnEexpr__4_ (8d61508, ad5ecf8, 87594a8, 0) + f2
    081e10e3 ???????? (ad5ecf8, 80005, 8043208, 85a44ab)
    081d673e __1cWbind2_dispatch_visitorKvisit_call6MpnJcall_expr__v_ (8043220, ad5ecf8, fd1e6b8, fcb9a40) + 9e
    081d7662 __1cHbind2erKbind2_body6FpnEexpr_I_2_ (ad5ecf8, 80005, 8043288, 0) + a2
    082a94e7 ???????? (ad5ecf8, 0, 0, 0)
    082aaaf3 __1cRstmt_bind_visitorKvisit_expr6MpnJexpr_stmt__v_ (8043350, ad5ed58, 80432f8, 804337c) + 93
    082a8f2f __1cRstmt_bind_visitorOstmt_list_bind6MpnJstatement__2_ (8043350, ad5ed58, 2211, 7fefefef) + 8f
    082b06b5 __1cRstmt_bind_visitorPvisit_statement6MpnOstatement_expr__v_ (8043350) + b5
    082a9294 __1cJstmt_bind6FpnOstatement_expr_b_v_ (ad5bef0) + b4
    081df9c6 ???????? (ad5bef0, 0, 8043428, 8272a37)
    081d6e18 __1cWbind2_dispatch_visitorPvisit_statement6MpnOstatement_expr__v_ (8043420, ad5bef0, 8043448, 8043494) + 98
    081d7662 __1cHbind2erKbind2_body6FpnEexpr_I_2_ (ad5bef0, 0, 8043488, 81710d5) + a2
    082726f0 __1cSinline_bookkeepingQfinish_expansion6MrnbDfunction_definition_interface_pnEexpr__4_ (8d61508, fd2b46c, ad5bef0, 0) + 160
    081e10f9 ???????? (ad4b210, 80005, 8043528, 82759da)
    081d673e __1cWbind2_dispatch_visitorKvisit_call6MpnJcall_expr__v_ (8043520, ad4b210, 0, fcb9a40) + 9e
    081d7662 __1cHbind2erKbind2_body6FpnEexpr_I_2_ (ad4b210, 80005, 8043578, ad55cc0) + a2
    082a94e7 ???????? (ad4b210, 0, 0, 0)
    082aaaf3 __1cRstmt_bind_visitorKvisit_expr6MpnJexpr_stmt__v_ (8043650, ad4b270, fd1e668, 874cef8) + 93
    082a8f2f __1cRstmt_bind_visitorOstmt_list_bind6MpnJstatement__2_ (8043650, ad4a7b0, 1, 7fefefef) + 8f
    082b06b5 __1cRstmt_bind_visitorPvisit_statement6MpnOstatement_expr__v_ (8043650) + b5
    082a9294 __1cJstmt_bind6FpnOstatement_expr_b_v_ (ad4a520) + b4
    081d6e18 __1cWbind2_dispatch_visitorPvisit_statement6MpnOstatement_expr__v_ (8043720, ad4a520, 8043748, 8043794) + 98
    081d7662 __1cHbind2erKbind2_body6FpnEexpr_I_2_ (ad4a520, 0, 8043788, 81710d5) + a2
    082726f0 __1cSinline_bookkeepingQfinish_expansion6MrnbDfunction_definition_interface_pnEexpr__4_ (8d61508, fc7b144, ad4a520, 0) + 160
    081e10f9 ???????? (ad035e8, 80005, fd1e368, 85a4400)
    081d673e __1cWbind2_dispatch_visitorKvisit_call6MpnJcall_expr__v_ (8043820, ad035e8, acffdb8, fcb9a40) + 9e
    081d7662 __1cHbind2erKbind2_body6FpnEexpr_I_2_ (ad035e8, 80005, 8043878, 0) + a2
    082a94e7 ???????? (ad035e8, 0, 0, 0)
    082aaaf3 __1cRstmt_bind_visitorKvisit_expr6MpnJexpr_stmt__v_ (80439c0, ad03648, ad03668, 8759ec0) + 93
    082a8f2f __1cRstmt_bind_visitorOstmt_list_bind6MpnJstatement__2_ (80439c0, acf9468, 0, 82d7323) + 8f
    082afb6b __1cRstmt_bind_visitorWvisit_function_variant6MpnNfunction_stmt_b_v_ (80439c0, ad04358, 1, 8043a30) + 46b
    082afe10 __1cRstmt_bind_visitorOvisit_function6MpnNfunction_stmt__v_ (80439c0, ad04358, ad04378, 8759ec0) + 40
    082a916f __1cUstmt_bind_and_expand6FpnJstatement__1_ (ad04358, 3, fc55f4b, 80443c4) + 11f
    08257545 __1cMfunc_contextJpostamble6MrnbDfunction_definition_interface_pnNfunction_stmt__v_ (871cc98) + d5
    082e879d __1cTimmediate_func_body6FpnIfunc_sym__v_ (fbd3840, fbd3390, 8044dd0, 821b71f) + 3fd
    08266428 __1cMparse_inline6FrnbDfunction_definition_interface__v_ (fbd385c, fbd38cc, 8044eb0, 95a38d4) + 188
    084db8c8 __1cLemit_inline6FpnIsym_list__v_ (fca5328, fca5328) + 2d8
    084d88f1 __1cQcompilation_unitFclean6M_b_ (8759310) + a1
    084dd507 __1cIfinalgen6F_v_ (8c3ffa8, 8759178, 8046eb8, 815db68, 1, 8c41eb8) + 67
    082f533b __1cGanalys6Fb_v_ (1, 8c41eb8, 8046eb8, 815d5d7) + db
    0815db68 __1cHtmcplus6Fri0bpnHoptions__nHsym_set__ (8046f00, 8046ef8, 8046efc, 1, 8c4ced8, 86417b1) + 2be8
    082e5943 main     (34, 8047360, 8047434) + 283
    08153f22 _start   (34, 8047514, 804753e, 804754b, 8047556, 8047565) + 72

Maybe you are looking for

  • I have an ipod nano 2nd generation with a non responsive click wheel

    I have an ipod nano 2nd generation with a non responsive click wheel. I have fully charged it tried resetting it and on two different computers with the latest iTunes I have restored it with the latest firmware then moved it to hold and off hold held

  • VPN fails to connect

    Does anyone know if the VPN option works?  It is under setting, wireless network, VPN settings.  I have a PPTP connection that works fine from my desktop but "fails to connect to server" when tried on my phone. 

  • CHUD tools universal ?

    Does anyone know if the latest CHUD dev tools (4.3.2) are Universal binaries? I want to use some of the tools but I noticed there are pref panes in the tool set and I don't want them if they aren't Universal. Anyone know? Peter

  • Cat 3750-Span (Port Mirroring issue)

    Hello team I am facing port mirroring issue in my setup. Details of the setup are mentioned below Setup-- Stack of 4 catalyst switches WS-C3750X-48P running software 15.0(1) SE3 .Approximately 12 vlans are configured in this setup and port mirroring

  • How to get which tables are being updated by running any transaction code

    Hi experts, please tell me how to find which system table are being updated after running any transaction code . please tell me the procedure to find that. Thanks & Regards, Yogesh