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.

ChrisQuenelle at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Hi,

I'm having the identical problem on an linux machine running Ubuntu (Version - Dapper Drake). The executable was compiled using gcc. I'm running sunStudio with the following command:

/tmp$ sunstudio --jdkhome /usr/lib/jvm/java-1.5.0-sun-1.5.0.06 in order to make sure it is getting the correct version of Java.

I really would like to use the enivironment so any help would be great.

Thanks in advance,

Bob

TimeLordBob at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 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

ChrisQuenelle at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 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

geomac at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
I updated my unofficial FAQ. http://www.sunstudiofaq.com/mw/index.php?title=Sun_Studio_FAQs#Linux_-_sunstudi o_--_On_x64_Linux.2C_IDE_fails_with_UnsatisfiedLinkError
ChrisQuenelle at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6
In case someone stumbles across this thread, my FAQ is at a different address now. http://www.genunix.org/wiki/index.php/Sun_Studio_FAQs#Linux_-_sunstudio_--_On_x 64_Linux.2C_IDE_fails_with_UnsatisfiedLinkError
ChrisQuenelle at 2007-7-7 1:15:08 > top of Java-index,Development Tools,Solaris and Linux Development Tools...