|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Comment:
Changes (1)
View page history... h2. Introduction So far, this FAQ list is mostly composed of things I culled from the Sun Studio forums, but I'm hoping it will become more than that with the help of you and other Sun Studio users. If you don't see your question answered here, you can ask it in on the Sun Studio forums at : http://developers.sun.com/sunstudio/community/index.jsp, or you can add it here without an answer, and someone will probably fill in the answer for you. Don't forget you can add pages to your "watchlist" to get email updates when a page changes. Remember, the best and most complete information about Sun Studio can always be found on the developer portal at http://developers.sun.com/sunstudio. There has been some discussion of having a wiki site of some kind available on sun.com. If that happens, this content might eventually move to that new site. Stay tuned. {toc} h1. Installer h2. Installer - How to install as non-root (on Linux) The installer can not run as a user other than root. However, you can use rpm2cpio on Linux to extract the contents of the RPMs and place them in a directory of your choice. Some releases of Sun Studio are available as tarballs. Those can be untarred wherever you want. h2. Installer - how to uninstall As root: {noformat} % cd /var/sadm/prod/com.sun.studio_11 % ./batch_uninstall_all {noformat} h2. Installer - Complaint about libXp.so on 64-bit linux You might need to install the 32-bit Motif libraries by hand. See here : [Installing Sun Studio on Different Linux Distros] h2. Installer - no bash? If you install Solaris without SUNWbash, then the "sunstudio" script won't be able to start the IDE. More importantly, the installer won't let you install the Sun Studio tools unless that package is available. The installer may just hang if this is missing. The only way I can think of this happening is if you install Solaris 8 with the "minimal" option. Don't do that. You can use this command to check for bash. {noformat} % pkgchk -l -p /usr/bin/bash Pathname: /usr/bin/bash Type: regular file Expected mode: 0555 Expected owner: root Expected group: bin Expected file size (bytes): 425948 Expected sum(1) of contents: 49550 Expected last modification: Jan 05 02:21:03 PM 2000 Referenced by the following packages: SUNWbash Current status: installed {noformat} If you are missing this package, you should be able to find it on CD 2 of the base Solaris 8 installation CD's. I'm not sure, but the original S8 FCS version might not have had it, so it might require a somewhat recent update of Solaris 8. There is also bad information floating around that says to install bash from the Companion CD. This is wrong. That's a different package and won't satisfy the package dependency required by the installer. h2. Installer - can't get -nodisplay to work I've seen this problem reported multiple times, but I'm not sure there is just one answer. Here is one possible answer: http://forum.sun.com/jive/thread.jspa?forumID=309&threadID=96020 From Terry, our installer guru. {noformat} It should be # ./installer -nodisplay Make sure to set your $DISPLAY to a valid value. it will still run in command-line mode with the right flag. Another possibility is that you have an older version of java first on your path. Try typing java -version as root, and verify that you are picking up the version you think you are (it has to be greater than 1.4.2 for the nodisplay stuff to work properly). Finally, if none of these suggestions help, please run sh -x ./installer -nodisplay and post the output, so we can debug where the shellscript is making the mistake. --Terry. {noformat} h2. Installer - How to install on Ubuntu Thanks to Matt: http://forum.sun.com/jive/thread.jspa?forumID=318&threadID=102562 {noformat} If you are still interested in installing Sun Studio 11 under Ubuntu Dapper Drake you can try installing the rpm package using apt-get then making a symbolic link to the command in the /bin directory. In other words run apt-get install rpm ln -s /usr/bin/rpm /bin/rpm After this the regular installer worked for me. I am not sure if its important but I also have gawk and the java jre and jdk installed. Regards, Matt {noformat} See also: [Installing Sun Studio on Different Linux Distros] h2. Installer - I pkgrm'ed everything, but I still can't reinstall. From akumta on the developer forums: Removing the packages manually (via pkgrm) has probably resulted in corrupting the productregistry file. Please take a look at the Product Registry Problems section in the installation guide at http://docs.sun.com/source/816-7874/troubleshooting.html The original thread is here: http://forum.sun.com/jive/thread.jspa?forumID=309&threadID=102761 h2. Installer - 0 bytes will be installed If you try to install and see lots of information like this: {noformat} Product: Sun Studio Software Location: /u01 Size: 0 bytes ---------------------------- {noformat} Then perhaps you have gotten bits for the wrong architecture. Trying to install the SPARC product on an x86 machine can result in this kind of problem. This is considered a bug, since the problem should be diagnosed much sooner. h1. General Issues h2. General - What are the latest patches? The list of patches for Sun Studio 11 is here: http://developers.sun.com/prodtech/cc/downloads/patches/ss11_patches.html The sun.com web site can sometimes take a while to get updated with the latest list of available patches. See also [Sun Studio Patches] h2. General - Why does updatemanager fail to install Sun Studio patches? updatemanager can fail with this error {noformat} Utility used to install the update failed with exit code {0}. {noformat} It's a problem related to global zones and using patchadd -G. You can find out more here: http://forum.java.sun.com/thread.jspa?threadID=5107410 Until this gets worked out you have install patches without the help of updatemanager. I think this problem can be fixed with better metadata in the patches, so when the Sun Studio patches all get revved again they should all start to work with updatemanager. It's very likely that the latest patches for the patch tools will help to fix this problem. Can anyone verify this? {noformat} New Solaris 10 patchadd patches resolve a few of the compiler patch installation issues: 6188748 patchadd needs support for patching from NFS filesystems 6374972 patchadd should deal with global-only packages intelligently Especially, if you install Sun Studio 11 or 12 on a Solaris 10 system which has the global zone only, you no longer need to use "patchadd -G" to get the patches installed. There is a problem with 119254-33/119255-33, please use at least the -34 revisions of the patchadd patches. (Thanks Thomas Dehn) {noformat} h2. General - How do I report a bug in Sun Studio {noformat} Visit bugs.sun.com Select "Report a Bug" under Bug Database list on the right hand side of the page. Check the box under header "Submit a Bug", and click on button "Start a new Report" Under *Product/Category *pulldown menu, you will see 8 entries for eight components under the main one "Sun Studio Compilers and Tools": C Compiler C++ Compiler Fortran Dbx Performance Analyzer IDE Dmake Other You'll recieve an acknowledgment of your submital, and if accepted and entered into Sun's bug database an email with a Bug ID to track the issue with. {noformat} h2. General - How do I search existing bugs in Sun Studio This feature is coming soon, we're working on it. h2. General - Does Sun Studio work with the latest and greatest Solaris? The Sun Studio tools go through some pretty serious testing before we release the final FCS versions, but Sun can only test against platforms that are available when the testing is done. In general Sun tries to fix bugs that crop up when you're using newer versions of Solaris and Java. Here is a list of which versions of Sun Studio were officially tested with which versions of Solaris. http://developers.sun.com/prodtech/cc/support/support_matrix.jsp See also: [Sun Studio Solaris Issues] h2. General - Does Sun Studio work with the latest and greatest Java? (See related question about Solaris, above) See also: [Sun Studio Java Issues] h2. General - Why are the tools sending packets or emails outside my site! There are features in Sun Studio to try and tell Sun how many people are using Sun Studio. There are two mechanisms at work, and both can be disabled. One older mechanism is based on sending emails, and is only enabled in pre-release versions of the tools. You can disable that one by setting an environement variable called UT_NO_USAGE_TRACKING with a value of "1". The newer one is based on sending a simple packet every two weeks or so, and is turned on for pre-release tools and for officially supported releases. The new one can be disabled by setting SUNW_NO_UPDATE_NOTIFY to any value other than "false". If sendmail is not set up correctly on your system, it's likely that you'll have problems with dbx. It may hang when it tries to send mail. If this happens, just set the environment variable listed above. The newer packet based system is used to find out how many users we have, and also to give you information about the latest updates. You can read more about it here: http://developers.sun.com/prodtech/cc/documentation/ss11/release_notes.html#Update It's very useful for Sun to know which of the individual tools are being used more often, and which platforms are being used. It helps Sun decide which features to implement next, so please leave them on if you can. It will encourage us to support and enhance the tools that are important to you. h1. Tools - IDE h2. IDE - How do I add new file suffixes as "source files" In Sun Studio 11 there is no mechanism for augmenting the list of file extensions treated as "source files". In Sun Studio 12 you can use the GUI to add new extensions by following this path: Tools->Options->Advanced Options->IDE Configuration->System->Object Types h2. IDE - increasing the font size From Nik M Try "sunstudio --fontsize 18". It will change the font size for all windows except Editor. Editor fonts can be changed inside the IDE: - main menu: Tools->Options->"Fonts & Colors" tab. h2. IDE - The Sun Studio IDE is ignoring my control keys {noformat} Ivan: We've had two queries now on the development tools forum where users are complaining that control keys like BS, DEL, arrows are ignored by the SunStudio IDE. This apparently happens for all Swing widgets. Anyone recognize this issue? {noformat} {noformat} This smells like they are using an X server which has the XKEYBOARD extension enabled. Run xdpyinfo to check for that. There also have been a few locale specific issues like this. Its a java issue, you can confirm that by using the notepad demo application that ships with J2SE. # cd /<java_path>/demo/jfc/Notepad # java -jar Notepad.jar Fixed in Mustang, its a whole bushel of bugs. With kind regards, Thomas Dehn {noformat} {noformat} Editor's note: This may be related to copy/paste problems too: IvanIgorovich: There is a bug in Java, 6173972, that may be affecting this. It's fixed in Java5.0u3, so java version SS is running under and see if an upgrade will help. {noformat} You might also want to try this simple workaround if you encounter this bug. {noformat} From: Phil R. my reading of it is that it is specific to the XAWT toolkit. Whilst this is now the default on Solaris and Linux, selecting the older MAWT toolkit is a simple matter of specifying a system property or an environment variable at JDK start up time. eg setenv AWT_TOOLKIT sun.awt.motif.MToolkit {noformat} h2. IDE - I get an error about [: too many arguments This happens in Sun Studio 11 if the output of uname -p has multiple words in it. It should be fixed in newer versions of the sunstudio startup script. You can specify the user directory explicitly as a workaround. --userdir /some/other/dir http://forum.java.sun.com/thread.jspa?threadID=5105057 h2. IDE - How do I update or convert my Sun Studio 'project' files? http://forum.java.sun.com/thread.jspa?forumID=852&threadID=5181160 Jens Siebert has written a Python script for parsing project files, that might be helpful. http://home.arcor.de/jsiebert/files/ss12-gtk-project.py Check the above site for any updates, but I'll copy the script to |
| this wiki as a backup. See here : [Sun Studio IDE Project Parsing] |
| h2. IDE - How do I get CVS support and other NB modules in Sun Studio 12 IDE? From Brad Mayer: The solution is to add the netbeans 5.5.1 update site to sunstudio. This procedure is described somewhere in the netbeans docs online. Tools->Options->Advanced Options->System->Autoupdate Types Right-click on Autoupdate Types -> New -> General Update Center and give it a name and then Finish. When you view its properties, the default Server URL is for a "dev" update site. I changed dev_ to 551_ to match versions (but I don't know if this is necessary, but its what the generic netbeans download has). Tools->Update Center should show this site and after updating, list Subversion somewhere in the Available Update view. But caveat: procedure not valid for NetBeans 6.0 or greater - Plugins/Update functionality is considerably changed with 6.0. This should not be an issue for SS12 as it is built on NB 5.5.1 |
| h1. Tools - Dbx |
... h2. Dbx - binding arrow keys * how do I bind the arrow keys in the dbx command window? {noformat} # black magic to set arrow keys bindings bind ^[[=prefix-1 bind ^[[A=up-history bind ^[[B=down-history bind ^[[D=backward-char bind ^[[C=forward-char # clear screen on Ctrl-L bind -m ^L='/usr/bin/clear^J' # if you have trouble with backspace/delete bind ^?=delete-char-backward # Thanks also to Nikolay Igotti and Fui Shien for # helping this information find its way to the dbx group who # should have known this in the first place. ;-) # Thanks to Volker Simonis for tip about backspace {noformat} h2. Dbx - "Mismatched checksum ..." Why does dbx issue "Mismatched checksum ..." messages when loading system libraries? Warnings are generated during .gnu_debuglink section processing, which contains a pointer to a separate file with debug information and checksum of this file. If the checksum does not match the one that dbx calculates, dbx does not process this external debug information and issues warning like this: dbx: internal warning: Mismatched checksum - file /lib/tls/i686/cmov/libc-2.3.6.so has cd229517, expecting c99d524a This does not prevent dbx neither from debugging nor from seeing exported library symbols (such as global variables and functions). Extended debugging information, however, will not be available. These warnings have been seen on 32-bit Ubuntu Dapper Drake LTS (6.06) and Ubuntu Feisty Fawn (7.04), Nexenta (GNU/OpenSolaris). NOTE: this appeared to be due to differences between dbx and binutils (2.17) in finding external debug info algorithm. Dbx code has been adjusted to match the one in binutils, fix should be available in next but one patch for dbx. See also: "Separate symbol files" forum thread here* *http://forum.java.sun.com/thread.jspa?threadID=5072470&tstart=30 h2. Dbx - annoying arrow at the end of the line What is that arrow at the end of the line? Can't dbx edit multi-line commands? {noformat} Is there any way to change the printable length of command line on dbx? When we types a long command, it could be automatically wrapped. For example, when I type the following long command, (dbx) /usr/ccs/bin/elfdump /usr/openwin/lib/locale/ja/xlibi18n_ja.so.2 | grep PLTGOT the first of command is wrappd and actually displayed like follows. (dbx) /locale/ja/xlibi18n_ja.so.2 | grep PLTGOT < I know I can use *history* command as a workaround to see the whole command line.. But it's more convenient for me if I can set the printable length... Any idea..? {noformat} The dbx ksh is showing its age, and wrapping around the current line being edited is one of the features it doesn't have. In the long run we want to update or replace the built-in ksh with something better. You can use these commands: {noformat} (dbx) set +o vi (dbx) set +o emacs {noformat} Which will turn off cmdline editing and allow wrapping. h2. Dbx - working with Pro*C We've had several forum users asking questions about how to get Pro*C to work with Sun Studio. http://forum.sun.com/jive/thread.jspa?forumID=309&threadID=95976 http://forum.sun.com/jive/thread.jspa?threadID=72482&tstart=30 http://forum.sun.com/jive/thread.jspa?threadID=72483&tstart=30 http://forum.sun.com/jive/thread.jspa?threadID=72478&tstart=30 The last link above has a brief description of a common problem with missing source and line number information in dbx and the debugger GUI. {noformat} Use the command line option LINES=YES to proc to get #line directives in the generated C or C++ code. See the Pro*C/C++ Precompiler Programmer's Guide available online (http://www.oracle.com/technology/documentation/index.html) {noformat} h2. Dbx - my stack trace is messed up on x86 You have to use the -xregs=no%frameptr option with the Sun Studio compilers if you want to be able to get a stack trace. (The -xregs option tells the optimizer which registers it can use for program variables. So to preserve the ABI value of the frame pointer, you tell the optimizer not to use it for program variables.) On x64 (aka amd64) there is an ABI-defined data structure (called the .eh_frame section) that supports walking the stack even without storing the frame pointer. Some tools like dbx and the C++ runtime will use this ABI information, but some tools won't. On 32-bit x86, there is no alternate way to walk the stack. The code has to be compiled with a frame pointer in order to do a stack trace. The only way this optimization will get turned on for you is when the -fast option is used to enable the most aggressive level of optiization. If you want the aggressive optimization, and stack traces, then use -fast -xregs=no%frameptr. You can read more about this option (and some related documentation bugs) here. http://blogs.sun.com/roller/page/dew?entry=the_real_story_on_the h2. Dbx - The JVM keeps getting a SIGILL The JVM implementation from Sun uses several signals internally to itself as part of its design. SIGILL is one of those signals. Normally dbx intercepts signals that it thinks users will want to see. In this case you should tell dbx to ignore SIGILL signals when you are debugging the JVM. Use the command "ignore sigill" from the dbx command line. h2. Dbx - RTC keeps giving me RUA errors in string routines on Solaris 10 There is a dbx patch to fix this problem. http://blogs.sun.com/dbx/entry/latest_updates_to_run_time dbx patch 121023-02 -- Bug 6372403 h2. Dbx - Why does my program run differently under dbx? Dbx has several side-effects on your program when you run it. [Dbx Side Effects] h2. Dbx - Why can't I redirect the output of some dbx commands? The desired meaning of ">" is different in these two commands: (dbx) print (j > 5) (dbx) print foo > /tmp/output Dbx just isn't smart enough to figure out which one you meant, so some commands interpret ">" as a C/C++ operator, and some commands assume that ">" is a redirection operator. You can read more about it in the dbx command line help system. Type "help redirection". h1. Compilers h2. OpenMP - Why can't my loops have MT-safe functions? The optimizer doesn't know how you're going to link your program. Just because you called a function called "malloc" doesn't mean that's going to be an MT-safe malloc when you link your program. You can tell the compiler to assume you're not replacing library functions by using the -xbuiltin flag. (See the manual) For calls to user functions, cross-file analysis is needed to figure out if your function is MT-safe. You can try -xO5 -xipo (or -xipo=2). Those options might help. h2. Compilers - Why do I see : "language optional software package not installed" Don't put /usr/ucb first in your search path. Modify the PATH environment variable so that /usr/ucb comes last, or remove that part of your PATH variable. The file where this configuration information is stored depends on what your login shell is. Try looking in a file named ".cshrc" in your home directory. h2. Compilers - When I use dwarf my executable is now huge! See this page : [Dwarf size increase] h2. Compilers - Why does the same source produce different object files? There are some options that cause local symbols to be made global. When the compiler does that it has to add some kind of hash prefix so that the symbols don't clash with each other. See this page : [Compiler Globalization] There is also a date stamp that gets recorded in the debug information, when you compile with -g. stripping the binary files will remove that, but won't remove affects of globalization. See also : http://sunsolve.sun.com/search/document.do?assetkey=1-25-80040 h2. C++ - I'm having trouble with the Boost libraries See here : [Boost and Sun Studio] h2. C++ - Why is my symbol missing? Sometimes a C++ program will fail to link because of a missing symbol, but the symbol looks like something that should already be defined. Steve Clamage provided a good summary of what this can mean. {noformat} The most common cause for a missing function is that a needed binary is not being linked, or that the definition is #ifdef'd away. Another possibility is that function cleanupConfig is not declared consistently everywhere. Some examples: 1. The declaration for the function in a header looks like int cleanupConfig(_config*); but in the definition looks like int cleanupConfig(const _config*) { ... } 2. The function is declared inline in some places and not inline in other places. I've seen code like this: INLINE int foo(int i) { ... } where INLINE was a macro that expanded to "inline" or to nothing. If INLINE is not defined the same way for every declaration of this function foo, you get inconsistent definitions, which can lead to link failures. 3. The parameter to cleanupConfig is declared via a typedef: typedef _config cleanup_kind; int cleanupConfig(cleanup_kind*); and the definition of cleanup_kind is not identical everywhere. 4. The function is declared at global scope, but the function is defined inside a namespace. {noformat} h2. C++ - I have more questions! There are more Sun Studio C++ FAQ's (relevant to Sun Studio 11) here: http://developers.sun.com/sunstudio/documentation/ss11/mr/READMEs/c++_faq.html h2. C - What preprocessor symbols are predefined in C ? (From Douglas:) ------------------------------------------------ Use the -### (or -xdryrun) options to see a detailed list of the -D options passed to the C compiler front-end. These are the predefined macros. The only other macros predefined that are not passed to the C compiler front-end are those required by the ISO C standard: {noformat} __STDC__ Linux: always expands to 1 ......................Solaris: expands to 1 with -Xc .....................................expands to 0 with -Xa, -Xt .....................................not defined with -Xs __STDC_VERSION__ Expands to 199901L with -xc99=all .....................Expands to 199409L with -xc99=none .....................Not defined with -Xs option __STDC_IEC_559__ Expands to 1 __STDC_IEC_559_COMPLEX__ Expands to 1 __STDC_HOSTED__ Expands to 1 {noformat} ------------------------------------------------ h1. Platform Specific h2. Linux - I get a strange complaint about a shared library {noformat} % cc -g -xdebugformat=dwarf r.c "r.c", line 4: internal compiler error: DBGGEN ERROR: FILE="../src/dbg_libdwarf.c", LINE=46, Could not load dwarf library: libdwarf.so : libdwarf.so: cannot open shared object file: No such file or directory (DBG_GEN 5.1.11) cc: acomp failed for r.c {noformat} You might need a patch for your linux system to fix the behavior of the dlopen() call. http://blogs.sun.com/roller/page/quenelle?entry=linux_compilers_require_a_glibc h2. Linux - The linker keeps saying: "mangled line number section" {noformat} I've been getting errors like this: pcsLP.o(.text+0x4167)/usr/bin/ld: Dwarf Error: mangled line number section. : In function `unsigned long PcsPtrace::get_rtld_base_addr(char*)': : warning: the use of `tmpnam' is dangerous, better use `mkstemp' This happens when the linker tries to look up the line/file location of a relocation or other link-time error. You only see the complaint about line number information when the linker is also trying to report another error. It looks like a bug in gnu ld that was fixed on March 6th. The fix is shown in revision 1.86 of file dwarf2.c in the 'binutils' package. http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/dwarf2.c?cvsroot=src I assume this symptom will go away in some future version of gnu ld. {noformat} In some cases the Sun Studio 12 compilers on Linux will use a private copy of the GNU linker to link your program. The version of ld included with Sun Studio was chosen to match our supported platforms, and it's a little bit old. You can try telling the Sun Studio compilers to use your local version of the linker if you have a recent version. For C++, you can use: "CC -Yl,/usr/bin" to use the system linker instead. Using the system linker is the normal case, I think only C++ uses the private linker, in order to make sure we have one that supports COMDAT section groups (which we use for template instances). This message comes from the linker because the linker is trying to use Dwarf information to translate a link-time error address into a source file name. It's very clever and useful when it works, but if it encounters something that it thinks is an error in the dwarf data, it spits out this warning. h2. Linux - problem linking with libm.so C++ had a problem with default linker on RH4 not being able to grok our object files due to its own bugs. Thats why we bring updated linker with us (.../prod/lib/amd64/ld or something like this) and use it in 64bit compilation. C does not have this problem and thus does not use this linker. Some linuxes (like RH5 or SuSE10) have recently changed its object files format which causes our "older" linker to emit this "file not recognized" message. Typical error message is {noformat} $ CC -m64 hello.c /usr/lib64/libm.so: file not recognized: File format not recognized {noformat} but it is not limited to libm.so. Source code of linker patched by Sun can be found here: http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=8&PartDetailId=SS12-SRCID-MAY07-G-F&TransactionId=Try See these forum thread for more information: http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5181629 http://forum.java.sun.com/thread.jspa?forumID=855&threadID=5178078 h2. Linux - sunstudio -- too many arguments {noformat} sunstudio: line 293: [: too many arguments -- Gentoo AMD64 Error: client VM not supported {noformat} This happens if the output of "uname -p" results in a string that has spaces in it. If you supply the --userdir option to sunstudio it will override the the usage of uname, and it should work okay. http://forum.sun.com/jive/thread.jspa?forumID=318&threadID=105057 h2. Linux - sunstudio -- On x64 Linux, IDE fails with UnsatisfiedLinkError {noformat} java.lang.UnsatisfiedLinkError: /opt/sun/sunstudio11/prod/lib/libbase.so: /opt/sun/sunstudio11/prod/lib/libbase.so: ... <more stack trace> ... {noformat} If the Sun Studio 11 IDE tries to start up using a 64-bit JVM, it will fail to start because it won't be able to load some of the native support libraries that are 32-bit. A bug has been filed for this (6475414). There are some steps for downloading and using a 32-bit JVM supplied by geo.mac on this thread: http://forum.sun.com/jive/thread.jspa?threadID=106103&tstart=0 |