Bug 200657

Summary: azureus: Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib64/eclipse/libswt-pi-gtk-3139.so:
Product: [Fedora] Fedora Reporter: Rick Richardson <rickrich>
Component: azureusAssignee: Anthony Green <green>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: extras-qa, overholt, tromey
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-11 21:30:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rick Richardson 2006-07-30 03:32:02 UTC
$ azureus
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/lib64/eclipse/libswt-pi-gtk-3139.so:
/usr/lib64/eclipse/libswt-pi-gtk-3139.so: wrong ELF class: ELFCLASS64
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:122)
        at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:75)
        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:58)
        at
org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:108)
        at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:147)
        at org.gudy.azureus2.ui.swt.Main.main(Main.java:162)
$

Comment 1 Anthony Green 2006-08-13 16:14:15 UTC
This sounds like you're running a 32-bit java on x86-64.
What does "which java && java --version" say?



Comment 2 Rick Richardson 2006-08-13 16:32:28 UTC
$ which java && java --version
/usr/bin/java
Unrecognized option: --version
Could not create the Java virtual machine.

Comment 3 Rick Richardson 2006-08-13 16:34:11 UTC
$ which java && java -version
/usr/bin/java
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)


Comment 4 Anthony Green 2006-08-27 02:55:07 UTC
(In reply to comment #3)
> $ which java && java -version
> /usr/bin/java
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
> 

Ah, so a 32-bit proprietary java is trying to load our 64-bit SWT library.
You'll notice that we point LD_LIBRARY_PATH at /usr/lib64/eclipse in the azureus
startup script.

Try removing the bit where we set LD_LIBRARY_PATH and then running.  Maybe we
don't need that anymore.  Let me know what you find out.

I'm copying overholt for general eclipse/SWT advice...






Comment 5 Rick Richardson 2006-08-27 03:14:54 UTC
Now it says:

$ azureus
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3139 in
java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:122)
        at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:75)
        at
org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:58)
        at
org.gudy.azureus2.ui.swt.mainwindow.Initializer.<init>(Initializer.java:108)
        at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:147)
        at org.gudy.azureus2.ui.swt.Main.main(Main.java:162)
$

