Sun Studio 11 Error on Linux x86_64
Everytime I try to execute my compiled program through Sun Studio 11 (studio11-lin-x86.tar.bz2), I get the following error:
"An unexpected exception has occured."
Clicking on Show Details reveals:
java.lang.UnsatisfiedLinkError: /opt/sun/sunstudio11/prod/lib/libbase.so: /opt/sun/sunstudio11/prod/lib/libbase.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:967)
at com.sun.tools.swdev.common.base.InstallDir.loadLibrary(InstallDir.java:64)
at com.sun.tools.swdev.common.base.UnixPty.<clinit>(UnixPty.java:254)
at com.sun.tools.swdev.sunstudio.execution.TerminalProcess.terminalProcess(TerminalProcess.java:68)
at com.sun.tools.swdev.sunstudio.execution.TerminalExecutor.run(TerminalExecutor.java:77)
[catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
I get NO such error on my x86 machine. Both have the same (appropriate) Sun JREs and both run RedHat EL4.
Please advise. Thanks!
null
[1334 byte] By [
Sal] at [2007-11-26 9:55:03]

# 1
What do you mean by "execute my compiled program through Sun Studio 11" ?
Are you running inside the IDE?
What is output of "cc -V"?
(In other words which Sun Studio are you using?)
In theory you might running into a Linux bug, described here:
http://blogs.sun.com/quenelle/entry/linux_compilers_require_a_glibc
I know that bug affects SuSE, not sure about RHEL.
# 3
I think this is a problem related to running the IDE using a 64-bit JVM.
There are platform-specific runtime libraries that we only ship
(so far) as 32-bit libraries.
If you specify the JDK to use, and there is a 32-bit and a 64-bit JVM inside that
directory, it might still use the 64-bit JVM. I'm not sure. But see if
you can get it to start using a 32-bit JVM.
--chris
# 4
I had the same problem. This is how I got round it.
1. run
sudo apt-get install ia32-libs lib32asound2 lib32ncurses5 ia32-libs-sdl ia32-libs-gtk gsfonts gsfonts-x11 linux32
2. Download the *32 bit* JDK (in my case jdk1.5.0_08)
3. run
chmod +x jdk-1_5_0_08-linux-i586.bin
4. ./jdk-1_5_0_08-linux-i586.bin
(once you agree to the licence) This will extract it to your desktop.
5. run
sudo mkdir /usr/lib/java32
6 run
sudo cp -R jdk1.5.0_08/* /usr/lib/java32
7. run
./sunstudio --jdkhome /usr/lib/java32/
You should be up and running.
HTH
George
*Edit*
You may also wish to install libstdc++5 and lib32stdc++6.4.0-dbg as well. This will allow you ro right click and use the load program option.
Message was edited by:
geo.mac