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
8
votes
1 answer

Solaris 11 seems to be missing system header files

I've installed Solaris 11 x86 (in a qemu environment) from here: http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html I've untar'd into /opt Sun Studio 12.3 x86 for Solaris 11 from here:…
Z.T.
  • 939
  • 8
  • 20
7
votes
1 answer

Mixing PIC and non-PIC objects in a shared library

This question is related to this one as well as its answer. I just discovered some ugliness in a build I'm working on. The situation looks somewhat like the following (written in gmake format); note, this specifically applies to a 32-bit memory…
Brian Vandenberg
  • 4,011
  • 2
  • 37
  • 53
6
votes
2 answers

Template compilation error in Sun Studio 12

We are migrating to Sun Studio 12.1 and with the new compiler [ CC: Sun C++ 5.10 SunOS_sparc 2009/06/03 ]. I am getting compilation error while compiling a code that compiled fine with earlier version of Sun Compiler [ CC: Sun WorkShop 6 update 2…
5
votes
2 answers

Building Boost on Solaris

Will Boost build in entirety on Solaris? I'd like to know if anyone has success with this (specifically Proto/Spirit) before I go and pay for a support contract to patch Sun Studio 12.2 to the latest. I get a few errors and some look to have been…
chrism
  • 561
  • 4
  • 14
5
votes
1 answer

Warning on field init order, signed comparison, and unused vars in VC++ & Sun Studio

I am hoping to enable warnings for the following C++ compilation issues and corresponding compilers: Unused variables -- Sun Studio CC Example: void m() { int i = 10; } Signed to unsigned comparison - VC++ and Sun Studio CC Example: if ((unsigned)…
Nick
  • 5,765
  • 5
  • 27
  • 36
5
votes
1 answer

Zero sized arrays and array bounds checking

When compiled with either GNU Fortran (v4.4.3) or Sun Studio F95 (v8.3) and no array bounds checking the following program runs without error. However, when array bounds checking is switched on (gfortran -fbounds-check and f95 -C, respectively) the…
Deditos
  • 1,385
  • 1
  • 13
  • 23
5
votes
2 answers

Sun Studio linking gcc libs: exceptions do not work

I need to build an application with Sun Studio. This application uses a shared library which can only be build with Gnu C++. The shared lib has a C Interface, so that the code is callable by the Sun Compiler (this is to avoid name mangling issues,…
Beginner
  • 5,277
  • 6
  • 34
  • 71
4
votes
0 answers

SunCC std::allocator and size_type max_size(size_type) const member function?

We use a custom allocator that zeroizes memory. There's not much to it. It has the types and member functions described at std::allocator. I recently used the custom allocator for a std::vector (with A the allocator), which is a new…
jww
  • 97,681
  • 90
  • 411
  • 885
4
votes
4 answers

Is there a way to speed up C++ compilation times in Solaris Sun Studio 12?

Since I am compiling my C++ code on a very server box (32 or 64 cores in total), is there a way of tweaking compiler options to speed up the compilation times? E.g. to tell compiler to compile independent .cpp files using multiple threads.
Steve
  • 551
  • 2
  • 8
  • 18
4
votes
1 answer

Compiling boost on Sunos

I have just started with using boost libraries. For one of our projects i want to compile Boost 1.39.0 on Sun OS using sun compiler. However if i compile it using steps mentioned in…
Yogesh Arora
  • 2,216
  • 2
  • 25
  • 35
3
votes
5 answers

struct definition inside main() causing Segmentation Fault

Is it not possible to define structure inside main() . I tried the following only to get a Segmentation Fault: #include #include #include #define TRUE 1 void main(int argc,char **argv) { struct test_struct { …
tomkaith13
  • 1,717
  • 4
  • 27
  • 39
3
votes
4 answers

Alignment in SunStudio C++ compiler

I need to declare type alias for 2 bytes variable aligned by 4 bytes. In GCC, XL C/C++ (AIX), aCC (HP-UX) I can use this code: typedef uint16_t AlignedType __attribute__ ((aligned (4))); In Windows I can use: typedef __declspec(align(4)) unsigned…
platerx
  • 31
  • 1
3
votes
5 answers

How to silence 'The last statement should return a value' warning?

Sun Studio 12.1 prints the warning Warning: The last statement should return a value. frequently for functions like that: int f() { /* some code that may return */ // if we end up here, something is broken throw std::runtime_error("Error…
lytenyn
  • 819
  • 5
  • 21
3
votes
3 answers

Sun Studio 10 has strange `sun` constant?

Strangely, the following C++ program compiles on Sun Studio 10 without producing a warning for an undefined variable: int main() { return sun; } The value of sun seems to be 1. Where does this variable come from and what is it for?
lytenyn
  • 819
  • 5
  • 21
3
votes
4 answers

SunStudio C++ compiler pragma to disable warnings?

The STLport bundled with the SunStudio11 generates alot of warnings. I beleive most compilers have a way to disable warnings from certain source files, like this: Sun C #pragma error_messages off #include // ... #pragma error_messages…
Andrew
  • 636
  • 1
  • 9
  • 16
1
2 3 4 5