Comment 6 Anthony Green 2006-08-27 03:25:31 UTC
(In reply to comment #5)
> Now it says:
> 
> $ azureus
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3139 in
> java.library.path

Thanks.

overholt: does Eclipse run on x86-64 with a 32-bit Java?  or is this something
we're just not going to support?

Comment 7 Rick Richardson 2006-08-27 03:35:33 UTC
Downloaded from site:

$ pwd
/home/rick
$ sh -x azureus/azureus
+ JAVA_PROGRAM_DIR=
+ MSG0='Loading Azureus:'
+ MSG1='Starting Azureus...'
+ MSG2='Java exec found in '
+ MSG3='OOPS, your java version is too old '
+ MSG4='You need to upgrade to JRE 1.4.x or newer from http://java.sun.com'
+ MSG5='Suitable java version found '
+ MSG6='Configuring environment...'
+ MSG7='OOPS, you don'\''t seem to have a valid JRE '
+ MSG8='OOPS, unable to locate java exec in '
+ MSG9=' hierarchy'
+ MSG10='Java exec not found in PATH, starting auto-search...'
+ MSG11='Java exec found in PATH. Verifying...'
+ echo Starting Azureus...
Starting Azureus...
+ '[' '' == '' ']'
+ command -v java
+ echo Java exec found in PATH. Verifying...
Java exec found in PATH. Verifying...
+ check_version
++ java -version
++ head -n 1
+ JAVA_HEADER='java version "1.5.0_06"'
++ echo java version '"1.5.0_06"'
++ cut -f1 '-d '
+ JAVA_IMPL=java
+ '[' java = java ']'
++ echo java version '"1.5.0_06"'
++ sed 's/java version "\(.*\)"/\1/'
+ VERSION=1.5.0_06
+ echo 1.5.0_06
+ grep '^1.[0-3]'
+ echo Suitable java version found '[java = 1.5.0_06]'
Suitable java version found [java = 1.5.0_06]
+ echo Configuring environment...
Configuring environment...
+ return 0
+ '[' -z '' ']'
++ dirname azureus/azureus
+ PROGRAM_DIR=azureus
++ cd azureus
++ pwd
+ PROGRAM_DIR=/home/rick/azureus
+ for FILE in '${PROGRAM_DIR}/*.jar'
+ CLASSPATH=/home/rick/azureus/Azureus2.jar
+ for FILE in '${PROGRAM_DIR}/*.jar'
+ CLASSPATH=/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar
+ for FILE in '${PROGRAM_DIR}/*.jar'
+
CLASSPATH=/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar:/home/rick/azureus/swt-mozilla.jar
+ for FILE in '${PROGRAM_DIR}/*.jar'
+
CLASSPATH=/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar:/home/rick/azureus/swt-mozilla.jar:/home/rick/azureus/swt-pi.jar
+ echo Loading Azureus:
Loading Azureus:
+ cd /home/rick/azureus
+ echo 'java -Xms16m -Xmx128m -cp
"/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar:/home/rick/azureus/swt-mozilla.jar:/home/rick/azureus/swt-pi.jar"
-Djava.library.path="/home/rick/azureus"
-Dazureus.install.path="/home/rick/azureus" org.gudy.azureus2.ui.swt.Main '\'''\'''
java -Xms16m -Xmx128m -cp
"/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar:/home/rick/azureus/swt-mozilla.jar:/home/rick/azureus/swt-pi.jar"
-Djava.library.path="/home/rick/azureus"
-Dazureus.install.path="/home/rick/azureus" org.gudy.azureus2.ui.swt.Main ''
+ java -Xms16m -Xmx128m -cp
/home/rick/azureus/Azureus2.jar:/home/rick/azureus/swt.jar:/home/rick/azureus/swt-mozilla.jar:/home/rick/azureus/swt-pi.jar
-Djava.library.path=/home/rick/azureus -Dazureus.install.path=/home/rick/azureus
org.gudy.azureus2.ui.swt.Main

And everything is hunky-dory.

So /usr/bin/azureus is the problem child...

Comment 8 Anthony Green 2006-08-27 04:00:37 UTC
(In reply to comment #7)
> So /usr/bin/azureus is the problem child...

Yes, because upstream ships a 32-bit binary which runs fine against your 32-bit
jre, whereas we ship a 64-bit binary for our 64-bit jre.

So, try the following:
$ rpm -e azureus
$ yum install azureus.i386
And then run.

AG


Comment 9 Andrew Overholt 2006-08-27 18:28:22 UTC
(In reply to comment #6)
> overholt: does Eclipse run on x86-64 with a 32-bit Java?  or is this something
> we're just not going to support?

We're not going to ship a 32-bit SWT on 64-bit systems.  Your advice for the
'yum install azureus.i386' is what people who would like this should do.

Comment 10 Anthony Green 2006-08-27 18:34:40 UTC
(In reply to comment #9)
> We're not going to ship a 32-bit SWT on 64-bit systems.  Your advice for the
> 'yum install azureus.i386' is what people who would like this should do.

Ok, I'm closing this with NOTABUG and will add a comment to the release notes.



Comment 11 Rick Richardson 2006-08-27 23:06:00 UTC
# yum install azureus.i386
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core                                                                 [1/5]
core                      100% |=========================| 1.1 kB    00:00
macromedia                                                           [2/5]
macromedia                100% |=========================|  951 B    00:00
updates                                                              [3/5]
updates                   100% |=========================| 1.2 kB    00:00
freshrpms                                                            [4/5]
freshrpms                 100% |=========================|  951 B    00:00
extras                                                               [5/5]
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 1.3 MB    00:07
extras    : ################################################## 4586/4586
Added 21 new packages, deleted 89 old in 11.67 seconds
Parsing package install arguments
No Match for argument: azureus.i386
Nothing to do

$ azureus
bash: /usr/bin/azureus: No such file or directory



Comment 12 John Mahowald 2006-11-20 23:31:01 UTC
(In reply to comment #11)
> No Match for argument: azureus.i386
> Nothing to do
> 

yum doesn't come with both x86_64 and i386 repos enabled. There are various
howtos around for how to set up one.