Bug 177655 - Java fails.
Summary: Java fails.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: powerpc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-12 18:09 UTC by David Woodhouse
Modified: 2007-11-30 22:11 UTC (History)
4 users (show)

Fixed In Version: 4.1.0-0.15
Clone Of:
Environment:
Last Closed: 2006-01-18 08:05:00 UTC
Type: ---
Embargoed:


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

Description David Woodhouse 2006-01-12 18:09:49 UTC
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 19:48:33 UTC
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 20:14:16 UTC
Yes, it was a clean install with an empty home directory. 

Comment 3 Caolan McNamara 2006-01-13 09:09:29 UTC
Created attachment 123153 [details]
g++ java.cxx -lgcj ; ./a.out

Comment 4 David Woodhouse 2006-01-14 11:21:16 UTC
[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 18:55:27 UTC
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 22:57:43 UTC
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>

        * 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 08:05:00 UTC
Should be fixed in libgcj-4.1.0-0.15 in rawhide.

Comment 9 Andrew Overholt 2006-01-18 15:25:50 UTC
(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.