Compiling C++ using Sun Studio 11

Hi,
I have downloaded and installed "IBM Message Service client for C/C++" (in Solaris 5.8) to publish messages to Websphere MQ Topics using C++ programs. The IBM installation comes with a compiled version of the sample programs and I am able to execute them successfully using Sun studio 11's C++ compiler. But when I try to compile these sample programs , it throws the following exception.
mqm$ CC SampleConsumerCPP.cpp
"SampleConsumerCPP.cpp", line 36: Error: Could not open include file<xms.hpp>.
"SampleConsumerCPP.hpp", line 39: Error: Could not open include file<helperfunctions.h>.
"SampleConsumerCPP.hpp", line 52: Error: xmsVOID is not defined.
"SampleMsgListener.hpp", line 44: Error: xms is not defined.
"SampleMsgListener.hpp", line 44: Error: MessageListener is not defined.
"SampleMsgListener.hpp", line 55: Error: Type name expected instead of "xmsVOID".
"SampleMsgListener.hpp", line 55: Error: "virtual" is not allowed here.
"SampleMsgListener.hpp", line 55: Error: Identifier expected instead of "const".
"SampleMsgListener.hpp", line 55: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 56: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 56: Error: "," expected instead of "displayMsg".
"SampleMsgListener.hpp", line 62: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 62: Error: Type name expected instead of "xmsVOID".
"SampleMsgListener.hpp", line 63: Error: Type name expected instead of "xmsINT".
"SampleMsgListener.hpp", line 63: Error: Identifier expected instead of "const".
"SampleMsgListener.hpp", line 63: Error: Multiple declaration for const.
"SampleMsgListener.hpp", line 63: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 64: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 64: Error: Type name expected instead of "xmsVOID".
"SampleMsgListener.hpp", line 65: Error: Type name expected instead of "xmsINT".
"SampleMsgListener.hpp", line 65: Error: Identifier expected instead of "const".
"SampleMsgListener.hpp", line 65: Error: Multiple declaration for const.
"SampleMsgListener.hpp", line 65: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 67: Error: Use ";" to terminate declarations.
"SampleMsgListener.hpp", line 73: Error: Type name expected instead of "xmsINT".
Compilation aborted, too many Error messages.
The compiler does not recognize the "make" command either.
Find below my PATH settings.
"/tools/java/j2sdk1.4.2_08/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/data/sunstudio10/SUNWspro/bin:/opt/mqm/java/bin:/usr/openwin/bin:/data/mqapi/tools/cpp/include:/data/mqapi/tools/samples/common:/data/mqapi/lib"
where /data/mqapi contains the XMS installation.
Any pointers to solve this issue will be highly appreciated.
Thanks,
Meeraa

Hi,
I have downloaded and installed "IBM Message Service
client for C/C++" (in Solaris 5.8) ...
mqm$ CC SampleConsumerCPP.cpp
"SampleConsumerCPP.cpp", line 36: Error: Could not
open include file<xms.hpp>.You probably don't want to be running CC on its own.
The compiler does not recognize the "make" command
either.
Find below my PATH settings.
"/tools/java/j2sdk1.4.2_08/bin:/usr/bin:/bin:/usr/sbin
:/sbin:/usr/local/bin:/usr/local/sbin:/data/sunstudio1
0/SUNWspro/bin:/opt/mqm/java/bin:/usr/openwin/bin:/dat
a/mqapi/tools/cpp/include:/data/mqapi/tools/samples/co
mmon:/data/mqapi/lib"
where /data/mqapi contains the XMS installation.You need to set your path in your shell. Make sure that /usr/ccs/bin is in your PATH.
Have you really installed Studio 11 in "/data/sunstudio10" - that looks a bit confuding to me!
Paul

