Vertical block selection in Sun Studio edtior?

May be it's a trivial question but I didn't figure it out. Is there a way to make vertical (block) selection in Sun Studio editor? I like this feature in some other source code editors and really it's something basic to expect from any modern IDE.

Actually this request was already opened in 2001:
http://www.netbeans.org/issues/show_bug.cgi?id=13857
I submitted a comment there. There are some plugins it seems which enable it in some fasion, but not really integrated with visual selection etc.

Similar Messages

  • Rectangular Selection in Sun Studio 12?

    Hi everybody,
    I just started using sunstudio for C++ developement. I wonder if it is possible to do rectangular selections in the editor window. (+cut&paste) I didn't find anything about that using the forum search, Google and playing around with the usual shortcuts.
    Thanks
    Wolfram Stumpf

    Would the following be useful?
    http://blogs.sun.com/scblog/entry/rectangular_edit_tools_module_uploaded

  • Sun Studio 12 in SXDE 9/07 VMWare image

    Having a terrible time getting Sun Studio 12 to work in SXDE 9/07 VMWare image.
    My main problem is that SunStudio refuses to compile anything. Firstly I couldn't get rid of "Could not successfully run the cc compiler to configure the built-in source file parser..." messgage. I've tried putting /opt/SUNWspro/bin in the PATH ahead of everything else, as has been suggested in a few other Sun Studio forums, but that doesn't seem to help. I've modified this in the .profile and restarted Sun Studio, even logged out and back in again, and the PATH setting is there, but Studio keeps giving me that message.
    Next, when I press F5 for Welcome project there's a flashing Stop sign in the bottom right corner pointing to exception dump in messages.log
    IOException java.io.IOException: Cannot run program "CC": error=12, Not enough space
    *********** Exception occurred ************ at 6:37 AM on Oct 14, 2007
    java.io.IOException: Cannot run program "/opt/netbeans-5.5.1/cnd1/bin/stdouterr.sh" (in directory "/export/home/ted/SunStudioProjects/Welcome"): error=12, Not enough space
    Anybody have any tips? I can't believe this isn't documented somewhere more fully, since this is right out of the box (figuratively speaking).

    Could you please check the SWAP size on you SXDE.
    Looks like the problem is here.
    For example, on my machine there are only 512M of SWAP.
    bash-3.00$ /usr/sbin/swap -lh
    swapfile dev swaplo blocks free
    /dev/dsk/c0d0s1 102,1 4K 512M 504M
    And, as mention in Sun Studio System Requirements (http://docs.sun.com/source/820-2973/release_notesML.html#SystemReqs),
    Swap space should be minimum 1Gb(Recommended: 2 to 4 Gbytes).
    You can expand swap on your machine this way:
    bash-3.00$ su -
    Password:
    Sun Microsystems Inc. SunOS 5.11 snv_70b October 2007
    bash-3.00# mkfile 512m /export/home/moreswap
    // Or you can select swap file where you have enough space.
    bash-3.00# /usr/sbin/swap -a /export/home/moreswap
    bash-3.00# /usr/sbin/swap -lh
    swapfile dev swaplo blocks free
    /dev/dsk/c0d0s1 102,1 4K 512M 499M
    /export/home/moreswap - 4K 512M 512M
    After you increase SWAP space as required, there should not any exceptions.

  • Installing Sun Studio 12 on Ubuntu 8.04

    When I try to install Sun Studio 12 with the graphical installer, I get a message half was through that Java is not installed. In my case Sun's Java was already installed. I tell the Sun Studio installer to do the update and it finished what it was doing. After the install is done, I found that the Sun Studio executable is missing, so it looked like the installation did not work. What version of Java is Sun Studio expecting and does it need to be tied to a specific path? Is there a known method for installing Java for Sun Studio 12?
    After this I uninstalled Java and Netbeans and started the system prep tool, which correctly said I was missing netbeans and java. I had the system prep tool install netbeans successfully but I get this message when trying to install java:
    error: Failed dependencies:
    glibc >= 2.1.2-11 is needed by jdk-1.5.0_09-fcs.i586
    sh-utils >= 2.0-1 is needed by jdk-1.5.0_09-fcs.i586
    fileutils >= 4.0-8 is needed by jdk-1.5.0_09-fcs.i586
    gawk >= 3.0.4-1 is needed by jdk-1.5.0_09-fcs.i586
    textutils >= 2.0-2 is needed by jdk-1.5.0_09-fcs.i586
    /bin/sh is needed by jdk-1.5.0_09-fcs.i586
    Any suggestions?

    I could not find any log files with error information from Express or Sun Studio 12. Any ideas?Not yet :-) Can you try to build and debug a sample project? Does it show the same problem?
    I mean one of several sample projects, that are shipped with the Sun Studio IDE.
    Start "sunstudio", from main menu: "File->New Project", select Samples->C/C++/Fortran->Welcome
    Did you try to run compilers and other tools?
    Please, make sure they work. For example, run the following commands:
    cc -V
    CC -V
    f90 -V
    collect -V
    dbx -V
    dmake -v
    (Note: the last one is small "v")

  • What Function/Features you want to have in next Sun Studio release?

    Hello,
    My name is Ngoc Nguyen, from Sun Studio product team. We just shipped Sun Studio 12 ML release (for C, C++, Fortran compiler) past few weeks. We start working on the next release. This is the right time for the community to tell us what feature you want to change or add into next release.
    HOW?
    Please use the following instruction. It seems long at start, but both you and Sun will get benefit from it on the long run. i.e: By this way, All of your suggestion/request will be logged into our worldwide database system and is assigned an Request for Enhancement (*RFE*) ID. Later You can view the progress of your suggestion/request by using this RFE ID.
    - Go to http://bugreport.sun.com/bugreport/
    Check the box at the bottom of the page
    Click on "Start a new Report"
    - Select the following
    Type = Request for Enhancement
    Product/Category = C/C++/Fortran Compilers and Tools - Misc
    Subcategory = C/C++/Fortran Compilers and Tools - Misc
    Release = Other
    Operating System = <your choice>
    - Click on "Continue"
    - On the next screen, you only need to fill out the required fields indicated by *.
    - The "Synopsis" field should be start with "VOC" word. VOC stands for "Voice of Customer". i.e: "VOC: I want to increase performance on xxxxx component".
    - The "Justification" field is important too. general statement like "It is important for us" may not look attractive.
    - After all, click on "Submit"
    This input collection process will last 10 days and will be ended on Wed Oct/31st.
    Looking forward to hear from you.
    Best Regards,
    Ngoc Nguyen
    IMPORTANT: Please don't post your suggestion/request on this forum thread because nobody will help you to log your suggestion into Sun System. Please use the method I outlined above.

    Hello,
    My name is Ngoc Nguyen, from Sun Studio product team. We just shipped Sun Studio 12 ML release (for C, C++, Fortran compiler) past few weeks. We start working on the next release. This is the right time for the community to tell us what feature you want to change or add into next release.
    HOW?
    Please use the following instruction. It seems long at start, but both you and Sun will get benefit from it on the long run. i.e: By this way, All of your suggestion/request will be logged into our worldwide database system and is assigned an Request for Enhancement (*RFE*) ID. Later You can view the progress of your suggestion/request by using this RFE ID.
    - Go to http://bugreport.sun.com/bugreport/
    Check the box at the bottom of the page
    Click on "Start a new Report"
    - Select the following
    Type = Request for Enhancement
    Product/Category = C/C++/Fortran Compilers and Tools - Misc
    Subcategory = C/C++/Fortran Compilers and Tools - Misc
    Release = Other
    Operating System = <your choice>
    - Click on "Continue"
    - On the next screen, you only need to fill out the required fields indicated by *.
    - The "Synopsis" field should be start with "VOC" word. VOC stands for "Voice of Customer". i.e: "VOC: I want to increase performance on xxxxx component".
    - The "Justification" field is important too. general statement like "It is important for us" may not look attractive.
    - After all, click on "Submit"
    This input collection process will last 10 days and will be ended on Wed Oct/31st.
    Looking forward to hear from you.
    Best Regards,
    Ngoc Nguyen
    IMPORTANT: Please don't post your suggestion/request on this forum thread because nobody will help you to log your suggestion into Sun System. Please use the method I outlined above.

  • Exception not always caught in Sun Studio 12

    Hi,
    We're using Sun Studio 12 (Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25) on a Solaris 10 SPARC machine. In our applications an exception thrown is sometimes not caught in the try/catch statement and the program continues at an outer catch statement (which usually leads to the program exiting). So far I've not been able to reduce the code down to a simple example and I don't yet know what conditions causes this behaviour.
    In general the code has a big try/catch statement in main. Somewhere deep in the code there is a second try/catch statement which protects against a piece of code which we know may throw an exception. This is usually a smart pointer being dereferenced. The act of dereferencing the smart pointer in turn causes an exception to be thrown which is caught internally in a third try/catch inside the dereference code. The exception is successfully caught and some clean up is done. Then the exception is re-thrown by either using a throw; statement or a new throw xmsg("...");. All our exceptions are always of type xmsg which simply takes a string argument.
    When the problem manifests itself the second try/catch is ignored and the re-thrown exception is instead caught in the outer catch statement in main which causes the program to log an error and exit.
    We have lots of code which is structured the same way and the same style of code works in many cases only to fail in some specific case. It's an elusive problem because the problem moves around and it also depends on how the program is compiled. It only seems to happen when compiled in debug mode. If I compile with -xO4 the problem seems to go away.
    The problem also goes away or moves to a different place if the code has changed somewhere between compiles, i.e. some other developer has modified some code, not necessarily in the same are where the problem originally happened.
    One thing we have is a function we call DoThrow (used to suppress a warning on an older compiler) defined like this:
    void DoThrow(const std::string& msg)
      throw xmsg(msg);
    }As an experiment I replaced the call to DoThrow with a straight throw xmsg(...) at a place where the first exception was thrown and the problem went away. I'm not sure if removing the call to DoThrow fixed the problem or if the minor restructuring of the code was enough to move the problem elsewhere.
    For production releases we still use WorkShop 6, update 2 which does not have any problems like this. We really would like to upgrade to Sun Studio 12 because it's a much better compiler over all. We can't upgrade until we feel confident we have a workaround.
    Does anyone have any thoughts on what might be wrong or any ideas on what I can do to narrow down the problem?
    Thanks,
    Krister

    Many thanks. You've given me a few areas to focus on and I'll bring my house in order.
    The only external C++ library we depend on is STLport 5.0.2 which we compile ourselves. It's currently compiled with 5.3 on Solaris 8 and I will recompile it with 5.9 on Solaris 10. All other external libraries are C libraries. Our own code is put in static libraries and linked statically. I've read that exceptions thrown in shared libraries can be problematic.
    Your comment about complex conditional expressions (a ? f() : g()) is interesting. We've been bitten before by compiler bugs affecting those types of expressions. Destructors called twice or destructors called for temporaries never created. We may still have some conditional expressions like that.
    The exception is of type xmsg, defined this way:
    class xmsg
      public:
        xmsg(const char* s) : _msg(s) {}
        xmsg(const std::string& s) : _msg(s) {}
        const std::string& why() const { return _msg; }
      private:
        const std::string _msg;
    };There are three catch blocks involved and all the try/catch statement look like this:
    try
    catch(const xmsg& msg)
    }Here is a stack trace from dbx at the point where the exception is thrown the first time.
      [1] __exdbg_notify_of_throw(0xffbf4ae8, 0xffbf4ad0, 0x959b292c, 0xffff0000, 0x0, 0xfc00), at 0xfb6549b4
      [2] _ex_debug_handshake1(0x0, 0x101cb84, 0x1, 0x14ffc, 0xfb66a67c, 0xfb66ad38), at 0xfb655728
      [3] _ex_throw_body(0xfb66af80, 0x80b2ac, 0xfb66a67c, 0x14d9c, 0x0, 0xfb66af80), at 0xfb655934
      [4] __Crun::ex_throw(0xfb66afd0, 0x1460bf8, 0x7ead20, 0x0, 0x16538, 0x1), at 0xfb6558bc
    =>[5] TransportSource<User>::Activate(this = 0x1624810, r = CLASS, _ARG3 = CLASS), line 39 in "TransportSource.H"
      [6] Source<User>::DoActivate(this = 0x162486c, r = CLASS, e = CLASS), line 272 in "Factory.H"
      [7] BaseFactory::Load(this = 0x16020a8, e = CLASS), line 2799 in "BaseFactory.C"
      [8] GPAuthorizationSource::Load(this = 0x15d2440), line 110 in "GPAuthorization.C"
      [9] ExchangeServer::ExchangeServer(this = 0xffbfa95c, argc = 8, argv = 0xffbfbaec), line 380 in "exchangeServer.C"
      [10] main(argc = 8, argv = 0xffbfbaec), line 1525 in "exchangeServer.C"Here is the code for the Activate function in stack frame 5. The exception thrown is the second one.
        virtual T& Activate(const Reference& r, Exemplar<T>&)
          _transport->In().Write(r);
          DemarshallStream out;
          _transport->Method(Process::Activate, out);
          if(!out.Data())
         throw xmsg("Failed to call Activate on server " + _transport->Name());
          if(!out.GetBool())
         throw xmsg("Server returned error: " + out.GetString());
          const ClassHandle& h = out.GetClassHandle(&_connection);
          // don't need to pass refresh flag here because a call to Activate
          // means the object is being loaded for the first time.
          BaseExemplar* x = _handle.GetFactory().Demarshall(h, out, false,
         &_connection, this);
          BaseTransportSource::DoActivate(out);
          if(!x)
         throw xmsg("Failed to activate ref: " + r.ExternalValue());
          return static_cast<T&>(*x->GetInstance());
        }The exception is caught (frame 7 in the stack trace above) and re-thrown in the below code, at the last throw statement.
    void BaseFactory::Load(BaseExemplar& e)
      SourceMap::iterator p = _sources.find(&e._key->Type());
      if(p == _sources.end())
        throw xmsg("Factory<" + _handle.Name() + ">::Load - no source for: "
          + e._key->ExternalValue());
      AutoPointer<BaseGuard> g(Guard());
      std::list<BaseSource*>::iterator i = p->second.begin();
      while(true)
        try
          (*i)->_currentExemplar = &e;
          BO& x = (*i)->DoActivate(*e._key, e);
          (*i)->_currentExemplar = 0;
          if(!e._instance)
         e._instance = &x;
         Activate(e, ActivatedOld, 0);
          return;
        catch(const xmsg& msg)
          (*i)->_currentExemplar = 0;
          ++i;
          if(i == p->second.end())
         throw;
    }There is a second try/catch one level up (stack frame 8, the call to GPAuthorizationSource::Load). Here's a snippet of that piece of code.
        try
          const Exemplar<User>& user = UserFactory::Instance().CreateExemplar(
         *new UserReference(authorizationTable._login.Value()));
          *user;
        catch(const xmsg& msg)
          Logger::Instance() << LogHeader << MsgClass(MsgClass::Error)
         << "Error PMAutorizationSource: " << msg.why() << EndMsg;
        // ...I put a break-point in the catch block in the above code but I never hit the break point and the exception is caught in an outer try/catch, an error is printed and the program exits.
      try
      catch(const xmsg& msg)
        std::cerr << "ERROR: " << msg.why() << std::endl;
      }I'm sorry I have not yet been able to produce a smaller example that can be compiled and tested in isolation. I know that's important in order to track down the problem. It seems like the smallest change in seemingly unrelated parts of the code makes the problem come or go.

  • Exception when starting sun studio

    when am starting sun studio, it is giving an error message (exception)-java.lang.out of memory error : java heap space.
    i cant able to start sun studio. What will do...?
    Thanks in advance
    vinod

    Check current limits by issuing; this output is from my Ubuntu machine:
    $ ulimit -a
    core file size (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 16379
    max locked memory (kbytes, -l) 32
    max memory size         (kbytes, -m) unlimited
    open files (-n) 1024
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size              (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 16379
    virtual memory          (kbytes, -v) unlimited
    file locks (-x) unlimited
    I marked settings that would probably need closer attention. Easies way to troubleshoot the problem is to set everything to unlimited and see if it helps.
    Also, check if you have enough swap - Sun Studio needs at least one gig of swap and 512 RAM (see http://docs.sun.com/source/820-2973/release_notesML.html#SystemReqs).

  • Recommendation for new features in next Sun Studio releases

    Hello,
    I have started using the Sun Studio Express recently and as a feedback to your opening to receive proposals to new features in the next releases of the Sun Studio collection I would want to point some aspects of interest to the programmers in writing good software for embedded systems and not only.
    First of all, with regards to the subject of great interest to me in this moment, multicore/multiprocessor parallel programming, I would appreciate the following :
    - if the compiler would be extended with new directives to allow the programmer to measure the load of each core and/or processor that is available to him.
    - if the compiler would be extended with directives to allow the programmer to get the core ID on which a specific section of code is executed. As en example consider o multithreaded application and in the associated function for each thread read the core ID and function of this value perform specific actions.
    - if the compiler would be extended with directives to allow the programmer to get the ID of the processor in the system - supposing a specific system has many multicore processors. (I don't know if this is possible).
    - if the compiler would be extended with directives to allow the programmer to specify the core and/or processor on which it wants to be executed a specific process,thread,function,(maybe instruction).
    With these macros I think a lot of things can be exercised, one that I think in this moment is the posibility for the programmer to implement his own algorithm of load balancing for the cores and processors of his system.
    Another point I would recommend would be that the watch window in the Sun Studio IDE to permit the selection of the format in which the data to be displayed.As an example if I have a U32 variable to be able to select in the watch window the integer ,hexadecimal or binary format in which I would want to be displayed.
    Another useful thins that I sought at other IDEs would be a popup window or something similar to select how to see the source code: as a .c file , as an assembler code , or as a mixture of C and assemble.
    That's all for the moment, if I see something else I would post another message.
    Thank you,
    Steve.

    steveg wrote:
    First of all, with regards to the subject of great interest to me in this moment, multicore/multiprocessor parallel programming, I would appreciate the following :
    - if the compiler would be extended with new directives to allow the programmer to measure the load of each core and/or processor that is available to him.
    - if the compiler would be extended with directives to allow the programmer to get the core ID on which a specific section of code is executed. As en example consider o multithreaded application and in the associated function for each thread read the core ID and function of this value perform specific actions.
    - if the compiler would be extended with directives to allow the programmer to get the ID of the processor in the system - supposing a specific system has many multicore processors. (I don't know if this is possible).
    - if the compiler would be extended with directives to allow the programmer to specify the core and/or processor on which it wants to be executed a specific process,thread,function,(maybe instruction).
    With these macros I think a lot of things can be exercised, one that I think in this moment is the posibility for the programmer to implement his own algorithm of load balancing for the cores and processors of his system.
    These are OS functions, not compiler's. Solaris has a wide selection of ways and tools to assign processes and threads to cpus; processor_bind(2) is a function you can call and pbind(1M) is a tool you can use on a running app. There are more, just google for it.
    Another point I would recommend would be that the watch window in the Sun Studio IDE to permit the selection of the format in which the data to be displayed.As an example if I have a U32 variable to be able to select in the watch window the integer ,hexadecimal or binary format in which I would want to be displayed.
    Good point. I'll check if there already is an RFE (Request For Enhancement) filed and file one if it's not. Thanks for letting us know!
    Another useful thins that I sought at other IDEs would be a popup window or something similar to select how to see the source code: as a .c file , as an assembler code , or as a mixture of C and assemble.
    But there is disassembly window already. See screenshot here: http://developers.sun.ru/images/stories/sunstudio/images/sun_studio_dbx.png

  • After installing Sun Studio 11, libfsu.a in Sun Forte  6 is removed.

    I have Sun compilers 5.0 and 6.2 on my Sun Solaris 8 Ultra Sparc machine. After installing Sun Studio 11, some library files (e.g., libfsu.a in Sun Forte 6) from the old compilers were removed. What is wrong with my installation?
    Note that I install the different versions of compilers in separate directories.

    After the 1st failed installation of Sun studio 11,
    did you making sure that Sun studio 11 is not exist
    on your system before re-install Sun studio 11? The
    rule is you can have different Sun studio releases
    on the same system, but you can not have the
    multiple copy of the same release on the same
    system, even though they are in a totally separate
    directory. If Sun Studio 11 exist after 1st fail
    installation, you need to un-install it first before
    you re-start 2nd installation attemp.
    Installation of Sun Studio 11 should not remove files
    from older releases, but we know the case it did mess
    up package of the older release before.
    -NgocNo, after 1st install failed due to insufficient disk space, I did not uninstall Studio 11. After I deleted some user files to free up disk space, I run the install again, specified the same directory for installation, and just select Sun Performance Libraries. The installation seems to finished successfully. Perhaps this is one scenario where old versions can get messed up.

  • Exceptions not caught in shared library when compiled under Sun Studio 9

    I realize it's a fairly old version of Sun Studio, however if at all possibly we'd like to avoid updating to the latest.
    Sun Studio 9, version reports
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.6 2004/07/15
    uname -a
    SunOS sunblade 5.9 Generic_118558-27 sun4u sparc SUNW,Sun-Blade-100
    The problem is within our shared library a function calls another method within a try/catch block. This method then sometimes throws an exception which does have a matching catch block. On all other systems (Windows, AIX, HP-UX, Linux) the code works, the exception is caught and handled. On Solaris with Sun Studio 9 though, the exception is ignored and instead triggers an abort and core dump.
    Stack Trace:
    ffffffff7daa871c lwpkill (6, 0, ffffffff7fffd9c0, ffffffff7d3064d4, 2, ffffffff7fffd9ec) + 8
    ffffffff7da3e4b8 abort (ffffffff7d40dac8, ffffffff7d40cc38, ffffffff7d411e78, 10604c, 2, ffffffff7d40dac8) + 100
    ffffffff7d3064d4 __1cH__CimplRdefault_terminate6F_v_ (ffffffff7d40dac8, ffffffff7d40cc38, ffffffff7d411e78, 10604c, 104e40, ffffffff7d3064d0) + 4
    ffffffff7d3062b4 __1cH__CimplMex_terminate6F_v_ (ffffffff7d40de40, 0, 0, ffffffff7d40de40, ffffffff7d40c978, 1) + 24
    ffffffff7d306f04 exthrow_body (ffffffff7d40de40, 0, 0, 105af4, 52, ffffffff7d40e2e8) + 84
    ffffffff7d306e58 __1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_ (ffffffff7d40dec8, ffffffff7f0dea78, ffffffff7ecb6b28, ffffffff7d40de40, 0, ffffffff7d40de40) + 3c
    ffffffff7ecb6d90 __1cLIGExceptionFThrow6FnQenumIGErrorCodes_pkcxxp2x_v_ (fffffffffffff3e3, 0, 0, 0, ffffffff7f1187da, a0) + 80
    ffffffff7ecb6e78 __1cOThrowException6FnQenumIGErrorCodes_pkcxxp1x_v_ (fffffffffffff3e3, 0, 0, 0, ffffffff7f1187da, a0) + 30
    ffffffff7f083304 __1cSIGRasterProcessingNVerifyPalette6FpnMIGRasterPage_nTenumIGContrastModes__v_ (1001f3c10, 0, 0, 0, 0, 0) + b4
    ffffffff7f083760 __1cSIGRasterProcessingOInvertContrast6FpnMIGRasterPage_nTenumIGContrastModes_nTenumIGColorChannels_pnPtagAT_RECTANGLE__v_ (1001f3c10, 0, 0, ffffffff7fffe1a8, 0, 0) + 20
    ffffffff7f039a2c iIG_IP_contrast_invert (1001f3c10, 100162b10, 0, 0, 0, 0) + 104
    ffffffff7f039ba0 iIG_IP_contrast_invert_masked (1001f3c10, 100162b10, 0, 0, 0, 0) + 80
    000000010000b4e0 ipcontrast_invert_notify (10014d000, 10014d, 0, 100000, 100162000, 100162) + 48
    Try/catch block:
         try
              <Triggering function>
         catch(const IGException& ige)
              <Handling Code>
    The code which throws the exception is a static method of IGException which has a basic throw line:
         throw IGException(...);
    Source code is compiled with the following flags, none of which I could find any info to suggest affect this:
    CC -c -Xt -xCC -misalign -xarch=v9 -O
    Linking of the shared object is then done via the following, again nothing obvious that could cause issues. mapfile is an empty file.
    ld -o <outputfilename> -G -z textoff -M mapfile -z noversion -64 -h <outputfilename> <object files> -L/opt/SUNWspro/lib/v9 -lCrun -lX11 -lc -lm
    I did read somewhere mentioning to make sure to use RTLD_GLOBAL if using dlopen on the .so, but the test app is using ld to link the library.
    Does anyone have any ideas why with the Sun Studio 9 compiler these exceptions are not being caught? Based on the fact they are caught on all other compilers, i'm guessing this issue is with the compiler.
    Also, as a test it seems that if the shared object is not built as a 64-bit object, then everything works. The issue only seems to occur when it is a 64-bit object. Likely an issue with the 64-bit compiling?
    Edited by: 837682 on Feb 17, 2011 9:23 AM

    As the other poster pointed out, you need to link the shared library using CC, not ld. I should have noticed that error in the original post.
    Try using CC instead of ld in your link command. The CC command causes additional files to be linked into the shared library that are required for proper operation, and particularly for exception handling. I think that is the actual source of your problem.
    You should not use -L options that point into the compiler installation area, and when you use CC to link, you don't need to.
    I'm surprised that you seem to have a copy of libCrun.so.1 in the compiler installation area -- that should not be the case. The the only versions of libCrun should be static libraries libCrun.a. You almost never want to link with a static version of a system library, and absolutely never when building a shared library. The file /opt/SUNWspro/lib/libCrun.so.1 ought to be a symbolic link pointing to /usr/lib/libCrun.so.1, but if that were the case, the version command would have the same output.
    By any chance, did you install your compiler by copying it from another installation? If you do that, you need to use tar, not cp, to ensure that symbolic links are preserved.

  • Future support for C++0x in Sun Studio

    I've recently been having to defend my choice of using the sun studio compiler against several gcc advocates here in the office. The one reasonable issue they keep bringing up is when the upcoming C++0x (more like C++1x or even C++2x at the pace the standards committee is operating at) features will be available in complete fashion in sun studio. They say, and I have to begrudgingly agree, that judging by the amount of time it took studio to support boost (template templates, certain partial template specializations, etc), there could be a long delay between the release of gcc's C++0x support and that of studio's.
    I understand that many of the new features of C++0x, even from initial glance, appear to be quite complicated, especially lambda functors and their associated []/auto return types, variadac template parameters and class concept checking. In addition, I understand gcc has an unfair advantage so to speak since it is being used as the test bed for many of the committee proposal submitter's proof-of-concept implementations (the variadic template parameter feasibility implementation written for gcc comes to mind).
    Could a developer please assuage my fears and inform me that the studio team has a roadmap/timeframe in place to release a studio that fully supports the new language-level features in a reasonably competitive time frame? It apparently will be the responsibility of the STLPort team to essentially copy many of boost's libraries (shared_ptrs, random numbers, type_traits) and rename them and move them to the std namespace and also supply the new unordered<> containers, to name a few.
    I for one can't wait until boost::mpl, boost::fusion, boost::format and others are all reduced from 10's of 1000's of lines of pre-processor generated crufty template definitions to a single variadic template declaration. Also, I won't feel quite so willfully derelict to efficient code every time i bust out an std::for_each and drop in a boost::bind generated functor and instead can use a lambda function with the various efficiency gains ranging from direct referencing to the stack variables passed in as the closure arguments to the ability for the compiler to actually inline the body of the lambda function where appropriate.
    I'm in no way trying to accuse you compiler developers of being slow to implement features, but just would like to be assured that there is nothing to worry about and there is a plan and current work being done on the required features. I know it's still a couple of years off, but I personally can't wait to replace hundreds of lines of boost::bind() calls with their more efficent lambda equivalent, and in addition clean up interfaces that could have used boost::bind if it weren't for the unacceptable overhead introduced often executed blocks of code.
    Thanks,
    Chris Knight - Faithful sun studio user through at least 2 major name changes and since at lest when it was called Forte 4.2 and RougeWave and classicIO libraries roamed the earth in vast quantities.
    P.S. I truly fear that the other 3 major compilers (gnu, intel, ms) will be out the door with C++0x in around the same time and boost will then willingly drop support for the sun compiler if it doesn't support the required language features at that time as they had no problem not supporting studio at all until Studio 12 so I'm sure as soon as the 3 compilers they run nightly tests with support it, they'll be just as eager to
    make use of the new features as I am.
    This leaves someone who has based their entire system on Solaris + SunStudio + Boost in a potentially undesirable situation. Solaris is far too stable and Linux to ever-changing to ever consider Linux as a platform for critical systems yet the idea of running g++ on Solaris w/ gcc's propensity to change their ABI on a weekly basis gives me immediate heartburn.
    Thanks again.

    You raise some very good points, and believe me, we are even more aware of them than you are!
    Short answer: We are planning to bring out a compiler conforming to C++0X in a timely fashion.
    Longer answer:
    Right now, we are working on providing binary compatibility with g++ as an option in the next compiler release. When we are done, you will be able to use g++ headers with Sun C++, and link the code with binaries created by g++. The first implementation will be on Linux. (Which versions of g++ and which versions of Linux? Stay tuned.)
    Implementing all the new features of C++0X will require a re-design of parts of the compiler front end. The current compiler organization does not support "concepts", for example. (We've been looking for an excuse to re-design the front end for a while, and C++0x is not just an excuse -- it's a requirement.) With the g++ ABI work done, we'll ready to start the re-design, and begin to implement C++0x features.
    We won't release an official (stable, fully-supported) product with C++0X features until the standard is final. Until then, any feature could change in unpredictable ways. We got caught by that problem with C++ 4.2 and C++98 -- we implemented what we thought were final features that changed dramatically after we released the compiler. We won't do that again. Compiler stability is one of our most important considerations.
    Beginning some time next year, we expect to have Express releases with some C++0X features. Express releases are our way of providing compilers with experimental features that might not be stable yet. It gives our customers a chance to try them out and provide feedback before they become part of a stable release. That is to say, a feature flagged as experimental is subject to change, and compatibility with other Express or official releases is not guaranteed. We can therefore fix bugs and catch up with late changes in the Standard as necessary.
    We have not yet done all the planning for our C++0X compiler, so I can't give you any estimates about specific feature availability and time frames. When we are farther along, we'll post the road map on a public site, and I'll announce it here.
    Steve Clamage
    Sun C++ Team

  • How to install sun studio 12 under Centos 5???

    HI, all,
    I am trying to install Sun Studio 12 into Centos 5. The followings are what I did:
    1. Download sun studio 12 package by selecting Linex (x86) for Centos from web site and save this package under /var/tmp.
    2. I used bzcat to unpack this package by:
    bzcat < SunStudio12ml-linux-x86-200709-pkg.tar.bz2 | /bin/tar xvf -
    3. I did prepare_system before installation by:
    ./prepare_system [-d /opt/sun/ ] [-R /var/tmp/ ] [-C | -s netbeans | java | patches | all_patches | jdk_patches | all | print_needed_steps ]
    where [-d /opt/sun/ ] is the directory where all missing softwares will be installed, [-R /var/tmp/ ] is the directory where unpacked programs are saved.
    After running prepare_system, the resposes are:
    bash: -s: command not found
    bash: patches: command not found
    bash: all_patches: command not found
    bash: all: command not found
    bash: print_needed_steps: command not found
    bash: jdk_patches: command not found
    *Usage: gij [OPTION] ... CLASS [ARGS] ...*
    to invoke CLASS.main, or
    *gij -jar [OPTION] ... JARFILE [ARGS] ...*
    to execute a jar file
    *Try `gij --help' for more information.*
    4. I started to use installer with command line to install the sun studio 12 by:
    ./installer -nodisplay
    The result shows me some exceptions and installation is failed as:
    Exception in thread "Thread-1" java.awt.HeadlessException
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at javax.swing.JComponent.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at com.sun.wizards.core.WizardComponent.<init>(WizardComponent.java:159)
    at com.sun.wizards.core.WizardComposite.<init>(WizardComposite.java:83)
    at com.sun.wizards.core.WizardTreeManager.createWizardPanel(WizardTreeManager.java:890)
    at com.sun.wizards.core.WizardTreeManager.<init>(WizardTreeManager.java:325)
    at com.sun.wizards.core.CommandLineConsole.run(CommandLineConsole.java:75)
    at java.lang.Thread.run(libgcj.so.7rh)
    Task Failed: java.lang.NullPointerException
    java.lang.NullPointerException
    at java.lang.Class.isAssignableFrom(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at com.sun.setup.util.wbResource.getString(wbResource.java:212)
    at com.sun.setup.util.wbResource.getString(wbResource.java:132)
    at com.sun.setup.util.setupInitializationTask.perform(setupInitializationTask.java:88)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:343)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(libgcj.so.7rh)
    I followed installation instructions to install sun studio 12 under Centos 5. I can not make it. However, I made it under Solaries system.
    So, is there any special for Centos 5?
    Hunter 3D

    Hi,
    Thank you for your helps.
    According to your suggestions, I downloaded JDK 6 update 10 RC, specifical in Linux platform : self-extracting JDK file named:
    jdk-6u10-bin-b28-linux-i586-21-jul-2008.bin
    I saved downloading under the directory where sun studio is located.
    I used
    yum search jdk
    to find jdk exists in Centos 5.2 shown as the message as:
    [root@localhost sun]# yum search jdk
    Loading "priorities" plugin
    Loading "fastestmirror" plugin
    Loading mirror speeds from cached hostfile
    * rpmforge: ftp-stud.fht-esslingen.de
    * base: mirror.raystedman.net
    * updates: mirror.raystedman.net
    * addons: mirror.voxitas.com
    * extras: mirror.raystedman.net
    0 packages excluded due to repository priority protections
    jakarta-commons-launcher.i386 : The Launcher Component is designed to be a cross platform Java application launcher.
    jakarta-commons-collections.i386 : Jakarta Commons Collections Package
    mockobjects-alt-jdk1.4.i386 : Mockable API for JDK 1.4
    jakarta-commons-beanutils.i386 : Jakarta Commons BeanUtils Package
    gnu-crypto-sasl-jdk1.4.i386 : Gnu Crypto SASL API
    ldapjdk.i386 : The Mozilla LDAP Java SDK
    ldapjdk-javadoc.i386 : Javadoc for ldapjdk
    mockobjects-jdk1.4.i386 : MockObjects for 1.4 JDK
    I used
    ./installer -nodisplay
    to install sun studio 12 and error message show as:
    [root@localhost sun]# ./installer -nodisplay
    Exception in thread "Thread-1" java.awt.HeadlessException
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at java.awt.dnd.DropTarget.<init>(libgcj.so.7rh)
    at javax.swing.JComponent.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at javax.swing.JPanel.<init>(libgcj.so.7rh)
    at com.sun.wizards.core.WizardComponent.<init>(WizardComponent.java:159)
    at com.sun.wizards.core.WizardComposite.<init>(WizardComposite.java:83)
    at com.sun.wizards.core.WizardTreeManager.createWizardPanel(WizardTreeManager.java:890)
    at com.sun.wizards.core.WizardTreeManager.<init>(WizardTreeManager.java:325)
    at com.sun.wizards.core.CommandLineConsole.run(CommandLineConsole.java:75)
    at java.lang.Thread.run(libgcj.so.7rh)
    Task Failed: java.lang.NullPointerException
    java.lang.NullPointerException
    at java.lang.Class.isAssignableFrom(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.tryBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at java.util.ResourceBundle.getBundle(libgcj.so.7rh)
    at com.sun.setup.util.wbResource.getString(wbResource.java:212)
    at com.sun.setup.util.wbResource.getString(wbResource.java:132)
    at com.sun.setup.util.setupInitializationTask.perform(setupInitializationTask.java:88)
    at com.sun.wizards.core.Sequence.perform(Sequence.java:343)
    at com.sun.wizards.core.SequenceManager.run(SequenceManager.java:226)
    at java.lang.Thread.run(libgcj.so.7rh)
    So, please tell me what I will do.
    Thank you.

  • BOOST and Sun Studio 10

    C++ 5.7 in Sun Studio 10 now compiles most of BOOST 1.32.0, when the compiler is updated with the current patches from
    http://developers.sun.com/prodtech/cc/downloads/patches/ss10_patches.html
    Two known bugs remain, and should be fixed in a future patch.
    Some of the BOOST compilation failures are due to errors in the BOOST configuration for Sun C++. We have submitted corrections to the BOOST site, and we hope all of them will be included in version 1.33.0.
    In the mean time, you can apply the following corrections to version 1.32.0:
    1. Get this correction from the BOOST bug tracker:
    http://sourceforge.net/tracker/index.php?func=detail&aid=1155439&group_id=7586&atid=107586
    2. Also get this correction from the BOOST bug tracker:
    http://sourceforge.net/tracker/index.php?func=detail&aid=1165980&group_id=7586&atid=107586
    3. Edit build.sh according to these diffs: *** build.sh.orig     Fri Mar 18 06:09:44 2005
    --- build.sh     Fri Mar 18 06:41:07 2005
    *** 150,160 ****
          sunpro)
    !     if test -r /opt/SUNWspro/bin/cc ; then
              BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
          fi
    !     if test -r $BOOST_JAM_TOOLSET_ROOTbin/cc ; then
    !         export PATH=$BOOST_JAM_TOOLSET_ROOTbin:$PATH
          fi
          BOOST_JAM_CC=cc
    --- 150,161 ----
          sunpro)
    !     if test -z "${BOOST_JAM_TOOLSET_ROOT}" -r /opt/SUNWspro/bin/cc ; then
              BOOST_JAM_TOOLSET_ROOT=/opt/SUNWspro/
          fi
    !     if test -r ${BOOST_JAM_TOOLSET_ROOT}bin/cc ; then
    !         PATH=${BOOST_JAM_TOOLSET_ROOT}bin:${PATH}
    !         export PATH
          fi
          BOOST_JAM_CC=cc
          ;;

    Here is a small but complete test program, together with the command line of the compiler. This is the patch level of the compiler we use here:
    CC: Sun C++ 5.7 Patch 117830-02 2005/03/30Test program (graph_test.cpp):
    #include <iostream>                  // for std::cout
    #include <utility>                   // for std::pair
    #include <algorithm>                 // for std::for_each
    #include <boost/graph/graph_traits.hpp>
    #include <boost/graph/adjacency_list.hpp>
    #include <boost/graph/dijkstra_shortest_paths.hpp>
    using namespace boost;
    int main(int,char*[])
      enum { A, B, C, D, E, N };
      const int num_vertices = N;
      const char* name = "ABCDE";
      typedef adjacency_list<vecS, vecS, bidirectionalS> Graph;
      Graph g(num_vertices);
      typedef graph_traits<Graph>::vertex_iterator vertex_iter;
      std::pair<vertex_iter, vertex_iter> vp;
      vp = vertices(g); /** Error **/
      return 0;
    }Command line:
    CC -I./include/boost -v graph_test.cpp
    ###     command line files and options (expanded):
    ### -I/export/rpms/401/tools/inst/include/boost -v graph_test.cpp
    ### CC: Note: NLSPATH = /export/home2/SUNs10/SUNWspro/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/export/home2/SUNs10/SUNWspro/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    /export/home2/SUNs10/SUNWspro/prod/bin/ccfe -y-o -ygraph_test.o -I/export/rpms/401/tools/inst/include/boost -y-fbe -y/export/home2/SUNs10/SUNWspro/prod/bin/fbe -y-xarch=generic -y-verbose -O0 -ptf /tmp/00299%1.%2 -ptx /export/home2/SUNs10/SUNWspro/prod/bin/CC -ptk "-I/export/rpms/401/tools/inst/include/boost -v  -xs " -D__SunOS_5_8 -D__SUNPRO_CC=0x570 -Dunix -Dsun -Dsparc -D__sparc -D__sparcv8plus -D__unix -D__sun -D__BUILTIN_VA_ARG_INCR -D__SVR4 -D__SUNPRO_CC_COMPAT=5 -D__SUN_PREFETCH -xdbggen=no%dwarf2+stabs -y-s -xdbggen=incl -y-xmemalign=8i -I-xbuiltin -xldscope=global -instlib=/export/home2/SUNs10/SUNWspro/prod/lib/libCstd.a -I/export/home2/SUNs10/SUNWspro/prod/include/CC/Cstd -I/export/home2/SUNs10/SUNWspro/prod/include/CC -I/export/home2/SUNs10/SUNWspro/prod/include/CC/rw7 -I/export/home2/SUNs10/SUNWspro/prod/include/cc -y-comdat graph_test.cpp -s /tmp/ccfe.00299.0.s >&/tmp/ccfe.00299.1.err
    rm /tmp/ccfe.00299.0.s
    /export/home2/SUNs10/SUNWspro/prod/bin/stdlibfilt -stderr </tmp/ccfe.00299.1.err
    "graph_test.cpp", line 22: Error: Could not find a match for boost::vertices<boost::T>(boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::no_property, boost::no_property, boost::listS>) needed in main(int, char**).
    1 Error(s) detected.
    rm /tmp/ccfe.00299.1.err
    rm graph_test.oAny help would be greatly appreciated! If you need any more information, please let me know.
    Thanks in advance,
    Andreas

  • Sun Studio 12 - Memory allocation issue

    I am porting an old code from Solaris to Linux (RHEL). The code allocates a large memory block using the malloc() command, but the command fails on Linux when the size exceeds 128 Mb (I have 4Gb of RAM).
    I have tried increasing the heap size in the netbeans conf file with no luck.
    Any ideas?

    Can you try running the app from a terminal and see if it works (for a cleaner experiment, don't close Sun Studio since it might consume a considerable amount of memory for a larger project)?
    As to ulimit, it actually makes sense to check it, but what you really need to check is ulimit of the process started by Sun Studio, because there's a small chance that it actually changes something before forking. You can try to check that by temporarily changing "build output" of your project to
    /bin/bash -c "ulimit -c"and running it.

  • Sun Studio 11

    I saw where there was a link for the full Sun Studio 11 install. Is it possible to just get dbx rather than the full suite? I'd rather not have to increase swap space which I think I would need to do for the full install. (perhaps the install wizard lets you pick and choose pieces?)

    Studio 11 was released in 2005, and is obsolete. You really should use a more current version, unless you need to run it on Solaris 8 (which is also obsolete). You don't do yourself any favors by continuing to use software that is obsolete and pretty much unsupported. But I realize that sometimes you don't have a choice.
    You can get the current release, Oracle Solaris Studio 12.3, here:
    http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html
    It requires Solaris 10 or 11, or Oracle Linux 5 or 6, or Red Hat Linux 5 or 6.
    To answer your question, the package installer allows you to select the components you want to install. It is rather coarse-grained, so you usually can't pick and choose in detail, but you don't have to install everything. If you install from a tarball, you can delete the parts you don't want, but you might find that you deleted something that is actually needed.
    All that said, whether you install all or part of Studio affects the amount of disk space used, but does not affect the use of swap space. The swap space usage depends on the programs that are actually running. If, for example, you are not running a compiler, the fact that the compiler is installed does not affect swap space usage.

Maybe you are looking for

  • New sap user creation

    Hi All SAP experts, My company has implemented 2 Systems SAP Landscape with one development and one production server which are running on R/3 Enterprise 4.7 (Kernel Release 6.20) with Microsoft SQL 2000 as database server. I have the following quest

  • Everything gone from Ipod Classic

    I just finished syncing my 80g classic Ipod (bought in Dec 07 but started using in Jan 08) and everything just poof vanished... iTunes does not recognise it when I plugged it in. I havent even downloaded any fancy stuff only plain music. There is not

  • Triggering midi with an audio file

    Hi, Ive recorded some live drums and unfortunately Im a bit disappointed with the snare sound and would like to use some sample snares I have instead. Is there anyway to record an audio instrument track using the recorded audio file of the snare so t

  • Cannot go to 192.168.1.1

    Hi, I had just spent $180 dollars in wireless devices after my WRT54G finally died on me after a few years. I bought the WRT160N (Version 2) and a USB wireless N adapter for my other PC. Now the internet works on both of them, but I cannot go to 192.

  • G4 PB lost primary display with Sharp PG-B10S projector on extended mode

    About a week ago, for no apparent reason, when I plug into my projector in dual screen mode (through the DVI VGA adaptor), my primary screen switches to the projector and the secondary (extended) screen pops up on the internal pb lcd display. Whateve