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...

Similar Messages

  • 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.

  • Is it possible to integrate j2ee enviroment with sun studio developer???

    Dear all,
    I currently developing a jsp based web application with sun studio enterprise but sun studio by default does not support j2ee environment, i think it only support to j2SE.
    i want to use persistence and enterprise beans with my application but don't know, how to do it with sun studio developer.
    i can install the persistence and ejb api's separately, but i dont know whether sun developer will support them
    Can any on tell, what is the best tool for web application developement, while i will need to java uml diagrams later on.
    i would be grateful, if someone can help, i am really desprate
    shafqat zaman

    Sun Java Studio Enterprise 8.1 (built on top on NetBeans 5.0) does support j2ee (and j2se) development.
    For developing j2ee applications, both NetBeans (latest version is 5.5, http://www.netbeans.org) and SJSE can be used. For a comparison on SJSE and NetBeans, please take a look at:
    http://forum.java.sun.com/thread.jspa?forumID=747&threadID=5113472
    For a list of all development tools from Sun, please take a look at http://developers.sun.com/prodtech/devtools/free/index.html..
    i want to use persistence and enterprise beans with my application but don't know,
    how to do it with sun studio developer.For j2ee development, please check out NetBeans 5.5 ; there are several tutorials available at http://www.netbeans.org/kb/index.html. (Since SJSE is built on top on NetBeans, SJSE can also be used and all the NetBeans documents also will apply to SJSE).

  • [svn:fx-trunk] 11488: Resubmitting binary distribution of xercesPatch. jar from the third party module in the SDK and compiled it with Sun JDK 1.4 .2_12.

    Revision: 11488
    Author:   [email protected]
    Date:     2009-11-05 17:10:10 -0800 (Thu, 05 Nov 2009)
    Log Message:
    Resubmitting binary distribution of xercesPatch.jar from the third party module in the SDK and compiled it with Sun JDK 1.4.2_12.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-16818 - Must open-source the code for xercesPatch.jar.
    Reviewer: Discussed with Gordon
    Tests run: Checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-16818
    Modified Paths:
        flex/sdk/trunk/lib/xercesPatch.jar
        flex/sdk/trunk/modules/thirdparty/xerces-patch/build.xml

    Did you try this:
    http://forum.java.sun.com/thread.jsp?thread=434718&forum=60&message=1964421

  • Problems with sun studio 12 in suse linux 11

    Hi.
    I installed Sun Studio 12 suse linux with no problems. However, the debugging modules (DBX) are not working any more. When I started Sun Studio, it gave a message about modules that could not be loaded in tha moment. I did not pay attention. But I noticed that all debugging options were disabled.
    Using the module manager, I saw the DBX module was not checked, and I could not change it. I was marked with a red X. So I thought to reinstall the application. However, the uninstall utility doesn't work either.
    According with the documentation, running ./uninstaller does it, but I get the following error message instead
    Exception in thread "main" java.lang.NoClassDefFoundError: uninstall_Sun_Studio_12/class
    Caused by: java.lang.ClassNotFoundException: uninstall_Sun_Studio_12.class
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    I tried to uninstall manually, and then execute installer, by using first the software manager in linux and deleting the producregistry file manually. It worked because I executed the installer. However, in Sun Studio IDE, debugging options are still not available despite I "reinstalled" the application. I checked the log files and they say the file uninstall_Sun_Studio_12.class could not be written.
    So my questions are:
    1. Is there any other way to repair Sun Studio? What could be the possible for this module to stop working?
    2. Does anyone have an idea of why the installer cannot write the uninstaller class?
    I found that perhaps problems regarding Java / Netbeans versions could be the problem, but the ones I have installed are those packages that were installed along with Sun Studio, and both are valid.
    Thank you very much.

    Perhaps you can simply delete the Sun Studio 12 installation tree, because it will not work on SUSE Linux 11.
    This OS is not supported, so any problems you see with SS12 on SUSE 11 will not be fixed.
    But we have a newer version, that should work better.
    You can try to download and install Sun Studio Express 2008/11 (extract pre-installed image from tar.bz2 file).
    Here is a pointer to the web page:
    http://developers.sun.com/sunstudio/downloads/express
    All you need is to provide a email address, and press "Download Now" button.
    You will see a page, that gives you 2 options to download Sun Studio Express 2008/11.
    Use "Option 2": Download Tarfile Installer
    Thanks,
    Nik

  • Issue with Sun Webserver 7

    Hi
    I am facing issue with sun webserver7.0. I installed 64 bit version of sun webserver 7 on solaris 64 bit machine.
    I added my NSAPI extension to it. And it works fine.
    The problem i m facing is things are not consistance.. Like i configure my connector(nsapi extension) and request pageof that extension some time it comes and sometimes not.
    when i restart web server things starts working fine. until my connector restart when it adds extension to it.
    Also seen cases where the same page can be opened in IE cannt working in firefox.
    i tried all possible cases. I still not able to figure out issue is in my connector or their is issue with web server 7 for 64 bit.
    Thanks in advance.

    I don't know about this but I will try.
    1. Web Server's Web Container supports jsps.
    2. Can you use simple redirects in obj.conf for the rest to forward your requests?
    http://blogs.sun.com/elving/entry/regular_expression_redirects_in_7
    http://blogs.sun.com/elving/entry/301_permanent_redirects_in_7
    3. Or Can't you use reverse proxy to forward your requests?
    http://blogs.sun.com/meena/entry/configuring_reverse_proxy_in_sun
    4. I don't understand what you extensions do, if you want to simply register a file extension, can't adding new entry in mime.types work?
    http://docs.sun.com/app/docs/doc/819-2630/6n4thbiet?a=view
    "The MIME types file in the config directory contains mappings between the MIME types and file extensions."

  • Trouble viewing disassembly with Sun Studio 11

    I was wondering how someone can bring up a window with a program�s disassembly when debugging a C program with Sun Studio 11. (SPARC). I would like to be able to set breakpoints at specific assembly instructions using Sun Studios�s GUI interface rather than using typed commands with DBX. I would also like to know how to get a window that shows the current value of the registers. Any help would be greatly appreciated.
    Chris

    Oops, it appears that you can't set breakpoints
    through Disassembler window, it just shows the code
    and current position within the code, that's all.It
    gives you better view of context than dbx's 'dis' or
    'list -i' commands, though.Actually you can set breakpoints through Disassembler window:
    - select an address, click right mouse button to open context menu
    - choose "Set Breakpoint"
    If you need this feature, please file an RFE (Request
    For Enhancement) through bugs.sun.comThe Disassembler window has been significantly improved between
    EA1 and FCS. Now users can set and delete breakpoints using the
    same way as they do in source file - click on the left gray area (toggle
    breakpoints). Also Disassembler window has "Step Into", "Step Over",
    "Step Out" and "Run To Cursor" buttons.
    Thanks,
    Nik

  • Need help building boost_1_37_0 on Solaris 10 U6 with Sun Studio 12

    Hi,
    Ok, please bear with me here. I've tried many different sets of instructions, and haven't had success with any of them (including the ones at http://blogs.sun.com/sga/category/Boost).
    Operating System: Solaris 10 x86 U6
    Compiler: Sun Studio 12 (SUNCC version 5.9)
    Boost version: 1.37.0
    The ONLY part of boost that I need is regex. I've never built external libraries before and building boost on Solaris seems a rather daunting task. So, could someone please explain, as clearly as possible, how do I build the boost::regex library using SUNCC?
    I know this is a very broad topic, but since I haven't had any luck with any existing instructions that google turns up, alas I am here.
    Thanks in advance if someone can help me,
    ~Slow
    Note: I don't need any special options, any special, non-standard install paths, nothing. Just a straight, stock, boost install.
    Edited by: SlowToady on Nov 10, 2008 2:18 PM

    First, be sure you have the current patches for Sun Studio 12. You can get them here:
    http://developers.sun.com/sunstudio/downloads/patches/
    Please install the current C++ compiler patch, the C compiler patch, and the common back-end compiler patch.
    You should then be able to build BOOST 1.37.0. The only problem I know of has been filed as CR 6767881, which results in an incorrect complaint about a constructor not being accessible. But I don't think that one affects regex.
    If you running into some other problem after patching the compiler, please post enough detail that we can investigate it.
    Questions about how to build just a portion of BOOST are probably best addressed to a BOOST forum.

  • Core dump using iostream with Sun Studio 8

    I'm running on Solaris 9 using C++ compiler Sun Studio 8, and encoutered a very strange problem.
    My application failed with a core and here is the stack.
    [1] t_splay(0x3774b470, 0x387a0ec0, 0x389aec60, 0x39e5ef1f, 0x3774b470, 0x1), at 0xfc347930
    [2] t_delete(0x387a0ec0, 0x80, 0x39be9748, 0x20, 0x383ccd20, 0x0), at 0xfc347698
    [3] mallocunlocked(0x80, 0x0, 0x21b08, 0xfc3bc000, 0x10, 0x20), at 0xfc346d40
    [4] malloc(0x80, 0xfbaa7400, 0x1, 0x759c40, 0x0, 0x0), at 0xfc346b74
    [5] operator new(0x80, 0x0, 0xd3a18, 0x759c74, 0x0, 0x8345fc), at 0x760c10
    [6] strstreambuf::overflow(0xf41f6e28, 0x29, 0xf41f6e28, 0x39fe0e88, 0x39fe0e88, 0x8345fc), at 0x75bb1c
    [7] streambuf::xsputn(0xf41f6e28, 0xfee00bc0, 0x1, 0x0, 0x81010100, 0x1), at 0x75ab94
    [8] unsafe_ostream::outstr(0xf41f6e78, 0xfee00bbf, 0x0, 0x0, 0xf41f6e7c, 0xfffffffe), at 0x757bac
    =>[9] unsafe_ostream::operator<<(this = 0xf41f6e78, _s = 0xfee00bbf ")"), line 1211 in "iostream.h"
    [10] ostream::operator<<(this = 0xf41f6e74, _s = 0xfee00bbf ")"), line 1350 in "iostream.h"
    [11] CorInterfaceEntity::ifState(this = 0x1bc3de78, newState = MISMATCH_OF_INSTALLED_AND_EXPECTED, needToSendEvent = false
    Can somebody help me giving a direction of investigation ?
    Is there perhaps known problem with iostream on Sun Studio 8 running on Solaris 9 ?
    Thanks for any tips.
    Yaakov Berkovitch
    [email protected]

    But sorry for my insistence, but do you think that
    purify or/and runtime are not able to detect any
    corruption of the heap ?They can detect some kinds of corruption, such as some uses of an invalid pointer.
    But a wild pointer that changes the value of data that is part of your program cannot be detected by RTC or Purify. Those programs can't know whether that change is intentional.
    >
    BTW, we are not using any volatile declaration, and weIf non-local data is shared among threads, it should be declared volatile. For example, suppose you have
    x = foo;
    ... // code not changing foo
    y = foo;
    If foo is not marked volatile, the compiler is allowed to assume its value hasn't changed, and assign to y the same value assigned to x. If foo was changed by another thread, y will not have the current value of foo. The "volatile" declaration says that the variable's value might change without any obvious reason, and the compiler should generate code to load a fresh value each time it is referenced.
    are using the rwtools library packaged with the
    compiler, and are not using the STD library.OK, you are not running into a std::string synchronization bug.
    >
    Also about the compiler option -xarch=v8, is probably
    not relevant for us because we are running Solaris 9.
    So the relevant compiler is probably -xarch=v9. Do you
    advise us using this option ?I think you misunderstand. The -xarch values refer to the kind of processor your program will run on.
    The -xarch=v8 option generates 32-bit code that will run on all SPARC chips, including the chips found in very old SPARCstations. This option is the default for compilers prior to Sun Studio 9 (which ships this week).
    The -xarch=v8plus option generates 32-bit code that runs only on UltraSPARC chips, found in Ultra workstations. These are the only kinds of workstations shipped by Sun since about 1996. Unless you need to support the ancient SPARCstations, we recommend compiling with -xarch=v8plus, to get smaller and faster code.
    The -xarch=v9 option generates 64-bit code that runs only on UltraSPARC chips, an only on Solaris 7 or later. Unless your program requires a very large address space, you generally don't want to generate 64-bit code. On SPARC, 64-bit code is larger and slower than 32-bit code. (Type "long" and all pointers are 64 bits instead of 32 bits.)
    >
    Also I want to return you two new questions:
    1) I read in another discussion,
    http://forum.sun.com/thread.jsp?forum=5&thread=18124&me
    sage=47854#47854
    that another memory manager can be more efficient in
    multi-threaded environment (libmtmalloc.so), and also
    an alternate threads library (/usr/lib/lwp) that
    reduced CPU usage. Do you advice us using this
    alternate library ?The libmtmalloc library usually has better performance in MT programs than the default version of malloc. It also can result in more memory fragmentation. In that case, the larger working set can sometimes have a large negative effect, more than offsetting the MT efficiency. You have to experiment to see whether it is appropriate for your particlular program. If you are running into heap corruption, the pattern of corruption will probably be different with libmtmalloc than with the default malloc. The differences might provide a clue to what is wrong.
    The alternative "T2" threads library was introduced in Solaris 8 as an option.
    In Solaris 9 it is the default, so you are already using it.
    >
    2) We are using the Rogue Wave library shiped with the
    compiler. Is it an up-to-date version ? Can we assume
    that is a good choice or it will be preferable to move
    to the STD library ?I assume you mean Rogue Wave Tools.h++. As explained in the compiler docs, this version of Tools is obsolete, and has not been supported for many years. We continue to provide it for customers who used it before the introduction of the C++ Standard Library in 1998, and who don't want to change their code. We do not recommend it for use in new code.

  • Berkeley DB 5.0.21 on OpenSolaris 2009.06 with Sun Studio CC v12 update 1

    Dear all,
    I have compiled Berkeley DB on OpenSolaris 2009.06 x86 with following C/C++ compilers:
    semihc@giant$ uname -a
    SunOS giant 5.11 snv_111b i86pc i386 i86pc Solaris
    semihc@giant$ cc -V
    cc: Sun C 5.10 SunOS_i386 2009/06/03
    semihc@giant$ CC -V
    CC: Sun C++ 5.10 SunOS_i386 128229-02 2009/09/21
    I did however observe an issue with the configure script which incorrectly deduced that Sun C++ compiler cannot support templates. When inspected I noticed that configure script is using an invalid C++ code to validate template support. Followings are the diff file to resolve this issue.
    semihc@giant$ diff configure configure.org
    18031d18029
    < return 0;
    18039d18036
    < return 0;
    18153c18150
    < //dbstl_configure_test::max<double>(4,4.2); // instantiate T as double
    dbstl_configure_test::max<double>(4,4.2); // instantiate T as doubleAfter this change I managed to compile BDB with following settings:
    ../dist/configure prefix=/stow/db-5.0.21 enable-debug enable-diagnostic enable-cxx enable-stl enable-sql enable-sql_codegen enable-sql_compat
    I would appreciate if Berkeley DB team amend confiigure script to reflect above changes.
    Regards

    Thank you for the update,
    Once the work was underway it was realized that a
    a standards-compatible C++ compiler is needed to build dbstl.
    From the documentation:
    At:
    http://download-llnw.oracle.com/docs/cd/E17076_02/html/installation/build_unix_conf.html
    If your compiler is not ISO C++ compliant, the configure may fail with this argument specified because the STL API requires standard C++ template features. In this case, you will need a standard C++ compiler. So far gcc is the best choice, we have tested and found that gcc-3.4.4 and all its newer versions can build the Berkeley DB C++ STL API successfully.
    and At:
    http://download-llnw.oracle.com/docs/cd/E17076_02/html/programmer_reference/stl.html#stl_intro_portability
    For this reason, you need a standards-compatible C++ compiler to build dbstl. As of this writing, the following compilers are known to build dbstl successfully:
    *MSVC8
    *gcc3.4.4 and above
    *Intel C++ 9 and above
    For *nix platforms, if you can successfully configure your Berkeley DB build script with --enable-stl, then you should be able to successfully build dbstl library and application code using it.
    Sandra

  • 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

  • Poor performance of string::append on Solaris 10 with Sun Studio 10

    I found string::append(size_type num, char ch) of libCstd consumes too much cpu time comparing with stlport. Anybody knows if this is a known issue on Solaris 10 and Sun Studio 10? Or if I need to use special build options to build with libCstd?
    For example: a.c
    #include <iostream>
    #include <time.h>
    using namespace std;
    int main()
      string ss;
      for ( i=0; i<60000; i++)
        ss.append(1, 'A');
      cout << clock();
      cout << endl;
      return 0;
    }Build with libCstd:
    CC a.c -o a1
    Build with stlport:
    CC -library=%none -library=stlport4 a.c -o a2
    a1 outputs: 10000
    a2 outputs: 1900000
    You can see how big different they have. I am sure their running environment is same.

    I suspect this is due to a bug in libCstd that manifests itself by reallocating the string for each append. Compile and run the program below:
    #include <string>
    #include <new>
    #include <stdlib.h>
    int in_main;
    void* operator new (size_t nbytes) throw (std::bad_alloc) {
    if (in_main) printf ("operator new (%zu)\n", nbytes);
    return malloc (nbytes);
    void operator delete (void *p) throw () {
    if (in_main) printf ("operator delete (%p)\n", p);
    free (p);
    int main () {
    in_main = 1;
    std::string ss;
    for (int i = 0; i < 256; i++) {
    printf ("append(1, 'A')\n");
    ss.append (1, 'A');
    in_main = 0;
    }

  • Using boost::thread with Sun Studio C++ gives error

    Hi,
    I'm trying to compile a code which uses the boost thread library, but I get the following error:
    CC -library=stlport4 -features=tmplife -features=tmplrefstatic -mt -c -o t t.cpp
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/mutex.hpp", line 142: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/detail/thread.hpp", line 344: Error: boost::thread::thread(boost::thread&) is not accessible from boost::move(boost::detail::thread_move_t<boost::thread>).
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    "/opt/boost/include/boost/thread/pthread/recursive_mutex.hpp", line 179: Error: The function "pthread_mutex_timedlock" must have a prototype.
    5 Error(s) detected.
    make: *** [t] Error 5the sample source code in question here just a single include:
    #include <boost/thread.hpp>This is with boost 1.40.0. I wonder what I'm doing wrong..
    Akos

    OK, I tried latest version of CC from Sun Studio 12 update 1 and can say that
    - the error about constructor not being accessible is Sun C++ compiler "feature" (only called feature because it existed for so long) that allows binding of rvalues to non-const references; this "feature" will probably be turned off in the next release. It can't be changed in a patch because client's code might rely on it.
    - the other errors are also not Boost-specific: the result of incompatibility of Linux headers and Sun C++ compiler; more thorough investigation is due, but in the past we had several problems like this. This particular can be solved by adding
    -D_GNU_SOURCE to compile line.

  • Compilation error with sun workshop 6u2

    hi,
    i try to compile a systemc code with sun work shop 6u2 but the compilation generate this error
    Beginning generate/compile...
    Compilation may take a few seconds... please wait.......ucbcc: Warning: Option -YP,:/usr/ucblib:/usr/ensta/pack/SunWorkShop-6u2/SUNWspro/WS6U2/bin/../lib:/usr/ensta/pack/SunWorkShop-6u2/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld is invoked, ignored otherwise
    ucbcc: Invalid input file name /home/uei/chtourou/cadence/soflib/fir/pmb/spb.C, no output generated for this file.
    ucbcc: Warning: Option -YP,:/usr/ucblib:/usr/ensta/pack/SunWorkShop-6u2/SUNWspro/WS6U2/bin/../lib:/usr/ensta/pack/SunWorkShop-6u2/SUNWspro/WS6U2/bin:/usr/ccs/lib:/usr/lib passed to ld, if ld is invoked, ignored otherwise
    ld: warning: option -YP appears more than once, first setting taken
    ld: fatal: file /home/uei/chtourou/cadence/soflib/fir/pmb/spb_sun4v.o: cannot open file: No such file or directory
    ld: fatal: File processing errors. No output written to /home/uei/chtourou/cadence/soflib/fir/pmb/spb_sun4v.so
    system-002: Error: The following system command failed.
    CC -G -o /home/uei/chtourou/cadence/soflib/fir/pmb/spb_sun4v.so /home/uei/chtourou/cadence/soflib/fir/pmb/spb_sun4v.o `/home/uei/chtourou/tmp/systemc-2.0.1/spwSystemC/src/libList.csh.${PLATFORM_DIR}` -lc
    leaf-057: Error: Failed to compile the SPB wrapper for polymorphic leaf
    soflib/fir.pmb
    Failed SPB Wrapper generation for soflib/fir with 2 Error(s), 0 Warning(s) and 0 Note(s).
    Compilation Failed .
    thank you very much

    this compilation it's made from cadence spw and it use the sun workshop,so i don't know options of compilation
    my os is the SUNOS 5.8
    any help will be usefull
    thank you

Maybe you are looking for

  • Problem with Business Package / IAC

    Dear Gurus: We just installed one business package (the one for employee self service). I went to portal content, and navigate to the pages installed by this package. For example the one named "Address". It contains one iview named the same. I asume

  • Help with possibly dead ipod .... any hope?

    While listening to my Ipod, it suddenly sounded like it was dying - the music slowed down - like when a cassette tape gets twisted or runs out of battery life. The screen froze. I know it was fully charged - the previous day I charged it until it ind

  • Oracle 9i and Tomcat JSP

    hi all, i just installed oracle 9i and i'm having some issues with running my existing JSP on tomcat. basically tomcat won't start!! the exception on starting tomcat that i get is "Address in use: JVM_Bind" obviously 9i has played with my java vm som

  • FB60 changing Translation date/exch rate

    Hi, In FB60 we have the Translation date and exch rate in 'Local currency' tab modifiable. However when you change it and press enter it automatically changes back to the original value (which is equal to invoice date and exch rate). So in fact I can

  • ITunes Rental Error Code 5103

    I can't watch rentals, and they don't process. I continually get an error code 5103. Is anyone else getting this same error code? Thanks, David