Bug 217361

Summary: OOo finds wrong libjvm.so on multi-arch gcj 4.1.1 installations
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: openoffice.orgAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.0.4-5.5.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-04 08:44:46 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:
Attachments:
Description Flags
java bytecode none

Description David Woodhouse 2006-11-27 14:43:45 UTC
When 32-bit OpenOffice.org is started on a PPC64 machine with both libgcj.ppc
and libgcj.ppc64 installed, it elects to use the 64-bit libjvm.so, and fails --
going into an endless loop like this...

pmac /home/dwmw2/.openoffice.org2.0/user/config $ ooffice 
[Java framework]sunjavaplugin.so could not load Java runtime library: 
file:///usr/lib64/gcj-4.1.1/libjvm.so.[Java framework]sunjavaplugin.so could not
load Java runtime library: 
file:///usr/lib64/gcj-4.1.1/libjvm.so.[Java framework]sunjavaplugin.so could not
load Java runtime library: 
 ...

If ~/.openoffice.org2.0/user/config/javasettings_Linux_PowerPC.xml is removed
and OOo restarted with only libgcj.ppc installed, it works fine.

I was unable to use the Java configuration GUI in OpenOffice to point it at the
correct JVM -- it claims that neither /usr/lib nor /usr/lib/gcj-4.1.1
directories contain a valid Java runtime environment. The only thing that works
is removing libgcj.ppc64, reinstalling libgcj.ppc, removing the Java settings
config file and restarting OOo.

Comment 1 Caolan McNamara 2006-11-27 16:03:11 UTC
Created attachment 142176 [details]
java bytecode

can I get the output of this attachment saved as findhome.class and
> java findhome
I expect to see...
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
and to see..
that /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so is a link
to /usr/lib/gcj-4.1.1/libjvm.so

I think the problem is in the little piece of logic to bridge during this
transition period from the old style libgcj.so providing the jvm to the new
style libjvm.so. The problem being that vanilla 4.1.1 provides libgcj.so while
we use libjvm.so, and I "keeping vanilla working" breaks on a nonvanilla 4.1.1
in a multiarch libjvm installed scenario

Comment 2 Caolan McNamara 2006-11-27 16:12:19 UTC
pending seeing expected results, fix for this will appear in next scheduled FC-6
update and next rawhide push

Comment 3 David Woodhouse 2006-11-27 16:16:25 UTC
pmac /home/dwmw2 $ rpm -q --qf %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\n libgcj
libgcj-4.1.1-30.ppc
pmac /home/dwmw2 $ java findhome
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
file:///usr/lib
pmac /home/dwmw2 $ ls -l
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so
lrwxrwxrwx 1 root root 28 Nov 27 16:13
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so ->
/usr/lib/gcj-4.1.1/libjvm.so

Comment 4 David Woodhouse 2006-11-27 16:16:36 UTC
pmac /home/dwmw2 $ rpm -q --qf %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\\n libgcj
libgcj-4.1.1-30.ppc
libgcj-4.1.1-30.ppc64
pmac /home/dwmw2 $ java findhome
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
file:///usr/lib64
pmac /home/dwmw2 $ ls -l
/usr/lib{,64}/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so
ls: /usr/lib64/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so: No such
file or directory
lrwxrwxrwx 1 root root 28 Nov 27 16:15
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/ppc/client/libjvm.so ->
/usr/lib/gcj-4.1.1/libjvm.so


Comment 5 Caolan McNamara 2006-11-27 16:24:13 UTC
all in order, fix should work as expected

Comment 6 David Woodhouse 2006-11-27 16:29:06 UTC
If I run the 32-bit version of /usr/bin/gij, which is normally overwritten by
the installation of libgcj.ppc64, then I see the same results as when only
libgcj.ppc is installed.

ION}-%{RELEASE}.%{ARCH}\\n libgcjlibgcj-4.1.1-30.ppc
libgcj-4.1.1-30.ppc64
pmac /home/dwmw2 $ file -L /usr/bin/gij
/usr/bin/gij: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
(SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for
GNU/Linux 2.6.9, stripped
pmac /home/dwmw2 $ java findhome
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
file:///usr/lib


OpenOffice works correctly like this too.