Similar Messages

  • Error in compiling boost example program using sun studio 12

    I am trying to compile the below example program from boost using sun studio 12 C++ compiler.
    #include <boost/interprocess/shared_memory_object.hpp>
    #include <boost/interprocess/mapped_region.hpp>
    #include <cstring>
    #include <cstdlib>
    #include <string>
    int main(int argc, char *argv[])
    using namespace boost::interprocess;
    if(argc == 1)
    {  //Parent process
    //Remove shared memory on construction and destruction
    struct shm_remove
    shm_remove() { shared_memory_object::remove("MySharedMemory"); }
    ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
    } remover;
    //Create a shared memory object.
    shared_memory_object shm (create_only, "MySharedMemory", read_write);
    //Set size
    shm.truncate(1000);
    //Map the whole shared memory in this process
    mapped_region region(shm, read_write);
    //Write all the memory to 1
    std::memset(region.get_address(), 1, region.get_size());
    //Launch child process
    std::string s(argv[0]); s += " child ";
    if(0 != std::system(s.c_str()))
    return 1;
    else
    //Open already created shared memory object.
    shared_memory_object shm (open_only, "MySharedMemory", read_only);
    //Map the whole shared memory in this process
    mapped_region region(shm, read_only);
    //Check that memory was initialized to 1
    char mem = static_cast<char>(region.get_address());
    for(std::size_t i = 0; i < region.get_size(); ++i)
    if(*mem++ != 1)
    return 1; //Error checking memory
    return 0;
    Using the below command :
    CC -c 1.cpp -I/home/syogacha/satish/boost_1_43_0 -library=stlport4
    "/home/syogacha/satish/boost_1_43_0/boost/interprocess/shared_memory_object.hpp", line 284: Error: The function "shm_open" must have a prototype.
    "/home/syogacha/satish/boost_1_43_0/boost/interprocess/shared_memory_object.hpp", line 307: Error: The function "shm_unlink" must have a prototype.
    "/home/syogacha/satish/boost_1_43_0/boost/interprocess/mapped_region.hpp", line 549: Error: Formal argument 1 of type char* in call to shmdt(char*) is being passed void*.
    3 Error(s) detected.
    I even tried to include sys/mman.h but got the same compilation errors.
    Do we need to take care of few other specific things while using boost headers.
    Thanks in advance ...

    Hope this helps....
    #include <sys/mman.h>
    #include <boost/interprocess/shared_memory_object.hpp>
    #include <boost/interprocess/mapped_region.hpp>
    #include <cstring>
    #include <cstdlib>
    #include <string>
    #include <iostream>
    #include <iterator>
    int main(int argc, char *argv[])
    {      //main
            using namespace boost::interprocess;
            if(argc == 1)
            {  //Parent process
                    //Remove shared memory on construction and destruction
                    struct shm_remove
                            shm_remove() { shared_memory_object::remove("MySharedMemory"); }
                            ~shm_remove(){ shared_memory_object::remove("MySharedMemory"); }
                    } remover;
                    //Create a shared memory object.
                    shared_memory_object shm (create_only, "MySharedMemory", read_write);
                    //Set size
                    shm.truncate(1000);
                    //Map the whole shared memory in this process
                    mapped_region region(shm, read_write);
                    //Write all the memory to 1
                   std::memset(region.get_address(), 1, region.get_size());
                    //Launch child process
                    std::string s(argv[0]); s += " child ";
                    if(0 != std::system(s.c_str()))
                    return 1;
            else
                    //Open already created shared memory object.
                    shared_memory_object shm (open_only, "MySharedMemory", read_only);
                    //Map the whole shared memory in this process
                    mapped_region region(shm, read_only);
                    //Check that memory was initialized to 1
                    char *mem = static_cast<char*>(region.get_address());
                    for(std::size_t i = 0; i < region.get_size(); ++i)
                    if(*mem++ != 1)
                    return 1;   //Error checking memory
            return 0;
    }

  • How to generate gdb compatible .o for CMT using Sun Studio C compiler?

    Hello,
    we've been working on a joint project for telco bearer plane applications on CMT.
    We started the project using gcc for Sparc and we switched to Sun Studio compiler when we hit some bugs in gcc (optimized mode was not completely stable). The switch took a few weeks due to syntax differences and toolchain option changes.
    With Sun Studio we got a double digit percent performance improvement, so Sun Studio proved more stable and faster than gcc.
    To debug programs we require gdb, because the Telco customers are more familiar with it. The problem is that Sun Studio generates object files which are not compatible with gdb.
    Our main requirement is to be able to generate gdb compatible object files using Sun Studio compiler.
    We checked this link:
    http://cooltools.sunsource.net/gcc/ReleaseNotes.html
    but this seems to be a variant of gcc. At this point we cannot switch compiler because of the performance and stability issues mentioned above and because it will take a few weeks to months to switch.
    We have two questions:
    1) Is there a way to generate gdb compatible object files using Sun Studio 11?
    2) If not, is this funcionality going to be available in a future release of Sun Studio and what is the time frame?
    Thanks for your help.
    Marco Zandonadi
    Teja Technologies

    The undefined symbol is in the C++ runtime support library that is part of Solaris. Probably you have an out-fo-date version of the libraries.
    You can get current patches from the Sun Studio patch page:
    http://developers.sun.com/prodtech/cc/downloads/patches/index.html
    From the page for your version of WorkShop or Sun Studio, select the C++ Runtime Library patch for the version of Solaris that your are running. While you are at it, you can get the current compiler patches as well.
    If patching the runtime libraries does not fix the problem, let me know, and also show the exact command lines that you use for compiling and linking the program.

  • Binary compatibility problems using Sun Studio 12

    I'm working in a project that uses Orbix [1] third-party libraries. I have installed the Sun Studio 12 on Solaris 10 SPARC but I have got some strange segfault problems (the exactly same code works fine in a Linux box - using g++). I read the 1.4 section of Sun Studio 12 C++ Userguide [2] but I have a doubt:
    Is there no way to compile my code using Sun Studio 12 using shared libraries compiled against earlier Sun Studio C++ compiler versions (like Sun Studio 8 or some version before Sun Studio 11)?
    I think my problem is related to the fact that Orbix team used Sun Studio 8 as some notes found in their headers indicate:
    "IONA Technologies ART IDL Compiler POA C++ Generator asp 6.3.3 SunOS 5.8 CC_5.5 2008/06/13 21:04:37 EDT"
    A secondary question: Is CC 5.5 present in Sun Studio 8, right?
    Can anyone help me? Every tips are welcome :) Thanks in advance!
    [1] http://web.progress.com/en/orbix/orbix_standard.html
    [2] http://docs.sun.com/app/docs/doc/820-7599/6nirkt6f7?a=view

    AmadeuBarbosa wrote:
    I'm working in a project that uses Orbix [1] third-party libraries. I have installed the Sun Studio 12 on Solaris 10 SPARC but I have got some strange segfault problems (the exactly same code works fine in a Linux box - using g++). I read the 1.4 section of Sun Studio 12 C++ Userguide [2] but I have a doubt:I don't think 1.4 Binary Compatibility Verification applies in your case. It's referring to processor capability to execute certain (new) instructions; if your third-party libraries were compiled a while ago, it's highly unlikely they use instructions not implemented by the processor you have.
    Is there no way to compile my code using Sun Studio 12 using shared libraries compiled against earlier Sun Studio C++ compiler versions (like Sun Studio 8 or some version before Sun Studio 11)?Generally speaking, any library compiled with older Sun Studio C++ compiler is supposed to be compatible with any library or executable compiled with newer version provided that all parties did everything right. For example, that third-party libraries should not be statically linked with C++ run-time support libraries; your executable should be linked with latest compiler driver (CC) so that it records correct dependencies on support libraries.
    Of course, there could be (and actually are) compiler bugs standing in the way of compatibility. Some of them can be fixed, some - like demangler issue described in http://docs.sun.com/source/820-4155/c++.html - can't. There is no easy way to tell if you hit a compiler bug or bulding/linking issue, or bug in the code that was previously unseen.
    I think my problem is related to the fact that Orbix team used Sun Studio 8 as some notes found in their headers indicate:
    "IONA Technologies ART IDL Compiler POA C++ Generator asp 6.3.3 SunOS 5.8 CC_5.5 2008/06/13 21:04:37 EDT"Yes, looks like it was compiled by 5.5, which is part of Sun Studio 8
    >
    A secondary question: Is CC 5.5 present in Sun Studio 8, right?That's correct.

  • Check memory leak using sun studio 10

    Hi,
    I'm using sun studio 10 to find the memory leak. I pre loaded the librtc.so and attached the process. Then I set the break point at the beginning of scenairo and the end of scenario. Then I trigger the event and program flow hits the break point at the beginning of scenairo, I try to enable the "Memory Check". Then I continue my application. But, I don't see anything show up in the "memory check" tab in the debug window.
    Is anyone there who know what is the problem here? Appreciate your help.
    Li

    Can you help mi. Novice
    mail [email protected]

  • Problem in compilation using Sun Studio 11

    Hello,
    We are migrating from a Solaris 8 to a Solaris 10 OS. At the same ttime we are also migrating from Ingres 2.6 to Ingres 2006. As a part of the creation of teh development environment, we are recompiling all the codes on teh new OS. WE have installed teh Sun Studio 11 compiler for this purpose. When compiling some C codes, we are getting the following error:
    "am_xxxxxxxx.c", line 2596: warning: statement not reached
    "am_xxxxxxxx.c", line 2778: undefined symbol: i8
    "am_xxxxxxxx.c", line 2778: syntax error before or at: )
    "am_xxxxxxxx.c", line 2858: undefined symbol: i8
    "am_xxxxxxxx.c", line 2858: syntax error before or at: )
    "am_xxxxxxxx.c", line 2889: warning: implicit function declaration: IIresnext
    "am_xxxxxxxx.c", line 2891: warning: statement not reached
    "am_xxxxxxxx.c", line 2920: warning: statement not reached
    "am_xxxxxxxx.c", line 2931: undefined label: IIfdF1
    "am_xxxxxxxx.c", line 2931: undefined label: IIosl9139
    "am_xxxxxxxx.c", line 2931: undefined label: IIfdE1
    "am_xxxxxxxx.c", line 2931: cannot recover from previous errors
    cc: acomp failed for am_xxxxxxxx.c
    The command used for compiling is :
    cc -xarch=generic64 am_xxxxxxxx.c
    We have exported teh following:
    LD_LIBRARY_PATH_64=/usr/sfw/lib/sparcv9:/usr/local/lib/sparcv9:/usr/lib/sparcv9:/usr/openwin/lib/sparcv9:/usr/dt/lib/sparcv9:/opt/SUNWspro/lib/v9:/opt/SUNWspro/lib/v9:/eu/ingad/ingres/lib:/opt/oracle/lib:/usr/lib:/usr/ucblib:/usr/openwin/lib:/opt/SUNWspro/lib/:/opt/lib/cobol/coblib
    LD_LIBRARY_PATH=/opt/SUNWspro/lib/v9:/eu/ingad/ingres/lib:/eu/ingad/ingres/lib:/opt/oracle/lib:/usr/lib:/usr/ucblib:/usr/openwin/lib:/opt/SUNWspro/lib/:/opt/lib/cobol/coblib
    CXXFLAGS=-fast -xarch=v9b
    CFLAGS=-fast -xarch=v9b
    LDFLAGS=-L/usr/sfw/lib/sparcv9 -L/usr/lib/sparcv9 -R/usr/sfw/lib/sparcv9 -R/usr/lib/sparcv9
    We are struggling with this issue for the last one week. Can someone please help me with this issue?
    Could this be because the 64 bit library files are not installed? Please help.
    Aneesha

    The LD_LIBRARY_PATH environment variables determine where the runtime loader looks for shared libraries when you run an application. It is unlikely to be the source of compile-time errors.
    I suspect that doing two major changes at the same time has resulted in undefined names and other problems, probably due to missing or incorrect header inclusion. If possible, make one change at a time, either compile the old code on the new OS, or the new code on the old OS, and get that to work first.
    Check the Ingress documentation to see if you need to make source code changes when upgrading, and follow any recommendations there. You might also need to take up this problem with Ingress tech support.
    Regarding LD_LIBRARY_PATH, the best advice is usually "don't set it at all". For more on this topic, see this article:
    http://blogs.sun.com/rie/entry/tt_ld_library_path_tt
    Just to eliminate this as a possible build problem, try removing LD_LIBRARY_PATH and LD_LIBRARY_PATH_64 from your environment when building the program. Then modify the build process to set the executable runpath (-R option) to include the Ingress or Oracle libraries that need to be searched. You don't normally want to point into /usr/lib or into the compiler installation area.

  • Error when trying to build using sun studio compiler

    Hi ,
    When i try to build my appliation-1 and application-2 , I am experiencing below given errors
    OS:
    SUSE Linux Enterprise Server 10 (x86_64)
    VERSION = 10
    PATCHLEVEL = 1
    Compiler Version:
    cc: Sun Ceres C 5.10 Linux_i386 2008/03/24
    usage: cc [ options] files. Use 'cc -flags' for details
    Application1:
    Error:
    CC: Cannot find /comp/sun/sunstudioceres/bin/ccfe
    Application2:
    Error:
    cc: Warning: cannot open inline file /gan/q2/comp/sun/sunstudioceres/lib/amd64/libm.il
    cc: Can't exec /comp/sun/sunstudioceres/bin/acomp
    Please share your thoughts on how to solve this problem
    Regards,

    [http://forum.java.sun.com/thread.jspa?threadID=5307985]

  • Problems using Sun Studio Express 3 CC on OpenSuse 10.2

    Unable to compile a simple program with CC (compiles w/o errors using g++)
    -- test.cpp -------------------------------------------------------------------
    #include <string>
    #include <iostream>
    using namespace std;
    string xx = "Hello World ...";
    int main () {
    cout << xx << endl;
    return 0;
    sunCC -v -o testcc test.cpp
    ### command line files and options (expanded):
    ### -v -o testcc test.cpp
    ### sunCC: Note: NLSPATH
    = /opt/sun/sunstudiomars/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/sun/sunstudiom
    ars/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    /opt/sun/sunstudiomars/prod/bin/ccfe -y-o -ytest.o -y-fbe -y/opt/sun/sunstudiomars/prod/bin/fbe -y-xarch=generic -
    y-xtab -y-verbose -O0 -ptf /tmp/16306%1.
    %2 -ptx /opt/sun/sunstudiomars/prod/bin/CC -ptk "-v -xs " -D__SUNPRO_CC=0
    x590 -Dunix -Di386 -D__i386 -D__i386__ -D__unix -D__unix__ -D__BUILTIN_VA_ARG_INCR -D__linux -D__linux__ -Dlinux -
    D__gnu__linux__ -D__SUNPRO_CC_COMPAT=5 -xdbggen=no%stabs+dwarf2 -y-s -xdbggen=incl -I-xbuiltin -xldscope=global -i
    nstlib=/opt/sun/sunstudiomars/prod/lib/libCstd.a -I/opt/sun/sunstudiomars/prod/include/CC/Cstd -I/opt/sun/sunstudi
    omars/prod/include/CC -I/opt/sun/sunstudiomars/prod/include/CC/rw7 -I/opt/sun/sunstudiomars/prod/include/cc -y-com
    dat test.cpp -s /tmp/ccfe.16306.0.s >&/tmp/ccfe.16306.1.err
    rm /tmp/ccfe.16306.0.s
    /opt/sun/sunstudiomars/prod/bin/stdlibfilt -stderr </tmp/ccfe.16306.1.err
    "/usr/include/string.h", line 272: Error: End of file encountered in macro
    arguments for "__nonnull".
    "/usr/include/string.h", line 272: Error: ")" expected instead of "(".
    "/usr/include/string.h", line 272: Error: Unexpected ")" -- Check for matching
    parenthesis.
    "/usr/include/string.h", line 272: Error: Operand expected instead of ";".
    "/usr/include/string.h", line 426: Error: "strerror_r(int, char*, unsigned)"
    is expected to return a value.
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 32: Error: operator
    new(unsigned) was declared before with a di
    fferent language.
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 35: Error: operator
    delete(void*) was declared before with a di fferent language.
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 37: Error: operator new[]
    (unsigned) was declared before with a different language.
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 40: Error: operator
    delete[](void*) was declared before with a different language.
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 53: Error: Only one of a
    set of overloaded functions can be ext ern "C".
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 54: Error: Only one of a
    set of overloaded functions can be ext ern "C".
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 55: Error: Only one of a
    set of overloaded functions can be ext ern "C".
    "/opt/sun/sunstudiomars/prod/include/CC/new", line 56: Error: Only one of a
    set of overloaded functions can be ext ern "C".
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 106: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 169: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 185: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 198: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 202: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 206: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 217: Error:
    Only one of a set of overloaded functi ons can be extern "C".
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 225: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 239: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 249: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 264: Error:
    Template declarations cannot have exte rn "C" linkage.
    "/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 275: Error:
    Template declarations cannot have exte rn "C" linkage.
    Compilation aborted, too many Error messages.
    rm /tmp/ccfe.16306.1.err
    rm test.o

    It is a known bug. Check out this topic: http://forum.java.sun.com/thread.jspa?threadID=5109045
    Fix for it should be available in the next installment of Sun Studio Express...
    regards,
    __Fedor.

  • Two compile issues with Sun Studio 12 @ x86(_64 = amd64)

    The following two issues are absent on Solaris 10 SPARC and all previous Sun Studio versions (8 to 11), but present on both amd64 Solaris 10 and Linux 2.6 versions:
    1. mozilla.org's Spidermonkey "JavaScript" (ECMAscript) can't be compiled with it: in file jsinterp.c an endless loop is entered by the optimizer in level -xO1 and higher (!). With no optimization, linking is impossible (unresolved symbols from jsinterp.o), which hints to defunct output.
    2. the optimizer (ube) is crashing in sources with a switch with many many case labels in optimization level -xO3 and higher with a segfault.

    I have trouble to seperate a reasonable (example) source out of our complex sources showing the second issue --- what I can already tell is, that the following special pragma has to do with it (while I'm now in doubt that the each 256 case labels per switch, two switches in an if else clause have to do with it):
    #pragma opt 0 (func_name)
    Own1 Own2 func_name(...)
    The buggy versions I can tell you: they are
    on Solaris 10 amd64:
    /opt/SUNWspro/bin/cc -V
    cc: Sun C 5.9 SunOS_i386 2007/05/03
    /opt/SUNWspro/prod/bin/ube -V
    ube: Sun Compiler Common 12 SunOS_i386 2007/05/03
    on GNU/Linux:
    cc -V
    cc: Sun C 5.9 Linux_i386 2007/05/03
    ube -V
    ube: Sun Compiler Common 12 Linux_i386 2007/05/03
    The only important compiler option in this regard seems to be the optimization level, but the situation is complex too, if others should be also involved. I will investigate further...

  • Creating EXEs,DLLs using sun studio

    Hi friends...
    can we use the Sun Studio for creating the EXE's Or DLL's i.e Executables,Dynamic linking library of the Java source file.
    which is similar to that of Microsoft Stdio which creates the executables of sourcecodes.
    please tell me.....

    JoachimSauer wrote:
    DrLaszloJamf wrote:
    JoachimSauer wrote:
    There are tools to generate .exe files, but unless you have a very, very specific need for it, you should probably stay away from them.It's usually at this moment that someone posts a link to one of those nickelwhack tools, and then the OP replies "thanks, just what I needed".I'm painfully aware of that, but (despite much evidence to the contrary) I hope that in those few seconds or minutes between my post and that answer, the OP thinks about it and realizes he doesn't really need an .exe file.Why not distract him by getting him to search for a made-up word like "nickelwhack"?

  • Help compiling R using Solaris Studio

    I am trying to compile R 2.14 using the Solaris Studio. The configure command works, with some tweaking ;-), but it I get a lot of "symbols not found" error messages (see below).
    Has anyone been able to compile R with the Solaris Studio? Which libraries or files am I missing and how should I specify them.
    thanks in advance!
    Roger
    cc -m64 -xopenmp -L/opt/sunstudio12.1/lib/amd64 -o R.bin Rmain.o libR.a -library=sunperf\
    -R/opt/solstudio12.2/lib/amd64 -R/usr/local/bin/R-2.14.0/lib64 -R/user/openwin/lib -lfai -lfui -lfsu -lsunquad -lsunmath -lmtsk -lm -lnsl\
    -lsocket -lrt -ldl -lm -licuuc -licui18n
    cc: Warning: Optimizer level changed from 0 to 3 to support parallelized code.
    Undefined               first referenced
    symbol                in file
    cg_ libR.a(registration.o)
    ch_ libR.a(registration.o)
    rg_ libR.a(registration.o)
    rs_ libR.a(registration.o)
    Rz_uncompress libR.a(connections.o)
    bincount libR.a(registration.o)
    Rz_inflate libR.a(connections.o)
    pnbinom_mu libR.a(arithmetic.o)
    qnbinom_mu libR.a(arithmetic.o)
    rnbinom_mu libR.a(random.o)
    dnbinom_mu libR.a(arithmetic.o)
    Rf_df libR.a(arithmetic.o)
    Rf_dt libR.a(arithmetic.o)
    Rf_pf libR.a(arithmetic.o)
    Rf_pt libR.a(arithmetic.o)
    Rf_qf libR.a(arithmetic.o)
    Rf_qt libR.a(arithmetic.o)
    Rf_rf libR.a(random.o)
    Rf_rt libR.a(random.o)
    R_ProcessEvents libR.a(errors.o)
    Rz_crc32 libR.a(connections.o)
    chol_ libR.a(registration.o)
    do_syssleep libR.a(names.o)
    R_zeroin2 libR.a(optimize.o)
    R_EditFiles libR.a(platform.o)
    R_getProcTime libR.a(memory.o)
    lzma_lzma_preset libR.a(connections.o)
    lzma_end libR.a(connections.o)
    R_ExpandFileName libR.a(platform.o)
    R_OpenInitFile libR.a(main.o)
    R_getClockIncrement libR.a(memory.o)
    BZ2_bzDecompress libR.a(dounzip.o)
    R_ReadConsole libR.a(main.o)
    Rf_initialize_R Rmain.o
    call_dqags libR.a(registration.o)
    call_dqagi libR.a(registration.o)
    Rf_lchoose libR.a(arithmetic.o)
    R_ChooseFile libR.a(platform.o)
    Rz_deflateInit2_ libR.a(connections.o)
    lzma_code libR.a(connections.o)
    N01_kind libR.a(RNG.o)
    do_machine libR.a(names.o)
    R_max_col libR.a(registration.o)
    R_ClearerrConsole libR.a(scan.o)
    do_dataviewer libR.a(names.o)
    Rf_InitEd libR.a(main.o)
    pcre_maketables libR.a(grep.o)
    tre_regaparams_default libR.a(agrep.o)
    libintl_gettext libR.a(main.o)
    libintl_textdomain libR.a(main.o)
    lzma_stream_decoder libR.a(connections.o)
    R_Busy libR.a(main.o)
    Rf_dnf libR.a(arithmetic.o)
    Rf_dnt libR.a(arithmetic.o)
    Rf_pnf libR.a(arithmetic.o)
    Rf_pnt libR.a(arithmetic.o)
    Rf_qnf libR.a(arithmetic.o)
    Rf_qnt libR.a(arithmetic.o)
    BZ2_bzRead libR.a(connections.o)
    Rf_choose libR.a(arithmetic.o)
    Brent_fmin libR.a(optimize.o)
    BZ2_bzDecompressEnd libR.a(dounzip.o)
    Rf_dbinom libR.a(arithmetic.o)
    Rf_dchisq libR.a(arithmetic.o)
    R_cumsum libR.a(registration.o)
    Rf_dgamma libR.a(arithmetic.o)
    Rf_dhyper libR.a(arithmetic.o)
    Rf_dlogis libR.a(arithmetic.o)
    Rf_dlnorm libR.a(arithmetic.o)
    Rf_dnbeta libR.a(arithmetic.o)
    Rf_dnorm4 libR.a(arithmetic.o)
    fft_factor libR.a(fourier.o)
    lzma_stream_encoder libR.a(connections.o)
    Rf_fround libR.a(arithmetic.o)
    Rf_ftrunc libR.a(arithmetic.o)
    tre_regawexec libR.a(agrep.o)
    Rz_compress libR.a(connections.o)
    do_addhistory libR.a(names.o)
    Rf_pbinom libR.a(arithmetic.o)
    Rf_pchisq libR.a(arithmetic.o)
    Rf_pgamma libR.a(arithmetic.o)
    Rf_phyper libR.a(arithmetic.o)
    Rf_plogis libR.a(arithmetic.o)
    Rf_plnorm libR.a(arithmetic.o)
    Rf_pnbeta libR.a(arithmetic.o)
    Rf_pnorm5 libR.a(arithmetic.o)
    Rf_qbinom libR.a(arithmetic.o)
    R_pretty libR.a(registration.o)
    R_cpolyroot libR.a(complex.o)
    Rf_qchisq libR.a(arithmetic.o)
    Rf_ptukey libR.a(arithmetic.o)
    Rf_qgamma libR.a(arithmetic.o)
    Rf_qhyper libR.a(arithmetic.o)
    Rf_qlogis libR.a(arithmetic.o)
    Rf_qlnorm libR.a(arithmetic.o)
    Rf_qnbeta libR.a(arithmetic.o)
    Rf_qnorm5 libR.a(arithmetic.o)
    bakslv libR.a(registration.o)
    Rf_rbinom libR.a(random.o)
    Rf_rchisq libR.a(random.o)
    Rf_qtukey libR.a(arithmetic.o)
    Rf_rgamma libR.a(random.o)
    Rf_rhyper libR.a(random.o)
    Rf_rlogis libR.a(random.o)
    Rf_rlnorm libR.a(random.o)
    R_rowsum libR.a(registration.o)
    str_signif libR.a(registration.o)
    Rf_pcauchy libR.a(arithmetic.o)
    dchdc_ libR.a(registration.o)
    do_system libR.a(names.o)
    do_X11 libR.a(names.o)
    dpbfa_ libR.a(registration.o)
    dpbsl_ libR.a(registration.o)
    dpoco_ libR.a(registration.o)
    dpodi_ libR.a(registration.o)
    dpofa_ libR.a(registration.o)
    dposl_ libR.a(registration.o)
    dqrcf_ libR.a(registration.o)
    dqrdc_ libR.a(registration.o)
    dqrls_ libR.a(registration.o)
    dqrqy_ libR.a(registration.o)
    dqrsl_ libR.a(registration.o)
    dqrxb_ libR.a(registration.o)
    dsvdc_ libR.a(registration.o)
    dtrco_ libR.a(registration.o)
    dtrsl_ libR.a(registration.o)
    wilcox_free libR.a(registration.o)
    fdhess libR.a(optimize.o)
    R_ShowFiles libR.a(platform.o)
    BZ2_bzReadGetUnused libR.a(connections.o)
    tre_regaexecb libR.a(agrep.o)
    BZ2_bzReadOpen libR.a(connections.o)
    R_zeroin libR.a(optimize.o)
    pcrevalid_utf8 libR.a(util.o)
    machar libR.a(platform.o)
    Rf_pnchisq libR.a(arithmetic.o)
    Rf_pnbinom libR.a(arithmetic.o)
    lzma_crc64 libR.a(util.o)
    optif9 libR.a(optimize.o)
    rcont2 libR.a(random.o)
    R_pretty0 libR.a(engine.o)
    setulb libR.a(optim.o)
    Rf_qcauchy libR.a(arithmetic.o)
    R_tabulate libR.a(registration.o)
    tre_regncompb libR.a(grep.o)
    tre_regnexecb libR.a(grep.o)
    Rf_pwilcox libR.a(arithmetic.o)
    libintl_dngettext libR.a(errors.o)
    find_interv_vec libR.a(registration.o)
    Rf_qnchisq libR.a(arithmetic.o)
    Rf_qnbinom libR.a(arithmetic.o)
    Rf_bessel_i_ex libR.a(arithmetic.o)
    Rf_bessel_j_ex libR.a(arithmetic.o)
    Rf_bessel_y_ex libR.a(arithmetic.o)
    Rf_bessel_k_ex libR.a(arithmetic.o)
    Rz_inflateEnd libR.a(connections.o)
    Rz_deflateEnd libR.a(connections.o)
    Rf_rcauchy libR.a(random.o)
    Rf_trigamma libR.a(arithmetic.o)
    do_saveplot libR.a(names.o)
    pcre_free libR.a(grep.o)
    pcre_exec libR.a(grep.o)
    Rf_beta libR.a(arithmetic.o)
    Rf_dexp libR.a(arithmetic.o)
    tre_regcomp libR.a(platform.o)
    tre_regexec libR.a(platform.o)
    tre_regfree libR.a(platform.o)
    Rf_pexp libR.a(arithmetic.o)
    Rf_qexp libR.a(arithmetic.o)
    Rf_rexp libR.a(random.o)
    Rf_sign libR.a(arithmetic.o)
    Rf_qwilcox libR.a(arithmetic.o)
    R_ReadClipboard libR.a(connections.o)
    BZ2_bzWriteOpen libR.a(connections.o)
    bincode libR.a(registration.o)
    R_CleanTempDir libR.a(main.o)
    R_access_X11 libR.a(platform.o)
    norm_rand libR.a(optim.o)
    Rf_rnchisq libR.a(random.o)
    Rf_rnbinom libR.a(random.o)
    R_running_as_main_program Rmain.o
    Rf_psigamma libR.a(arithmetic.o)
    ch2inv_ libR.a(registration.o)
    BZ2_bzWrite libR.a(connections.o)
    BZ2_bzBuffToBuffDecompress libR.a(connections.o)
    Rz_inflateInit2_ libR.a(connections.o)
    Rf_rwilcox libR.a(random.o)
    R_CleanUp libR.a(main.o)
    Rf_dsignrank libR.a(arithmetic.o)
    Rf_psignrank libR.a(arithmetic.o)
    Rf_rsignrank libR.a(random.o)
    Rf_qsignrank libR.a(arithmetic.o)
    BZ2_bzDecompressInit libR.a(dounzip.o)
    Rf_dcauchy libR.a(arithmetic.o)
    Rz_deflate libR.a(connections.o)
    R_Suicide libR.a(main.o)
    libintl_bindtextdomain libR.a(main.o)
    stemleaf libR.a(registration.o)
    Rf_digamma libR.a(arithmetic.o)
    do_sysinfo libR.a(names.o)
    Rf_dnchisq libR.a(arithmetic.o)
    Rf_dnbinom libR.a(arithmetic.o)
    do_edit libR.a(names.o)
    pcre_study libR.a(grep.o)
    R_ShowMessage libR.a(startup.o)
    dqrdc2_ libR.a(registration.o)
    dqrqty_ libR.a(registration.o)
    dqrrsd_ libR.a(registration.o)
    Rf_InitFunctionHashing libR.a(Rdynload.o)
    R_FlushConsole libR.a(plot.o)
    lzma_alone_decoder libR.a(connections.o)
    Rf_dwilcox libR.a(arithmetic.o)
    rmultinom libR.a(random.o)
    tre_regwcomp libR.a(agrep.o)
    tre_regwexec libR.a(grep.o)
    Rf_dbeta libR.a(arithmetic.o)
    Rf_dgeom libR.a(arithmetic.o)
    Rf_dpois libR.a(arithmetic.o)
    Rf_dunif libR.a(arithmetic.o)
    Rf_fmin2 libR.a(plot3d.o)
    Rf_fmax2 libR.a(relop.o)
    Rf_fprec libR.a(arithmetic.o)
    Rf_imax2 libR.a(printutils.o)
    Rf_lbeta libR.a(arithmetic.o)
    tre_regcompb libR.a(agrep.o)
    do_savehistory libR.a(names.o)
    tre_regerror libR.a(agrep.o)
    tre_regexecb libR.a(dcf.o)
    Rf_pbeta libR.a(arithmetic.o)
    Rf_pgeom libR.a(arithmetic.o)
    Rf_ppois libR.a(arithmetic.o)
    Rf_qbeta libR.a(arithmetic.o)
    Rf_punif libR.a(arithmetic.o)
    Rf_qgeom libR.a(arithmetic.o)
    Rf_qpois libR.a(arithmetic.o)
    Rf_rbeta libR.a(random.o)
    Rf_qunif libR.a(arithmetic.o)
    Rf_rgeom libR.a(random.o)
    Rf_rnorm libR.a(random.o)
    Rf_rpois libR.a(random.o)
    Rf_runif libR.a(random.o)
    do_loadhistory libR.a(names.o)
    tre_regaexec libR.a(agrep.o)
    R_WriteConsoleEx libR.a(printutils.o)
    Rz_inflateReset libR.a(connections.o)
    do_dataentry libR.a(names.o)
    lzma_raw_encoder libR.a(connections.o)
    BZ2_bzBuffToBuffCompress libR.a(connections.o)
    Rf_lgammafn libR.a(random.o)
    BM_norm_keep libR.a(RNG.o)
    Rf_gammafn libR.a(arithmetic.o)
    libintl_dgettext libR.a(main.o)
    libintl_ngettext libR.a(printarray.o)
    fft_work libR.a(fourier.o)
    lzma_raw_decoder libR.a(connections.o)
    Rf_pweibull libR.a(arithmetic.o)
    Rf_qweibull libR.a(arithmetic.o)
    Rf_rweibull libR.a(random.o)
    Rf_dweibull libR.a(arithmetic.o)
    pcre_fullinfo libR.a(grep.o)
    R_WriteConsole libR.a(printutils.o)
    R_ResetConsole libR.a(errors.o)
    BZ2_bzWriteClose libR.a(connections.o)
    signrank_free libR.a(registration.o)
    pcre_compile libR.a(grep.o)
    BZ2_bzReadClose libR.a(connections.o)
    ld: fatal: symbol referencing errors. No output written to R.bin

    R 2.14.2 built just fine on S11 with Studio 12.3. I had to have GNU iconv installed and then I had to build without readline as the native one has some problems/features WRT linking to n/curses that I was not in the mood to play with.
    ./configure \
    --prefix=%{_prefix} \
    --without-readline \
    --enable-R-shlib                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to use Parallel Compilation -j using sun make?

    Hello,
    My c++ project have lots of cpp files and it takes around 5 - 5.5 hours to build the application which is definitely a lot of time. Little bit of googling landed me to the following sun link to reduce the build time.
    http://developers.sun.com/solaris/articles/parallel_make.html
    By using parallel make option of -j as it should reduce the build time considerably as i was using Solaris 9 on Sparc Sun-Fire-V440 which is having 4 CPU.
    But on invoking make with a -j option i.e "make all -j 4" I get the following error :
    make: Warning: Ignoring DistributedMake -j option
    I even tried to use gcc make instead of sun(/usr/ccs/bin/make) make but none of them is actually helping me to reduce my build time.
    Can some please guide me how should i go ahead withe usage of -j option on solaris.

    You should be aware that amount of parallelism that dmake can exploit depends fully on your Makefiles.
    Unnecessary dependencies can significantly reduce amount of parallelism.
    Recursive makefiles (make rules in turn calling makes) will hamper parallelism as well.
    Hidden dependencies (those not directly specified in rules) will lead to spontaneous build failures.
    It will take some discipline to write makefiles properly, but in a long term it will pay off.
    regards,
    __Fedor.

  • Compiling iperf on Solaris 10 8/07 w/ Sun Studio 12 -- Errors

    /var/tmp/iperf-2.0.2 (nocc-testjump) #> /usr/local/bin/make
    /usr/local/bin/make  all-recursive
    make[1]: Entering directory `/var/tmp/iperf-2.0.2'
    Making all in compat
    make[2]: Entering directory `/var/tmp/iperf-2.0.2/compat'
    if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../include -I../include    -O2  -MT delay.o -MD -MP -MF ".deps/delay.Tpo" -c -o delay.o delay.cpp; \
            then mv -f ".deps/delay.Tpo" ".deps/delay.Po"; else rm -f ".deps/delay.Tpo"; exit 1; fi
    In file included from /usr/include/sys/wait.h:24,
                     from /usr/include/stdlib.h:22,
                     from ../include/headers.h:78,
                     from ../include/Timestamp.hpp:63,
                     from delay.cpp:53:
    /usr/include/sys/siginfo.h:259: 'ctid_t' is used as a type, but is not defined
       as a type.
    /usr/include/sys/siginfo.h:260: 'zoneid_t' is used as a type, but is not
       defined as a type.
    /usr/include/sys/siginfo.h:390: 'ctid_t' is used as a type, but is not defined
       as a type.
    /usr/include/sys/siginfo.h:391: 'zoneid_t' is used as a type, but is not
       defined as a type.
    make[2]: *** [delay.o] Error 1
    make[2]: Leaving directory `/var/tmp/iperf-2.0.2/compat'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/var/tmp/iperf-2.0.2'
    make: *** [all] Error 2
    /var/tmp/iperf-2.0.2 (nocc-testjump) #> Any ideas why I'm getting this problem?

    In general, if you are having a problem compiling Open Source code with Sun Studio, you need to try the community support portal for that code.
    Start with the Iperf home page
    [http://starplane.org/tooldoc/iperf/]
    Often, Open Source code has been tried only with gcc, and won't build with other compilers without some effort.
    If nobody else has tried using Sun Studio, you might need to do some debugging of configuration scripts and even source code.
    The Iperf home page provides an address where you can report such problems.
    In addition, older versions of autoconf and libtool don't work with Sun Studio, and can generate invalid makefiles. Be sure you have the current versions of both, if they are used by Iperf.

  • Compiling MySQL 5.1.26-rc with Sun Studio Express on Linux?

    I managed to compile MySQL 5.1.26-rc with Sun Studio Express on Linux (OpenSuse 10.2 on x64), but I get unexpected crashes every time a connection thread exits:
    (gdb) where
    #0  0x00002b2ce0649535 in raise () from /lib64/libc.so.6
    #1  0x00002b2ce064a990 in abort () from /lib64/libc.so.6
    #2  0x00002b2cdf949795 in __pthread_unwind () from /lib64/libpthread.so.0
    #3  0x00002b2cdf944425 in pthread_exit () from /lib64/libpthread.so.0
    #4  0x00000000005048b2 in one_thread_per_connection_end (thd=0x16d88f0, put_in_cache=false)
    at /home/mysql/debug/sql//mysqld.cc:1893
    #5  0x0000000000513b75 in handle_one_connection (arg=0x16d88f0) at /home/mysql/mysql-5.1.26-rc/sql//sql_connect.cc:1122
    #6  0x00002b2cdf94309e in start_thread () from /lib64/libpthread.so.0
    #7  0x00002b2ce06da4cd in clone () from /lib64/libc.so.6
    #8  0x0000000000000000 in ?? ()If I compile with gcc using e.g. BUILD/compile-amd64-debug-max, I have no issue! But I want to use Sun Studio in order to be consistent with the Solaris version, and also because Sun Studio is likely to produce better code.
    Here is the compilation script, it downloads and extracts the source tree and builds it (it assumes Sun Studio Express is installed in /opt/sun):
    #!/bin/bash
    export PATH=/opt/sun/sunstudioceres/bin:$PATH
    wget -q http://mir2.ovh.net/ftp.mysql.com/Downloads/MySQL-5.1/mysql-5.1.26-rc.tar.gz
    tar xpf mysql-5.1.26-rc.tar.gz
    cd mysql-5.1.26-rc
    # Explicitly specify libs to avoid linking with the STL.
    export LIBS="-xnolib -lCrun -lm -lc -lrt"
    autoreconf --force --install > autoreconf.log 2>&1
    export MY_FLAGS="-g -mt -xtarget=generic -m64"
    CC=cc CXX=CC CFLAGS=$MY_FLAGS CXXFLAGS=$MY_FLAGS ./configure --with-big-tables --without-embedded-server --disable-shared --with-pthread --with-ssl -with-plugins=max > configure.log 2>&1
    gmake -j > build.log 2>&1Any idea about what is going wrong?
    Thanks.

    Possibly the actual CC (or cc) command lines are not correct. The proper way to say not to link libCstd is the command-line option -library=no%Cstd. Then you don't need to add the default system libraries like -lc to the command line.
    Can you show the actual CC command lines that are generated by the makefile? They should be in the compilation log. I'd also like to see the command line(s) used to create dynamic libraries, if any, and the final executable.

  • Is it possible to run sun studio 12 ide with sun studio 8 compiler?

    Hi, i am in the process of evaluating sun studio 12. Our company cannot move to sun studio 12 compiler collection right now as it is a huge code base and it will take us few months even before we start using sun studio 12 compiler in our development environment. Is it possible to use sun studio 12 ide with sun studio 8 compiler collection(CC, dbx etc)? Your feedback is appreciated. thank you.

    There are two parts to the answer.
    1) whether you can
    To choose a compiler set follow Tools->Options->C/C++
    and in the BuildTools tab you'll see how it picks up
    compilers from your PATH.
    This dialog doesn't govern choice of dbx, which will always
    come from the installation. However you can alter which dbx
    is used by presetting the environment variable SPRO_DBX_PATH
    to teh full pathname of a dbx of your choice.
    2) whether you should
    The IDE should work reasonably well with older compilers. They
    are not that tightly bound.
    The IDE will not work well enough with an older dbx, especially as
    old as studio 8. However, while not officially supported or tested
    the SS12 dbx should be reasonably bwd compatible with code
    generated from older compilers.
    So my recommendation is: don't use SPRO_DBX_PATH and
    give the old compilers a try.

Maybe you are looking for

  • Highlighting Text In Pages 4 and 5: How To/Best Methods?

    Hello Fellow Macers: I need advice on the best way to highlight text in Pages 4 and 5: I use and prefer Pages 4.3. Yes, I have Pages 5.2, and I find that using it good for some things (dictating into a document), but not so good for others - highligh

  • Why am I no longer able to send sms messages on my iPad.

    ipad is no longer sending sms messages. I've tried resetting network and rebooting. my husband has iPad and he's able to send sms messages. checked his settings against mine and they seem to have same settings. I'm at a loss and need help.

  • HT4623 How do I upload photos that were downloaded to my PC via the photo stream?

    In the process of downloading the iOS 6, my app data was lost. I had to restore & in doing so lost all my pictures. I do have them photo streamed to my PC. I cannot get those photos back on my iphone. Can someone help out? And if you know how to get

  • Creative Zen Touch Battery Drain

    I need to drain the battery of my Zen Touch completely. It has a nasty habit (well this is the third one in a row now in 5 months) of freezing and not allowing me to select any options in the recovery menu, or going past the Zen Touch startup screen:

  • Email Warning

    My daughter has a Z10 and has today received this email:- Your mailbox has exceeded the storage limit 2.GB Established by the administrator is currently 2.30GB, can not send or receive new messages until you re-validate your e-mail Click the link bel