Questions tagged [sunstudio]

Oracle Developer Studio, formerly Oracle Solaris Studio, Sun Studio, Forte, & Sun Workshop, includes compilers for C, C++, and Fortran; an IDE and debugger; performance and code analyzers; and other tools for developing on the Solaris and Linux OS'es.

Oracle Developer Studio is a developer tool suite Oracle acquired when it bought Sun Microsystems. At Sun it went through many names, including Sun Studio, Forte, Sun Workshop, and SunPro.

The suite currently includes compilers for C, C++, and Fortran; an IDE based on NetBeans; an enhanced version of the classic Unix dbx debugger; performance, thread, and code analyzers; and other tools for developing & debugging on the Solaris and Linux OS'es.

Documentation is available from http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/index.html.

Downloads and more information can be found at Oracle’s Solaris Studio web page.

74 questions
3
votes
1 answer

CMake fails to generate Makefiles with Sun Studio 12.5

I'm working on Solaris 11.3 with Sun Studio 12.5. When I attempt to configure with Cmake out-of-tree, Cmake finishes with configuration errors and does not produce the makefiles. In-tree may be broken, too. But our procedures say to build…
jww
  • 97,681
  • 90
  • 411
  • 885
3
votes
2 answers

How to swap two __m128i variables in C++03 given its an opaque type and an array?

What is the best practice for swapping __m128i variables? The background is a compile error under Sun Studio 12.2, which is a C++03 compiler. __m128i is an opaque type used with MMX and SSE instructions, and its usually and unsigned long long[2].…
jww
  • 97,681
  • 90
  • 411
  • 885
3
votes
3 answers

difference between -h and -o options in cc (C++)

I am building .so library and was wondering - what is the difference b/w -h and -o cc complier option (using the Sun Studio C++) ? Aren't they are referring to the same thing - the name of the output file?
Steve
  • 551
  • 2
  • 8
  • 18
3
votes
1 answer

solarisstudio12.3 installation on Solaris 11 machine

I am trying to install solaris studio 12.3 on a Solaris 11 x86 machine. I have downloaded oracle cert and key from mentioned link, but while publishing am getting following error. pkg set-publisher -k Oracle_Solaris_Studio.key.pem -c…
bhardwajhp
  • 43
  • 1
  • 8
2
votes
2 answers

const to non-const pointer template argument conversion

VC10 and GCC 4.4 accept the following, while Sun Studio 12 does not: std::pair p1; std::pair p2; p1 = p2 Sun Studio 12 complains: Error: Cannot use std::pair to initialize std::pair
Nick
  • 5,765
  • 5
  • 27
  • 36
2
votes
2 answers

template friend of template class fails in Sun Studio C++

I have a problem with giving a template class a template friend in Sun Studio. The code compiles fine with GNU G++ (4.4.1 and 4.4.3), but fails with Sun Studio C++ (5.9 SunOS_sparc Patch 124863-01 2007/07/25). Here is a minimal example: // Forward…
felix
  • 175
  • 4
2
votes
1 answer

Issue with std::BinaryPredicate using Solaris CC

I have a problem on Solaris using the Sun Studio compiler. It seems related to libCstd. Consider the following code : #include static bool f(double fFreq1, double fFreq2) { return false; } int main() { std::list< double > l; …
ghi
  • 21
  • 1
2
votes
1 answer

Sun compiler's equivalent of gcc's __sync_fetch_and_add? aka Oracle Studio 12.2

Does the Oracle (Sun) Studio 12.2 C/C++/Fortran compiler for Linux 64-bit have an equivalent to the __sync_fetch_and_add function that is provided in gcc? I can't seem to find the wrapper code for the intel atomics in the Sun documentation nor the…
Geoffrey Anderson
  • 1,534
  • 17
  • 25
2
votes
3 answers

Warning: should not initialize a non-const reference with a temporary

I get the warning from the title on Sun Studio 12.1 with the following snippet: #include std::vector g() { std::vector result; result.push_back(5); return result; } int main() { int b = g()[0]; // <- Warning in this…
lytenyn
  • 819
  • 5
  • 21
2
votes
1 answer

What causes SunCC crash in bfd_asm.c?

I'm trying to track down the cause of a SunCC compiler crash. It has been around since the early SunCC 12.x days, and it is present in the latest SunCC 12.6. The crash happens when attempting to multiply polynomials on x86 systems. The code below is…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
2 answers

Warning (Anachronism): Assigning void(*)(int) to extern "C" void(*)(int)

I'm having trouble with Sun's C++ compiler. I've read Oracle's Working with Pointers to Functions [from C++]. Its a good read, and I get the impression SunCC is most compliant among all the compilers in this area (though its causing me trouble). The…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
3 answers

Linking Error in Sun Studio 10 under Solaris

I wrote a test program like this: #include int main( void ) { int sock = socket(AF_INET, SOCK_DGRAM, 0); return 0; } And tried to compile it: $ /tool/sunstudio/bin/cc test.c Undefined first referenced …
Siddiqui
  • 7,662
  • 17
  • 81
  • 129
2
votes
3 answers

Detect -xarch option in the preprocessor?

I'm using Sun Studio 12.4 and 12.5 on Solaris 11. We have a source file that provides a straight C/C++ implementation of CRC32, or an optimized version of CRC32 using Intel intrinsics. At runtime, a function pointer is populated with the proper…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
1 answer

SSE3/SSSE3 + AES/RDRAND/RDSEED under Sun Studio

I'm working under Sun Studio 12.3 on SunOS 5.11 (Solaris 11.3). I'm tuning a script that includes negative tests, and that includes odd combinations of CPU features. We do this to understand if and how we fail; and to ensure there are no unexpected…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
2 answers

ube error: _mm_aeskeygenassist_si128 intrinsic requires at least -xarch=aes

I'm working under Sun Studio 12.3 on SunOS 5.11 (Solaris 11.3). Its providing a compile error that I don't quite understand: $ /opt/solarisstudio12.3/bin/CC -xarch=sse2 -xarch=aes -xarch=sse4_2 -c test.cxx "test.cxx", line 11: ube: error:…
jww
  • 97,681
  • 90
  • 411
  • 885