Bug 177655 - Java fails.
Java fails.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-12 13:09 EST by David Woodhouse
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version: 4.1.0-0.15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-18 03:05:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
g++ java.cxx -lgcj ; ./a.out (4.43 KB, application/x-gzip)
2006-01-13 04:09 EST, Caolan McNamara
no flags Details

  None (edit)
Description David Woodhouse 2006-01-12 13:09:49 EST
With a fresh install of FC5t2, Java doesn't work for me in OOo. If I try the
letter wizard, for example, I get a dialog box telling me that my JRE is
defective, and inviting me to configure another.

I go to configure it and can select GCJ, but it still doesn't work. It tells me
this:

[Java framework]sunjavaplugin.so could not load Java runtime library:
file:///usr/lib/libgcj.so.7.

Something very similar happened on FC4 recently and I was able to just copy
across my ~/.openoffice.org2.0/user/config/javasettings_Linux_PowerPC.xml file
to make it work. That doesn't work here though, even if I change 'libgcj.so.6'
to 'libgcj.so.7' in the <vendorData> tag.
Comment 1 Caolan McNamara 2006-01-12 14:48:33 EST
A fresh install, i.e. one without a ~/.openoffice.org2.0 I assume. 

Can you move ~/.openoffice.org2.0 out of the way and verify that without a
~/.openoffice.org2.0 and running openoffice.org that this problem exists. I'm ok
under ix86 so there may be some libgcj ppc related cock-up here, in which case
I'll have to put together a simple dlopen libgcj and call java_vm yadda yadda to
test the ppc libgcj
Comment 2 David Woodhouse 2006-01-12 15:14:16 EST
Yes, it was a clean install with an empty home directory. 
Comment 3 Caolan McNamara 2006-01-13 04:09:29 EST
Created attachment 123153 [details]
g++ java.cxx -lgcj ; ./a.out
Comment 4 David Woodhouse 2006-01-14 06:21:16 EST
[root@net2-102 javatest]# ./a.out
./a.out: error while loading shared libraries: /usr/lib/libgcj.so.7: R_PPC_REL24
relocation at 0xf791e420 for symbol `__ashldi3' out of range
Comment 5 Andrew Haley 2006-01-16 13:55:27 EST
This looks rather like libgcj has been built without -fPIC.

I don't know what might have caused that.

I will have a look if anyone wants me to, but you'll have to provide a box.
Comment 6 Jakub Jelinek 2006-01-16 17:57:43 EST
There are 2 text relocations on ppc32:
01136420  006aae0a R_PPC_REL24            00000000   __ashldi3 + 0
01136648  0069420a R_PPC_REL24            00000000   __lshrdi3 + 0
both from libffi:
01136060 T ffi_prep_args_SYSV
01136310 T ffi_call_SYSV
01136430 T ffi_closure_SYSV
01136660 T GC_hblk_fl_from_blocks
Apparently a result of buggy FreeBSD libffi patch:
2005-07-19  Andreas Tobler  <a.tobler@schweiz.ch>

        * Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
        * Makefile.in: Regenerate.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.
        * configure.ac: Add POWERPC_FREEBSD rules.
        * configure: Regenerate.
        * src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
        (FFI_SYSV_TYPE_SMALL_STRUCT): Define.
        * src/powerpc/ffi.c: Add flags to handle small structure returns
        in ffi_call_SYSV.
Will fix tomorrow.
        (ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
        Aka FFI_SYSV.
        (ffi_closure_helper_SYSV): Likewise.
        * src/powerpc/ppc_closure.S: Add return types for small structures.
        * src/powerpc/sysv.S: Add bits to handle small structures for
        final SYSV 4 ABI.
Comment 8 Jakub Jelinek 2006-01-18 03:05:00 EST
Should be fixed in libgcj-4.1.0-0.15 in rawhide.
Comment 9 Andrew Overholt 2006-01-18 10:25:50 EST
(In reply to comment #8)
> Should be fixed in libgcj-4.1.0-0.15 in rawhide.

Things (ex. /usr/bin/gij) work for me on ppc again.  Thanks!

Note You need to log in before you can comment on or make changes to this bug.